Difference between revisions of "Template:PageLink to Name"

From ChatWars Wiki
Jump to: navigation, search
(updated template to only remove the links if the given string actually *is* a link (only if link is only thing in string))
Line 1: Line 1:
{{#if: {{{page|}}} | {{#sub:{{{page|}}}|3|{{#expr: {{#pos: {{{page|}}}|{{!}}|2}} - 3}} }} }}<noinclude>
+
{{#if: {{{page|}}}
 +
  | {{#ifeq: {{#sub: {{{page|}}} | 0 | 2 }} | {{LeftSquareBracket}}{{LeftSquareBracket}}
 +
      | {{#sub: {{{page|}}}
 +
          | 3
 +
          | {{#expr: {{#pos: {{{page|}}}
 +
                      | {{!}}
 +
                      | 2
 +
                    }} - 3
 +
            }}
 +
        }}
 +
    }}
 +
}}<noinclude>
 
This template converts an internal page link (eg: [[Coke|Coke]]) as they get generated by #ask |?{{PAGENAME}} to plain text name (eg: Coke)  
 
This template converts an internal page link (eg: [[Coke|Coke]]) as they get generated by #ask |?{{PAGENAME}} to plain text name (eg: Coke)  
 
[[Category:Template]]
 
[[Category:Template]]
 
</noinclude>
 
</noinclude>

Revision as of 22:30, 20 March 2019

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