Template:GetParent: Difference between revisions

From railML 2 Wiki
Jump to navigation Jump to search
[checked revision][checked revision]
(Created page with "<includeonly>{{#explode:{{{1|{{SUBPAGENAME}}}}}| |-1}}</includeonly><noinclude> ==Usage== Returns the slug of a pagename. Template:Core returns the page name without the s...")
 
No edit summary
Line 7: Line 7:
<pre>{{parent|IS:designator ocp}}</pre>returns:
<pre>{{parent|IS:designator ocp}}</pre>returns:


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


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

Revision as of 16:27, 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

{{parent|IS:designator ocp}}

returns:


[[{{{subschema}}}:{{{name}}}]]