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))
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{#if: {{{page|}}}
 
{{#if: {{{page|}}}
 
   | {{#ifeq: {{#sub: {{{page|}}} | 0 | 2 }} | {{LeftSquareBracket}}{{LeftSquareBracket}}
 
   | {{#ifeq: {{#sub: {{{page|}}} | 0 | 2 }} | {{LeftSquareBracket}}{{LeftSquareBracket}}
       | {{#sub: {{{page|}}}
+
       | {{#if: {{{debug|}}} | found link }}{{#sub: {{{page|}}}
 
           | 3
 
           | 3
 
           | {{#expr: {{#pos: {{{page|}}}
 
           | {{#expr: {{#pos: {{{page|}}}
Line 9: Line 9:
 
             }}
 
             }}
 
         }}
 
         }}
 +
      | {{{page|}}}{{#if: {{{debug|}}} | found no link }}
 
     }}
 
     }}
 
}}<noinclude>
 
}}<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 |?<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)