Difference between revisions of "Template:InheritEdgesTo"

From AtlasWiki
Jump to: navigation, search
(switching from <onlyinclude> to <noinclude>)
(roll back to previous version until ready for transition)
 
(4 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
<pre>{| class="xcsgtable"
 
<pre>{| class="xcsgtable"
 
|-
 
|-
! Parent !! In Edge !! Multiplicity !! Description
+
! Parent !! In Edge !! Prececessor (Comes From) !! Multiplicity !! Description
{{InheritEdgesTo | parent}}
+
{{InheritEdgesTo|parent}}
{{InheritEdgesTo | other parent}}
+
{{InheritEdgesTo|other parent}}
 
...
 
...
 
|}</pre>
 
|}</pre>
Line 15: Line 15:
 
| format=array
 
| format=array
 
| headers=hide
 
| headers=hide
| propsep=$SEP$
 
 
| name=inEdges
 
| name=inEdges
 
}}<noinclude>
 
}}<noinclude>
Line 21: Line 20:
 
</noinclude>{{#switch:{{#arraysize:inEdges}}| 0 = | #default =  
 
</noinclude>{{#switch:{{#arraysize:inEdges}}| 0 = | #default =  
 
{{!}}-
 
{{!}}-
{{!}}{{#arrayprint:inEdges|{{!}}-
+
{{!}}{{#arrayprint:inEdges|&#32;
{{!}}|var|{{{1}}}{{!}}[[{{#explode:var|$SEP$|0}}]] {{!}}{{!}} [[{{#explode:var|$SEP$|1}}]] {{!}}{{!}} {{#explode:var|$SEP$|2}} {{!}}{{!}} {{ReconstructLinks|{{#explode:var|$SEP$|3}}}} }}  
+
{{!}}-
}}
+
{{!}}|var|{{#arraydefine:edgeRelationships|var|<PROP>|}}{{#arraydefine:relationships|{{#arrayindex:edgeRelationships|1}}|<MANY>|}}{{#arrayprint:relationships|&#32;
 +
{{!}}-
 +
{{!}}|@@@@|[[{{{1}}}]] {{!}}{{!}} [[{{#arrayindex:edgeRelationships|0}}]] {{!}}{{!}} [[{{#explode:@@@@|$SEP$|0}}]] {{!}}{{!}} {{#explode:@@@@|$SEP$|1}} {{!}}{{!}} {{ReconstructLinks|{{#explode:@@@@|$SEP$|2}}}} }} }}
 +
}}<noinclude>[[Category:XCSG Templates]]</noinclude>

Latest revision as of 18:58, 7 May 2014

Creates table rows listing edges that go to the specified parent.

The table is expected to be called with the following format:

{| class="xcsgtable"
|-
! Parent !! In Edge !! Prececessor (Comes From) !! Multiplicity !! Description
{{InheritEdgesTo|parent}}
{{InheritEdgesTo|other parent}}
...
|}