Difference between revisions of "Template:ListEdges"
From AtlasWiki
(additional cases of FULLPAGENAME->PAGENAME) |
(Now lists inherited edges if a "parents" property is given a comma-separated list of all parents (intermediate work done at ListEdgesWIP)) |
||
Line 1: | Line 1: | ||
− | <noinclude>For use on node kind pages | + | <noinclude>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. | |
</noinclude>{{#ask: [[edge to {{PAGENAME}}::+]] | </noinclude>{{#ask: [[edge to {{PAGENAME}}::+]] | ||
| ?edge to {{PAGENAME}} | | ?edge to {{PAGENAME}} | ||
Line 26: | Line 26: | ||
{{!}}} | {{!}}} | ||
}}<noinclude><!-- | }}<noinclude><!-- | ||
+ | |||
+ | If we were given inheritance information, discover and list the inherited edges as well. | ||
+ | |||
+ | --></noinclude>{{#if:{{{parents|}}}|{{#arraydefine:parents|{{{parents}}}|,|}} | ||
+ | {{{!}} class="xcsgtable" | ||
+ | {{!}}- | ||
+ | ! Inherited From !! In Edge !! Predecessor (Comes From) !! Multiplicity !! Description | ||
+ | {{#arrayprint:parents||@@@@|  | ||
+ | {{InheritEdgesTo|@@@@}}}} | ||
+ | {{!}}} }}<noinclude><!-- | ||
Next we get the out edges: | Next we get the out edges: | ||
Line 43: | Line 53: | ||
}} }}<noinclude><!-- | }} }}<noinclude><!-- | ||
− | + | We print the out edges table: | |
--></noinclude>{{#switch:{{#arraysize:outEdges}}| 0 = | #default = | --></noinclude>{{#switch:{{#arraysize:outEdges}}| 0 = | #default = | ||
Line 52: | Line 62: | ||
{{!}}|var|[[{{#explode:var|$SEP$|0}}]] {{!}}{{!}} [[{{#explode:var|$SEP$|1}}]] {{!}}{{!}} {{#explode:var|$SEP$|2}} {{!}}{{!}} {{ReconstructLinks|{{#explode:var|$SEP$|3}}}} }} | {{!}}|var|[[{{#explode:var|$SEP$|0}}]] {{!}}{{!}} [[{{#explode:var|$SEP$|1}}]] {{!}}{{!}} {{#explode:var|$SEP$|2}} {{!}}{{!}} {{ReconstructLinks|{{#explode:var|$SEP$|3}}}} }} | ||
{{!}}} | {{!}}} | ||
− | }} | + | }}<noinclude><!-- |
+ | |||
+ | And the inherited out edges table: | ||
+ | |||
+ | --></noinclude>{{#if:{{{parents|}}}| | ||
+ | {{{!}} class="xcsgtable" | ||
+ | {{!}}- | ||
+ | ! Inherited From !! Out Edge !! Successor (Points To) !! Multiplicity !! Description | ||
+ | {{#arrayprint:parents||@@@@|  | ||
+ | {{InheritEdgesFrom|@@@@}}}} | ||
+ | {{!}}} }} |
Revision as of 18:17, 21 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.