Difference between revisions of "Template:ListEdges"
From AtlasWiki
(fix missing close braces for additional arrayprint) |
(Support for out edges of the same kind from different node kinds) |
||
Line 52: | Line 52: | ||
| format=array | | format=array | ||
| headers=hide | | headers=hide | ||
− | |||
| name=outEdges | | name=outEdges | ||
}}<noinclude><!-- | }}<noinclude><!-- | ||
Line 64: | Line 63: | ||
We print the out edges table: | We print the out edges table: | ||
− | --></noinclude>{{#switch:{{#arraysize:outEdges}}| 0 = | #default = | + | --></noinclude>{{#switch:{{#arraysize:outEdges}}| 0 = | #default = |
{{{!}} class="xcsgtable" | {{{!}} class="xcsgtable" | ||
! Out Edge !! Successor (Points To) !! Multiplicity !! Description | ! Out Edge !! Successor (Points To) !! Multiplicity !! Description | ||
{{!}}- | {{!}}- | ||
{{!}}{{#arrayprint:outEdges|{{!}}- | {{!}}{{#arrayprint:outEdges|{{!}}- | ||
− | {{!}}|var| | + | {{!}}|var|{{#arraydefine:edgeRelationships|var|<PROP>|}}{{#arraydefine:relationships|{{#arrayindex:edgeRelationships|1}}|<MANY>|}}{{#arrayprint:relationships|  |
+ | {{!}}- | ||
+ | {{!}}|@@@@|[[{{#arrayindex:edgeRelationships|0}}]] {{!}}{{!}} [[{{#explode:@@@@|$SEP$|0}}]] {{!}}{{!}} {{#explode:@@@@|$SEP$|1}} {{!}}{{!}} {{ReconstructLinks|{{#explode:@@@@|$SEP$|2}}}} }} }} | ||
{{!}}} | {{!}}} | ||
}}<noinclude><!-- | }}<noinclude><!-- |
Revision as of 15:19, 22 April 2014
For use on node kind pages, automatically lists edges declared on the current page.
If the parameter "parents" is given a comma-separated list of the parents of the node, inherited edges will also be listed.