Template:Person: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| (16 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
__NOFACTBOX__ | |||
[[Category:People]] | |||
<!-- ========================================================== | |||
DATA STORAGE (THE "SET" BLOCK) | |||
We use #set to store data silently. No hidden divs needed. | |||
========================================================== --> | |||
{{#set: | |||
|HasType={{{HasType|PublicFigure}}} | |||
|HasName={{{HasName|}}} | |||
|HasAltName={{{HasAltName|}}} | |||
|HasHebName={{{HasHebName|}}} | |||
|HasYiddishName={{{HasYiddishName|}}} | |||
|HasDateOfBirth={{{HasDateOfBirth|}}} | |||
|HasDateOfDeath={{{HasDateOfDeath|}}} | |||
|HasPlaceOfBirth={{{HasPlaceOfBirth|}}} | |||
|HasPlaceOfDeath={{{HasPlaceOfDeath|}}} | |||
|HasWikidataID={{{HasWikidataID|}}} | |||
|HasMazalID={{{HasMazalID|}}} | |||
|HasVIAFID={{{HasVIAFID|}}} | |||
|HasImage={{{HasImage|}}} | |||
|HasArticle={{{HasArticle|}}} | |||
|HasBibLink={{{HasBibLink|}}} | |||
|HasYIVOLink={{{HasYIVOLink|}}} | |||
|HasWikiLink={{{HasWikiLink|}}} | |||
}} | |||
<!-- | <!-- Handle List Properties (Split by semicolon or comma) --> | ||
<!-- 1. URLs: We assume raw text storage for JSON export simplicity, | |||
but validation happens on display. --> | |||
{{#if:{{{HasURL|}}}| | |||
{{#arraymap:{{{HasURL|}}}|;|@@|{{#set:HasURL=@@}} }} | |||
}} | |||
<!-- Handle Profession List (Controlled Vocabulary) --> | |||
<!-- We split by semicolon so "Rabbi;Author" becomes two distinct data values --> | |||
{{#if:{{{ | {{#if:{{{HasProfession|}}}| | ||
{{# | {{#arraymap:{{{HasProfession|}}}|;|@@|{{#set:HasProfession=@@}}|}} | ||
}} | |||
{{# | |||
<div class="person" style="border:1px solid # | <!-- ========================================================== | ||
VISUAL DISPLAY (THE CARD) | |||
========================================================== --> | |||
<div class="person-card" style="border:1px solid #ccc; background:#f9f9f9; padding:1em; display:flow-root; box-shadow: 2px 2px 5px rgba(0,0,0,0.1);"> | |||
<!-- | |||
<!-- Image Block --> | |||
{{#if:{{{HasImage|}}}| | {{#if:{{{HasImage|}}}| | ||
<div style="float:right; margin: | <div style="float:right; margin-left:1em; max-width:200px;"> | ||
[[{{{HasImage}}}|thumb|200px|{{{HasName|}}}]] | [[{{#show: {{{HasImage|}}} |?HasFile |link=none}}|thumb|200px|center|{{{HasName|}}}]] | ||
</div> | </div> | ||
}} | }} | ||
<!-- | <!-- Header --> | ||
{{#if:{{{ | <h2 style="margin-top:0;">{{{HasName|{{PAGENAME}}}}}</h2> | ||
{{#if:{{{ | <div class="person-data"> | ||
<!-- Names --> | |||
{{#if:{{{ | {{#if:{{{HasHebName|}}}{{{HasYiddishName|}}}| | ||
{{#if:{{{ | <p> | ||
{{#if:{{{ | {{#if:{{{HasHebName|}}}|'''Hebrew:''' <span lang="he" dir="rtl">{{{HasHebName}}}</span> • }} | ||
{{#if:{{{HasYiddishName|}}}|'''Yiddish:''' <span lang="yi" dir="rtl">{{{HasYiddishName}}}</span>}} | |||
{{#if:{{{ | </p> | ||
{{#if:{{{ | }} | ||
{{#if:{{{ | |||
{{#if:{{{HasURL|}}}|'''External | <!-- Vital Statistics --> | ||
<ul> | |||
{{#if:{{{HasDateOfBirth|}}}|<li>'''Born:''' {{{HasDateOfBirth}}}{{#if:{{{HasPlaceOfBirth|}}}| in [[{{{HasPlaceOfBirth}}}]]}}</li>}} | |||
{{#if:{{{HasDateOfDeath|}}}|<li>'''Died:''' {{{HasDateOfDeath}}}{{#if:{{{HasPlaceOfDeath|}}}| in [[{{{HasPlaceOfDeath}}}]]}}</li>}} | |||
</ul> | |||
<!-- Professional Data --> | |||
{{#if:{{{HasProfession|}}}| | |||
'''Known for:''' | |||
<!-- {{#arraymap:{{{HasProfession|}}}|;|@@|[[Term:@@|@@]]|, }} --> <!-- Auto-links to Term:Namespace --> | |||
<!-- | |||
We use [[HasProfession::@@]] syntax here. | |||
This displays the text "@@" (e.g. Rabbi), but clicking it | |||
searches the wiki for other people with that same property value. | |||
--> | |||
{{#arraymap:{{{HasProfession|}}}|;|@@|[[HasProfession::@@]]|, }} | |||
<br/> | |||
}} | |||
{{#if:{{{HasArticle|}}}|'''Related Article:''' [[{{{HasArticle}}}]] | '''No Related Article''' <br/>}} | |||
<!-- Identifiers (Crucial for TEI/MARC21 Interop) --> | |||
{{#if:{{{HasWikidataID|}}}{{{HasVIAFID|}}}{{{HasMazalID|}}}| | |||
<hr style="margin:0.5em 0; border:0; border-top:1px dashed #ccc;"/> | |||
<small style="color:#666;"> | |||
{{#if:{{{HasWikidataID|}}}|'''Wikidata:''' [https://www.wikidata.org/wiki/{{{HasWikidataID}}} {{{HasWikidataID}}}] • }} | |||
{{#if:{{{HasVIAFID|}}}|'''VIAF:''' [https://viaf.org/viaf/{{{HasVIAFID}}} {{{HasVIAFID}}}] • }} | |||
{{#if:{{{HasMazalID|}}}|'''Mazal ID:''' {{{HasMazalID}}}}} | |||
</small> | |||
<br/> | |||
}} | |||
{{#if:{{{HasBibLink|}}}|'''Selected bibliography:'''[[{{{HasBibLink}}}]] |'''No Selected bibliography''' <br/>}} | |||
{{#if:{{{HasYIVOLink|}}}|'''YIVO Encyclopedia entry:'''[[{{{HasYIVOLink}}}]] |'''No YIVO Encyclopedia entry''' <br/>}} | |||
{{#if:{{{HasWikiLink|}}}|'''Wikipedia entry:'''[[{{{HasWikiLink}}}]] |'''No Wikipedia entry''' <br/>}} | |||
<!-- Other External Links with Validation --> | |||
{{#if:{{{HasURL|}}}| | |||
'''External Links:'''<br/> | |||
{{#arraymap:{{{HasURL}}}|;|@@| | |||
{{#if: {{#rmatch:@@|^https?://}} | [@@ Link] | <!-- Invalid hidden --> }} | |||
|<br/>}} | |||
}} | |||
</div> | |||
</div> | </div> | ||
</includeonly> | </includeonly> | ||
<noinclude> | <noinclude> | ||
| Line 57: | Line 122: | ||
<pre> | <pre> | ||
{{Person | {{Person | ||
|HasName= | |HasName=Perl ,Joseph | ||
| | |HasHebName=פרל, יוסף | ||
|HasYiddishName=פערל, יוסף | |||
|HasType=PublicFigure | |HasType=PublicFigure | ||
|HasDateOfBirth= | |HasDateOfBirth=1773 | ||
|HasPlaceOfBirth=Community:Lviv | |HasPlaceOfBirth=Community:Lviv | ||
|HasDateOfDeath= | |HasDateOfDeath=1839 | ||
|HasPlaceOfDeath=Community:Brody | |HasPlaceOfDeath=Community:Brody | ||
|HasWikidataID=Q123456 | |HasWikidataID=Q123456 | ||
|HasMazalID=MAZAL-000045 | |HasMazalID=MAZAL-000045 | ||
|HasImage= | |HasVIAFID=22945141 | ||
|HasImage=Image:Josef Perl | |||
|HasArticle=Article:The Jewish Council of Lviv | |HasArticle=Article:The Jewish Council of Lviv | ||
|HasProfession=Community leader and rabbinical scholar | |HasProfession=Community leader and rabbinical scholar | ||
|HasURL=https://example.org/persons/jacob_ben_moses | |HasURL=https://example.org/persons/jacob_ben_moses; https://en.wikipedia.org/wiki/Jacob_ben_Moses | ||
|HasWikiLink= | |||
|HasYIVOLink= | |||
|HasBibLink= | |||
}} | }} | ||
</pre> | </pre> | ||
</noinclude> | </noinclude> | ||
Latest revision as of 20:25, 23 December 2025
Use this template on Person: pages to describe individual people.
Example:
{{Person
|HasName=Perl ,Joseph
|HasHebName=פרל, יוסף
|HasYiddishName=פערל, יוסף
|HasType=PublicFigure
|HasDateOfBirth=1773
|HasPlaceOfBirth=Community:Lviv
|HasDateOfDeath=1839
|HasPlaceOfDeath=Community:Brody
|HasWikidataID=Q123456
|HasMazalID=MAZAL-000045
|HasVIAFID=22945141
|HasImage=Image:Josef Perl
|HasArticle=Article:The Jewish Council of Lviv
|HasProfession=Community leader and rabbinical scholar
|HasURL=https://example.org/persons/jacob_ben_moses; https://en.wikipedia.org/wiki/Jacob_ben_Moses
|HasWikiLink=
|HasYIVOLink=
|HasBibLink=
}}