Difference between revisions of "Template:Family"

From Green Family Wiki
Jump to: navigation, search
m (6 revisions imported: Import from Smith wiki)
 
(28 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
* Unnamed parameters: parent names interleaved with FamilySearch ID numbers, for linking (supports up to 6 parents)
 
* Unnamed parameters: parent names interleaved with FamilySearch ID numbers, for linking (supports up to 6 parents)
 
* ''surname'': family's surname for sorting; defaults to the last word in the page name
 
* ''surname'': family's surname for sorting; defaults to the last word in the page name
* ''child family'': name of a child's own family page; multiple children may be separated by commas
+
* ''child family'': name of a child's own family page; multiple children may be separated by semicolons (;)
* ''ancestor family'': families to link to in which the parents are children, separated by commas
+
* ''grandparent family'': families to link to in which the parents are children, separated by semicolons (;)
* ''photo'': name of a file to display at the top (e.g., ''File:Family Picture.jpg'')
+
* ''other family'': other related families to link to, separated by semicolons (;)
Adds the [[:Category:Family]] tag and sets [[Property:Surname]], [[Property:Child Family]], and [[Property:Descendant Family]].
+
* ''start year'': Earliest relevant year in parents' adult life; default is ''marriage year'' or ''parent birth year''+25 or ''parent death year''-75
</noinclude><includeonly>[[Category:Family|{{#if:{{{surname|}}}|{{{surname}}}|{{Last Word|{{PAGENAME}}}}}}]]{{#set:
+
* ''marriage year'': Year of the primary couple's marriage or similar event; default is ''start year'' or ''parent birth year''+25 or ''parent death year''-75
| Surname={{#if:{{{surname|}}}|{{{surname}}}|{{Last Word|{{PAGENAME}}}}}}
+
* ''parent birth year'': Earliest year of a parent's birth; default is ''parent death year''-100 or ''start year''-25
| Descendant Family={{PAGENAME}}
+
* ''parent death year'': Latest year of a parent's death; default is ''parent birth year''+100 or ''start year''+75
}}{{For Each|{{{child family|}}}|,||
+
* ''residence'': place where the family lived; multiple places separated by semicolons (;)
| template=Family/Set Descendants
+
* ''photo'': name of a file to display at the top; does not include the "File:" namespace prefix (e.g., ''Family Picture.jpg'')
 +
Adds the [[:Category:Family]] tag and sets [[Property:Surname]], [[Property:Child Family]], [[Property:Descendant Family]], [[Property:Marriage Year]], [[Property:Family Start Year]], [[Property:Parent Birth Year]], [[Property:Parent Death Year]], and [[Property:Residence]]; creates link subobjects with [[Property:Child Link Family]], [[Property:Child Link Index]], [[Property:Grandparent Link Family]], [[Property:Grandparent Link Index]], [[Property:Residence Link Place]], and [[Property:Residence Link Index]].
 +
</noinclude><includeonly>{{Family/Set Basic
 +
| surname={{#if:{{{surname|}}}|{{{surname}}}|{{#explode:{{PAGENAME}}| |-1}}}}
 +
}}{{For Each|{{{child family|}}}|;||
 +
| template=Family/Set Child
 +
}}{{For Each|{{{grandparent family|}}}|;||
 +
| template=Family/Set Grandparent
 +
}}{{For Each|{{{residence|}}}|;||
 +
| template=Family/Set Residence
 +
}}{{Family/Set Years
 +
| marriage year={{Year|{{{marriage year|}}}}}
 +
| start year={{Year|{{{start year|}}}}}
 +
| parent birth year={{Year|{{{parent birth year|}}}}}
 +
| parent death year={{Year|{{{parent death year|}}}}}
 
}}
 
}}
 
{{#if:{{{photo|}}}
 
{{#if:{{{photo|}}}
|<div style="float:right; margin-left:15px; margin-bottom:15px">[[{{{photo|}}}|400x400px]]</div>
+
|<div style="float:right; margin-left:15px; margin-bottom:15px">[[File:{{{photo|}}}|400x400px]]</div>
 
}}{{#if:{{{1|}}}
 
}}{{#if:{{{1|}}}
| ''Family of {{Family/Parent Name| name={{{1}}} | familysearch={{{2|}}} }}{{Wrap| & |{{#if:{{{3|}}}
+
| ''Family of {{For Each Param| & |{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}|{{{10|}}}|
| {{Family/Parent Name| name={{{3}}} | familysearch={{{4|}}} }}{{Wrap| & |{{#if:{{{5|}}}
+
  | template=Family/Parent Name
| {{Family/Parent Name| name={{{5}}} | familysearch={{{6|}}} }}{{Wrap| & |{{#if:{{{7|}}}
+
}}''{{Wrap|, |{{#if: {{{start year|}}} | {{{start year}}}{{#if: {{{marriage year|}}} |/}} }}{{{marriage year|}}}{{Wrap| |{{#if:{{{parent birth year|}}}{{{parent death year|}}}
| {{Family/Parent Name| name={{{7}}} | familysearch={{{8|}}} }}{{Wrap| & |{{#if:{{{9|}}}
+
| ({{{parent birth year|}}}-{{{parent death year|}}})
| {{Family/Parent Name| name={{{9}}} | familysearch={{{10|}}} }}{{Wrap| & |{{#if:{{{11|}}}
+
}}}}}}''
| {{Family/Parent Name| name={{{11}}} | familysearch={{{12|}}} }}
 
}}}}}}}}}}}}}}}}}}}}''
 
 
}}{{Wrap|
 
}}{{Wrap|
  
''Ancestors:''
+
''Residence: |{{For Each|{{{residence|}}}|;|<nowiki/>; |
|{{For Each|{{{ancestor family|}}}|,|
+
| template=Link
 +
}}|''}}{{Wrap|
 +
 
 +
''Grandparents:''
 +
|{{For Each|{{{grandparent family|}}}|;|
 
| template=Family/Link Line
 
| template=Family/Link Line
 
}}}}{{Wrap|
 
}}}}{{Wrap|
  
 
''Descendants:''
 
''Descendants:''
|{{For Each|{{{child family|}}}|,|
+
|{{For Each|{{{child family|}}}|;|
 
| template=Family/Descendant Tree
 
| template=Family/Descendant Tree
}}}}</includeonly>
+
}}}}{{Wrap|
 +
 
 +
''See also:''
 +
|{{For Each|{{{other family|}}}|;|
 +
| template=Family/Link Line
 +
}}}}{{Wrap|
 +
 
 +
|{{Subpages}}}}</includeonly>

Latest revision as of 13:16, 13 January 2020

Header for a family page.

  • Unnamed parameters: parent names interleaved with FamilySearch ID numbers, for linking (supports up to 6 parents)
  • surname: family's surname for sorting; defaults to the last word in the page name
  • child family: name of a child's own family page; multiple children may be separated by semicolons (;)
  • grandparent family: families to link to in which the parents are children, separated by semicolons (;)
  • other family: other related families to link to, separated by semicolons (;)
  • start year: Earliest relevant year in parents' adult life; default is marriage year or parent birth year+25 or parent death year-75
  • marriage year: Year of the primary couple's marriage or similar event; default is start year or parent birth year+25 or parent death year-75
  • parent birth year: Earliest year of a parent's birth; default is parent death year-100 or start year-25
  • parent death year: Latest year of a parent's death; default is parent birth year+100 or start year+75
  • residence: place where the family lived; multiple places separated by semicolons (;)
  • photo: name of a file to display at the top; does not include the "File:" namespace prefix (e.g., Family Picture.jpg)

Adds the Category:Family tag and sets Property:Surname, Property:Child Family, Property:Descendant Family, Property:Marriage Year, Property:Family Start Year, Property:Parent Birth Year, Property:Parent Death Year, and Property:Residence; creates link subobjects with Property:Child Link Family, Property:Child Link Index, Property:Grandparent Link Family, Property:Grandparent Link Index, Property:Residence Link Place, and Property:Residence Link Index.