Template:Includeparent: Difference between revisions
From OER in Education
No edit summary |
No edit summary |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude>[[Category:LocalisationTemplates]] | ||
If a page is generated using this template, then #var:includeparent = yes | If a page is generated using this template, then #var:includeparent = yes | ||
If a page is a PV page, then #var: | If a page is a PV page, then #var:ispv = yes, otherwise no | ||
If the page is a localised page #var:islocal = yes, otherwise no | If the page is a localised page #var:islocal = yes, otherwise no | ||
Line 21: | Line 21: | ||
|sl={{#vardefine:islocal|yes}}{{#vardefine:localcode|sl}} | |sl={{#vardefine:islocal|yes}}{{#vardefine:localcode|sl}} | ||
|ug={{#vardefine:islocal|yes}}{{#vardefine:localcode|ug}} | |ug={{#vardefine:islocal|yes}}{{#vardefine:localcode|ug}} | ||
|gh={{#vardefine:islocal|yes}}{{#vardefine:localcode|gh}} | |||
|#default ={{#vardefine:islocal|no}} | |#default ={{#vardefine:islocal|no}} | ||
}}<!-- | }}<!-- | ||
-->{{: {{#titleparts: {{PAGENAME}} | {{#var:includeparentdepth}} }} }}<!-- | -->{{#ifeq: {{#var:islocal}}|no| | ||
{{#ifeq: {{#var:ispv}}|yes|{{#vardefine:includeparentdepth|-1}} }} | |||
}}<!-- | |||
-->{{{{NAMESPACE}}:{{#titleparts: {{PAGENAME}} | {{#var:includeparentdepth}} }} }}<!-- | |||
-->{{#ifeq: {{{diag|}}}|1| | -->{{#ifeq: {{{diag|}}}|1| | ||
* includeparent: {{#var:includeparent}} | * includeparent: {{#var:includeparent}} | ||
Line 30: | Line 34: | ||
* ispv = {{#var:ispv}} | * ispv = {{#var:ispv}} | ||
* includeparentdepth = {{#var:includeparentdepth}} | * includeparentdepth = {{#var:includeparentdepth}} | ||
* #titleparts: PAGENAME | * #titleparts: PAGENAME includeparentdepth = {{#titleparts:{{PAGENAME}} | 1 | {{#var:includeparentdepth}} }} | ||
* islocal = {{#var: | * islocal = {{#var:islocal}} | ||
* localcode = {{#var:localcode}} | * localcode = {{#var:localcode}} | ||
}} | }} |
Latest revision as of 13:09, 18 February 2015
If a page is generated using this template, then #var:includeparent = yes
If a page is a PV page, then #var:ispv = yes, otherwise no
If the page is a localised page #var:islocal = yes, otherwise no
If the page is local, #var:localcode = zm, ke, rw, sl, ug, etc.
On a page called PAGE/localcode/pv, PAGE is included, on a page called PAGE/pv, PAGE is included.
if you add
|diag=1
then some diagnostic information is printed at the end of the page. {{Template: }}