Difference between revisions of "Template:SubPages"

From Wikispooks
Jump to navigation Jump to search
(clarify how it works)
m (Text replacement - "captionPlural" to "caption_plural")
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>[[category:Semantic Templates]]This semantic template creates a section heading plus a list of sub-pages of an event, by reading [[Property:Has subEvent]] and [[Property:Has aspect]].''<br/></noinclude><includeonly>{{SMWDocSection
+
<noinclude>[[category:Semantic Templates]]'''This semantic template creates a section heading plus a list of subpages and their descriptions.''' it is probably best used immediately after a page's object template. Since September 2014, all pages with an infobox automatically include a list of subpages in that, so use of this template is optional (but recommended).<br/><br/>
|expression= [[-Has subEvent::{{FULLPAGENAME}}]] OR [[-Has aspect::{{FULLPAGENAME}}]]
+
It works by checking [[Property:Has parentFullPageName]] and [[Property:Has fullPageName]].'''<br/>
|captionSingular= Sub-Page
+
''It only includes sub-pages which have these properties set - so in order to show up, subpages have to include [[Template:SMWDocs]]''.
|captionPlural= Sub-Pages
+
</noinclude><includeonly>{{SMWDocSection
 +
|expression= [[Has parentFullPageName::{{FULLPAGENAME}}]][[Has fullPageName::~{{FULLPAGENAME}}/*]]
 +
<!-- Older way of doing it, that didn't catch all subpages
 +
 
 +
[[-Has subEvent::{{FULLPAGENAME}}]] OR [[-Has aspect::{{FULLPAGENAME}}]]
 +
 
 +
We might want to do something special with these.
 +
For now, keep it simple.
 +
 
 +
-->
 +
|caption_singular= Sub-Page
 +
|caption_plural= Sub-Pages
 
|mainlabel =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Page&nbsp;Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
|mainlabel =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Page&nbsp;Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|properties=Description
+
|properties=Has revisionSize/Description
|headers=Description
+
|headers=Size/Description
 
}}<includeonly>
 
}}<includeonly>

Latest revision as of 13:27, 15 January 2016

This semantic template creates a section heading plus a list of subpages and their descriptions. it is probably best used immediately after a page's object template. Since September 2014, all pages with an infobox automatically include a list of subpages in that, so use of this template is optional (but recommended).

It works by checking Property:Has parentFullPageName and Property:Has fullPageName.
It only includes sub-pages which have these properties set - so in order to show up, subpages have to include Template:SMWDocs.