Template:GetParent: Difference between revisions

From railML 2 Wiki
Jump to navigation Jump to search
[checked revision][checked revision]
No edit summary
No edit summary
 
Line 5: Line 5:
*1: The page name, optional; the default is the current page name via <nowiki>{{SUBPAGENAME}}</nowiki>
*1: The page name, optional; the default is the current page name via <nowiki>{{SUBPAGENAME}}</nowiki>
==Example==
==Example==
<pre>{{parent|IS:designator ocp}}</pre>returns:
<pre>{{getParent|IS:designator ocp}}</pre>returns:


{{parent|IS:designator ocp}}
{{getParent|IS:designator ocp}}


[[category:template]]
[[category:template]]
</noinclude>
</noinclude>

Latest revision as of 16:28, 21 March 2022

Usage

Returns the slug of a pagename. Template:Core returns the page name without the slug, and template:getParent tries to find the parent element.

Arguments

  • 1: The page name, optional; the default is the current page name via {{SUBPAGENAME}}

Example

{{getParent|IS:designator ocp}}

returns:

ocp