Difference between revisions of "Template:ListEdges.generateTable"
From AtlasWiki
Line 67: | Line 67: | ||
{{!}} |@@@@| {{#arraydefine:edges|{{#explode:@@@@|<PARENT>|1}}|<EDGE_SEP>|}} rowspan="{{#expr:{{#arrayprint:edges|+|####|{{#arraydefine:findSize|####|<MANY>}}{{#arraysize:findSize}}}}}}" {{!}} {{NameTrick|{{EnsureNamespace|{{#explode:@@@@|<PARENT>|0}}}}}} {{!}}{{!}} {{#arraydefine:firstEdge|{{#arrayindex:edges|0}}|<EDGE_PROP>}} {{#arraydefine:firstOrigins|{{#arrayindex:firstEdge|2}}|<MANY>}} rowspan="{{#arraysize:firstOrigins}}" {{!}} {{NameTrick|{{#arrayindex:firstEdge|0}}}} {{!}}{{!}} {{NameTrick|{{EnsureNamespace|{{#explode:{{#arrayindex:firstOrigins|0}}|<VAL>|0}}}}}} {{!}}{{!}} {{#explode:{{#arrayindex:firstOrigins|0}}|<VAL>|1}} {{!}}{{!}} rowspan="{{#arraysize:firstOrigins}}" {{!}} {{#arrayindex:firstEdge|1}} {{#arrayslice:restOfFirstOrigins|firstOrigins|1}} {{#arrayprint:restOfFirstOrigins||$$$$|  | {{!}} |@@@@| {{#arraydefine:edges|{{#explode:@@@@|<PARENT>|1}}|<EDGE_SEP>|}} rowspan="{{#expr:{{#arrayprint:edges|+|####|{{#arraydefine:findSize|####|<MANY>}}{{#arraysize:findSize}}}}}}" {{!}} {{NameTrick|{{EnsureNamespace|{{#explode:@@@@|<PARENT>|0}}}}}} {{!}}{{!}} {{#arraydefine:firstEdge|{{#arrayindex:edges|0}}|<EDGE_PROP>}} {{#arraydefine:firstOrigins|{{#arrayindex:firstEdge|2}}|<MANY>}} rowspan="{{#arraysize:firstOrigins}}" {{!}} {{NameTrick|{{#arrayindex:firstEdge|0}}}} {{!}}{{!}} {{NameTrick|{{EnsureNamespace|{{#explode:{{#arrayindex:firstOrigins|0}}|<VAL>|0}}}}}} {{!}}{{!}} {{#explode:{{#arrayindex:firstOrigins|0}}|<VAL>|1}} {{!}}{{!}} rowspan="{{#arraysize:firstOrigins}}" {{!}} {{#arrayindex:firstEdge|1}} {{#arrayslice:restOfFirstOrigins|firstOrigins|1}} {{#arrayprint:restOfFirstOrigins||$$$$|  | ||
{{!}}- | {{!}}- | ||
− | {{!}} | + | {{!}} {{NameTrick|{{EnsureNamespace|{{#explode:$$$$|<VAL>|0}}}}}} {{!}}{{!}} {{#explode:$$$$|<VAL>|1}} }} {{#arrayslice:restOfEdges|edges|1}} |
{{#arrayprint:restOfEdges||####|  | {{#arrayprint:restOfEdges||####|  | ||
{{!}}- | {{!}}- |
Revision as of 15:19, 23 October 2015
Requires five parameters:
title: the main title of the table, e.g. "Specified In Edges"
edgeTitle: the header to place above the edges column of the table, e.g. "In Edge"
nodeTitle: the header to place above the related node column of the table, e.g. "Origin"
uninheritedEdges: a list of edges which have a relationship specified with the node this table is being generated for
inheritedEdges: a list of edges which have a relationship specified with a parent of this node kind