Difference between revisions of "Template:ListEdges.generateTable"
From AtlasWiki
(Switching from "pipe trick" to PipeTrick template, because attempting the pipe trick breaks things unless it's necessary) |
(Moving one of the PipeTrick calls to the correct location (note: the calls are necessary because the regular pipe trick doesn't work at all from templates, not for the reason previously stated)) |
||
Line 56: | Line 56: | ||
{{!}}{{#arrayprint:uninheritedEdges|  | {{!}}{{#arrayprint:uninheritedEdges|  | ||
{{!}}- | {{!}}- | ||
− | {{!}}|var|{{#arraydefine:edgeRelationships|var|<PROP>|}}{{#arraydefine:relationships|{{#arrayindex:edgeRelationships|1}}|<MANY>|}} rowspan="{{#arraysize:relationships}}" {{!}} | + | {{!}}|var|{{#arraydefine:edgeRelationships|var|<PROP>|}}{{#arraydefine:relationships|{{#arrayindex:edgeRelationships|1}}|<MANY>|}} rowspan="{{#arraysize:relationships}}" {{!}} {{PipeTrick|{{#arrayindex:edgeRelationships|0}}}} {{!}}{{!}} [[{{#explode:{{#arrayindex:relationships|0}}|$SEP$|0}}}}]] {{!}}{{!}} {{#explode:{{#arrayindex:relationships|0}}|$SEP$|1}} {{!}}{{!}} rowspan="{{#arraysize:relationships}}" {{!}} {{ReconstructLinks|{{#explode:{{#arrayindex:relationships|0}}|$SEP$|2}}}} {{#arrayslice:relationships|relationships|1}} {{#arrayprint:relationships||@@@@|  |
{{!}}- | {{!}}- | ||
{{!}} [[{{#explode:@@@@|$SEP$|0}}]] {{!}}{{!}} {{#explode:@@@@|$SEP$|1}} }} }} }} | {{!}} [[{{#explode:@@@@|$SEP$|0}}]] {{!}}{{!}} {{#explode:@@@@|$SEP$|1}} }} }} }} |
Revision as of 15:36, 12 May 2014
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