Template:Infobox person: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1: Line 1:
{{Infobox|child={{{child|{{{embed|}}}}}}
{{Infobox|child={{{child|{{{embed|}}}}}}
| bodyclass  = biography vcard
| bodyclass  = biography vcard
<!-- JSON-LD structured data -->
<!-- Add your script here -->
<script type="application/ld+json">
<script>
{
  document.addEventListener('DOMContentLoaded', function() {
  "@context": "https://schema.org",
    const knowledgePanel = {
  "@type": "Person",
      "@context": "https://schema.org",
  "name": "{{#if:{{{name|}}}|{{{name}}}|{{PAGENAMEBASE}}}}",
      "@type": "Person",
  "image": "{{#if:{{{image|}}}|{{{image}}}|}}",
      "name": "{{{name|{{PAGENAMEBASE}}}}}",
  "birthDate": "{{#if:{{{birth_date|}}}|{{{birth_date}}}|}}",
      "birthDate": "{{{birth_date|}}}",
  "birthPlace": "{{#if:{{{birth_place|}}}|{{{birth_place}}}|}}",
      "birthPlace": "{{{birth_place|}}}",
  "deathDate": "{{#if:{{{death_date|}}}|{{{death_date}}}|}}",
      "occupation": "{{{occupation|}}}",
  "deathPlace": "{{#if:{{{death_place|}}}|{{{death_place}}}|}}",
      "url": "{{{website|{{{homepage|{{{URL|{{{url|}}}}}}}}}}}}",
  "nationality": "{{#if:{{{nationality|}}}|{{{nationality}}}|}}",
      // Add other relevant properties here
  "occupation": "{{#if:{{{occupation|}}}|{{{occupation}}}|}}",
    };
  "description": "{{#if:{{{known_for|{{{known_for|{{{known|}}}}}}}}}|{{{known_for|{{{known_for|{{{known|}}}}}}}}}|}}"
    const scriptElement = document.createElement('script');
}
    scriptElement.type = 'application/ld+json';
    scriptElement.text = JSON.stringify(knowledgePanel);
    document.head.appendChild(scriptElement);
  });
</script>
</script>
| above      = {{Br separated entries
| above      = {{Br separated entries