Template:ContentPartsTemplate: Difference between revisions

From IMAGE
Jump to navigation Jump to search
No edit summary
No edit summary
Line 8: Line 8:
</pre>
</pre>
</noinclude><includeonly>
</noinclude><includeonly>
{{#ifexpr:{{PropertyTestTemplate|prop=belongsToPage|page={{BASENAME}}|reverse=1}}>0|
<noinclude>
  <table align="left" class="toc">
Template to display the subpages of a page. subpage = 0 means main page and subpage = 1 subpage.
  <tr><td><div><b>{{{PagePartHeader|}}}</b></div>
It should be called in the following format:
<pre>
{{ContentPartsTemplate
|PagePartHeader=
|subpage
}}
</pre>
</noinclude><includeonly>
{{#ifexpr:{{{subpage|}}}|
<table align="left" class="toc"><tr><td><div><b>{{{PagePartHeader|}}}</b></div>
   <ol>
   <ol>
  {{#ask:[[{{BASENAME}}]]  
{{#ask:[[{{#titleparts: {{PAGENAME}}|1}}]]|mainlabel=|? HasPageLabel=|link=none|format=template|template=PagePartTemplate}}
    |mainlabel=
{{#ask: [[BelongsToPage:: {{#titleparts: {{PAGENAME}}|1}} ]]|mainlabel=|? HasPageLabel=|? HasSequence=|sort=HasSequence|link=none|format=template|template=PagePartTemplate}}
    |? HasPageLabel=
</ol>
    |link=none
  </td></tr>
    |format=template
</table>
    |template=PagePartTemplate
|
  }}
{{#ifexpr:{{PropertyTestTemplate|prop=belongsToPage|page={{PAGENAME}}|reverse=1}}>0|
  {{#ask: [[BelongsToPage::{{BASENAME}}]]
<table align="left" class="toc"><tr><td><div><b>{{{PagePartHeader|}}}</b></div>
    |mainlabel=
  <ol>
    |? HasPageLabel=
{{#ask:[[{{PAGENAME}}]]|mainlabel=|? HasPageLabel=|link=none|format=template|template=PagePartTemplate}}
    |? HasSequence=
{{#ask: [[BelongsToPage:: {{PAGENAME}}]]|mainlabel=|? HasPageLabel=|? HasSequence=|sort=HasSequence|link=none|format=template|template=PagePartTemplate}}
    |sort=HasSequence
</ol></td></tr>
    |link=none
    |format=template
    |template=PagePartTemplate
    }}
  </ol>
  </td></tr>
</table>
</table>
|}}
|}}
   
   
 
}}
<!-- <div style="text-indent:50px">Additional info  
<!-- <div style="text-indent:50px">Additional info  
  <ul><li>Learning technology and something</li> </ul></div>-->
  <ul><li>Learning technology and something</li> </ul></div>-->

Revision as of 16:10, 10 January 2014

Template to display the subpages of a page. subpage = 0 means main page and subpage = 1 subpage. It should be called in the following format:

{{ContentPartsTemplate
|PagePartHeader=
}}