Difference between revisions of "Template:PageLink to Name"

From ChatWars Wiki
Jump to: navigation, search
(Created page with "{{#sub:{{{page|}}}|3|{{#expr: {{#pos: {{{page|}}}|{{!}}|2}} - 3}} }} <noinclude> This template converts an internal page link (eg: Coke) as they get generated by #ask...")
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#sub:{{{page|}}}|3|{{#expr: {{#pos: {{{page|}}}|{{!}}|2}} - 3}} }}
+
{{#if: {{{page|}}}
<noinclude>
+
  | {{#ifeq: {{#sub: {{{page|}}} | 0 | 2 }} | {{LeftSquareBracket}}{{LeftSquareBracket}}
This template converts an internal page link (eg: [[Coke|Coke]]) as they get generated by #ask |?{{PAGENAME}} to plain text name (eg: Coke)  
+
      | {{#if: {{{debug|}}} | found link }}{{#sub: {{{page|}}}
 +
          | 3
 +
          | {{#expr: {{#pos: {{{page|}}}
 +
                      | {{!}}
 +
                      | 2
 +
                    }} - 3
 +
            }}
 +
        }}
 +
      | {{{page|}}}{{#if: {{{debug|}}} | found no link }}
 +
    }}
 +
}}<noinclude>
 +
This template converts an internal page link (eg: [[Coke|Coke]]) as they get generated by #ask |?<nowiki>{{PAGENAME}}</nowiki> to plain text name (eg: Coke)  
 
[[Category:Template]]
 
[[Category:Template]]
 
</noinclude>
 
</noinclude>

Latest revision as of 06:00, 21 March 2019

This template converts an internal page link (eg: Coke) as they get generated by #ask |?{{PAGENAME}} to plain text name (eg: Coke)