Template:Title Only: Difference between revisions

From Rlyehwiki
Jump to navigation Jump to search
(Created page with "<includeonly>{{#if: {{#pos:{{{1}}}|(}} | {{#sub:{{#if: {{#pos:{{{1}}}|:}} | {{#sub:{{{1}}}|{{#expr: {{#pos:{{{1}}}|:}} + 1}} }} | {{{1}}} }}|0|{{#expr:{{#pos:{{#if: {{#pos:{{{...")
 
No edit summary
 
Line 1: Line 1:
<includeonly>{{#if: {{#pos:{{{1}}}|(}} | {{#sub:{{#if: {{#pos:{{{1}}}|:}} | {{#sub:{{{1}}}|{{#expr: {{#pos:{{{1}}}|:}} + 1}} }} | {{{1}}} }}|0|{{#expr:{{#pos:{{#if: {{#pos:{{{1}}}|:}} | {{#sub:{{{1}}}|{{#expr: {{#pos:{{{1}}}|:}} + 1}} }} | {{{1}}} }}|(}} - 1 }}}}{{#sub:{{{1}}}|{{#expr: {{#pos:{{{1}}}|)}}+1}}}} | {{#if: {{#pos:{{{1}}}|:}} | {{#sub:{{{1}}}|{{#expr: {{#pos:{{{1}}}|:}} + 1}} }} | {{{1}}} }} }}</includeonly><noinclude>{{documentation}}</noinclude>
<includeonly>{{#if: {{#pos:{{{1}}}|(}} | {{#sub:{{#if: {{#pos:{{{1}}}|:}} | {{#sub:{{{1}}}|{{#expr: {{#pos:{{{1}}}|:}} + 1}} }} | {{{1}}} }}|0|{{#expr:{{#pos:{{#if: {{#pos:{{{1}}}|:}} | {{#sub:{{{1}}}|{{#expr: {{#pos:{{{1}}}|:}} + 1}} }} | {{{1}}} }}|(}} - 1 }}}}{{#sub:{{{1}}}|{{#expr: {{#pos:{{{1}}}|)}}+1}}}} | {{#if: {{#pos:{{{1}}}|:}} | {{#sub:{{{1}}}|{{#expr: {{#pos:{{{1}}}|:}} + 1}} }} | {{{1}}} }} }}</includeonly><noinclude>
Turns a page name like "SRD:Rogue (Disambiguation)" into "Rogue". Useful if you need to use <nowiki>{{PAGENAME}}</nowiki> to get the title of the page in an automated fashion, but don't want the namespace or tag.
 
'''Usage:''' <nowiki>{{Title Only|{{PAGENAME}}}}</nowiki> on this page becomes {{Title Only|{{PAGENAME}}}}
 
[[Category:Templates]]
</noinclude>

Latest revision as of 11:26, 17 September 2019

Turns a page name like "SRD:Rogue (Disambiguation)" into "Rogue". Useful if you need to use {{PAGENAME}} to get the title of the page in an automated fashion, but don't want the namespace or tag.

Usage: {{Title Only|{{PAGENAME}}}} on this page becomes Title Only