Difference between revisions of "Template:ListEdges.generateTable"

From AtlasWiki
Jump to: navigation, search
(re-doing possible fix, seems the page I tested on is now broken somehow...not sure what went wrong)
(Another possible source of missing new lines)
Line 71: Line 71:
 
{{!}}-
 
{{!}}-
 
{{!}}{{#arraydefine:edge|####|<EDGE_PROP>}} {{#arraydefine:origins|{{#arrayindex:edge|2}}|<MANY>}} rowspan="{{#arraysize:origins}}" {{!}} {{PipeTrick|{{#arrayIndex:edge|0}}}} {{!}}{{!}} [[{{#explode:{{#arrayindex:origins|0}}|<VAL>|0}}]] {{!}}{{!}} {{#explode:{{#arrayindex:origins|0}}|<VAL>|1}} {{!}}{{!}} rowspan="{{#arraysize:origins}}" {{!}} {{#arrayIndex:edge|1}}
 
{{!}}{{#arraydefine:edge|####|<EDGE_PROP>}} {{#arraydefine:origins|{{#arrayindex:edge|2}}|<MANY>}} rowspan="{{#arraysize:origins}}" {{!}} {{PipeTrick|{{#arrayIndex:edge|0}}}} {{!}}{{!}} [[{{#explode:{{#arrayindex:origins|0}}|<VAL>|0}}]] {{!}}{{!}} {{#explode:{{#arrayindex:origins|0}}|<VAL>|1}} {{!}}{{!}} rowspan="{{#arraysize:origins}}" {{!}} {{#arrayIndex:edge|1}}
{{#arrayslice:restOfOrigins|origins|1}} {{#arrayprint:restOfOrigins||$$$$|{{!}}-
+
{{#arrayslice:restOfOrigins|origins|1}} {{#arrayprint:restOfOrigins||$$$$|&#32;
 +
{{!}}-
 
{{!}} [[{{#explode:$$$$|<VAL>|0}}]] {{!}}{{!}} {{#explode:$$$$|<VAL>|1}} }} }} }} }}
 
{{!}} [[{{#explode:$$$$|<VAL>|0}}]] {{!}}{{!}} {{#explode:$$$$|<VAL>|1}} }} }} }} }}
 
{{!}}}
 
{{!}}}
 
}}
 
}}

Revision as of 20:03, 21 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