Template:ContentPartsTemplate: Difference between revisions

From IMAGE
Jump to navigation Jump to search
No edit summary
No edit summary
 
(32 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
Template to display the subpages of a page. subpage = 0 means main page and subpage = 1 subpage.
Template to display main page and subpages of an 'object'
It should be called in the following format:
<pre>
<pre>
{{ContentPartsTemplate
{{ContentPartsTemplate
|PagePartHeader=
|PagePartHeader=
|subpage
}}
}}
</pre>
</pre>
</noinclude><includeonly>
</noinclude><includeonly>
{{#ifexpr:{{{subpage|}}}|
{{#ifexpr:{{PropertyTestTemplate
<table align="left" class="toc"><tr><td><div><b>{{{PagePartHeader|}}}</b></div> 
  |prop=BelongsToPage
   <ol>
   |page= {{#titleparts:{{FULLPAGENAME}}|1}}
{{#ask:[[{{#titleparts: {{PAGENAME}}|1}}]]|mainlabel=|? HasPageLabel=|link=none|format=template|template=PagePartTemplate}}
  |reverse=1}}>0
{{#ask: [[BelongsToPage:: {{#titleparts: {{PAGENAME}}|1}} ]]|mainlabel=|? HasPageLabel=|? HasSequence=|sort=HasSequence|link=none|format=template|template=PagePartTemplate}}
</ol>
<div><b>Additional info</b></div> 
<ul><li>Learning technology and something</li> </ul>
  </td></tr>
</table>
|
|
{{#ifexpr:{{PropertyTestTemplate|prop=belongsToPage|page={{PAGENAME}}|reverse=1}}>0|
  <div class="toc">
<table align="left" class="toc"><tr><td><div><b>{{{PagePartHeader|}}}</b></div>
<strong>{{{PagePartHeader|}}}</strong>
   <ol>
   <ol>
{{#ask:[[{{PAGENAME}}]]|mainlabel=|? HasPageLabel=|link=none|format=template|template=PagePartTemplate}}
  {{#ask:[[ {{#titleparts:{{FULLPAGENAME}}|1}}]][[!AggregatedComponent]]
{{#ask: [[BelongsToPage:: {{PAGENAME}}]]|mainlabel=|? HasPageLabel=|? HasSequence=|sort=HasSequence|link=none|format=template|template=PagePartTemplate}}
  |mainlabel=
</ol></td></tr>
  |? HasPageLabel=
</table>
  |link=none
  |format=Plainlist
  |template=PagePartTemplate
  }}
  {{#ask:[[BelongsToPage::{{#titleparts: {{FULLPAGENAME}}|1}}]][[!AggregatedComponent]]
  |mainlabel=
  |? HasPageLabel=
  |? HasSequence=
  |sort=HasSequence
  |link=none
  |format=Plainlist
  |template=PagePartTemplate
  }}{{addInfoPartsTemplate}}</ol></div>
|}}
|}}
}}

Latest revision as of 16:50, 10 March 2020

Template to display main page and subpages of an 'object'

{{ContentPartsTemplate
|PagePartHeader=
}}