Difference between revisions of "Template:Family"

From NorCon MUSH
m (Protected "Template:Family" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
−
<noinclude>Include the template <nowiki>{{Family}}</nowiki> followed by <nowiki>{{FamilyEnd}}</nowikI> to include a formatted table of your character's +sheet family relations.</noinclude><includeonly>{{#get_db_data:
+
<noinclude>Include the template <nowiki>{{Family}}</nowiki> followed by <nowiki>{{FamilyEnd}}</nowikI> to include a formatted table of your character's +sheet family relations.</noinclude>
−
db=norcon
+
−
|from=chars LEFT JOIN  `chars_relations` on chars.relations = chars_relations.id
+
−
|where=name='{{#replace:{{BASEPAGENAME}}|&#39;|\'}}'
+
−
|data=name=name,relations=relations
+
−
}}
+
−
{{#ifeq:{{#external_value:relations}}| | | == Family ==
+
−
 
+
−
{{{!}}class="table table-striped sortable" data-sort-value="Age"{{!}}
+
−
!Relationship
+
−
!Name
+
−
!Rank
+
−
!Age
+
−
{{!}}-{{#arraydefine:relations|{{#regex:{{#external_value:relations}}|/ /| ,}}}} {{
+
−
  #loop: i
+
−
  | 0                    <!-- loops start value for {{#var:i}} -->
+
−
  | {{#arraysize:relations}} <!-- number of loops -->
+
−
  | <nowiki/>
+
−
{{ #arraydefine: val | {{#arrayindex:relations| {{#var:i}} }} | :}} {{FamilyRelation |Relation={{#arrayindex: val | 0}} |Var={{#var:i}} |ID={{#arrayindex: val | 1}}}}
+
−
{{!}}-
+
−
}}
+
−
}}</includeonly>
+

Latest revision as of 09:48, 14 August 2025

Include the template {{Family}} followed by {{FamilyEnd}} to include a formatted table of your character's +sheet family relations.