|
|
| (5 intermediate revisions by 2 users not shown) |
| Line 1: |
Line 1: |
| − | {{#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}}|'|\'}}'
| + | |
| − | |data=name=name,relations=relations
| + | |
| − | }}
| + | |
| − | {{#ifeq:{{#external_value:relations}}| | | == Family ==
| + | |
| − | | + | |
| − | {{{!}}class="table table-striped sortable" {{!}}
| + | |
| − | !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}}}}
| + | |
| − | {{!}}-
| + | |
| − | }}
| + | |
| − | {{!}}} }}
| + | |
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.