Template:Includeparent: Difference between revisions

From OER in Education
No edit summary
No edit summary
Line 22: Line 22:
|ug={{#vardefine:islocal|yes}}{{#vardefine:localcode|ug}}
|ug={{#vardefine:islocal|yes}}{{#vardefine:localcode|ug}}
|#default ={{#vardefine:islocal|no}}
|#default ={{#vardefine:islocal|no}}
}}<!--
-->{{#ifeq: {{#var:islocal}}|no|
{{#ifeq: {{#var:ispv}}|yes|{{#vardefine:includeparentdepth|-1}}
}}<!--
}}<!--
-->{{{{NAMESPACE}}:{{#titleparts: {{PAGENAME}} | {{#var:includeparentdepth}} }} }}<!--
-->{{{{NAMESPACE}}:{{#titleparts: {{PAGENAME}} | {{#var:includeparentdepth}} }} }}<!--

Revision as of 16:37, 8 January 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. {{#ifeq: no|no| {{Template: }}