Difference between revisions of "Template:PageNameTemplate"

From PKC
Jump to navigation Jump to search
 
(One intermediate revision by one other user not shown)
Line 8: Line 8:




[[
{{#switch: {{#len:{{{url}}} }} | {{{url}}} | wikipedia:{{PAGENAME}} }}  {{PAGENAME}}
]]
([[wikidata:Q{{{qCode}}}|Q{{{qCode}}}]])
[
{{#ifeq:  
{{#ifeq:  
   {{#len:{{{url|}}} }} | 0  
   {{#len:{{{url|}}} }} | 0  
| [wikipedia:{{PAGENAME}}|{{PAGENAME}}]
| [[wikipedia:{{PAGENAME}}|{{PAGENAME}}]]
| {{{url}}} {{PAGENAME}} }}  
| [{{{url}}} {{PAGENAME}}] }}  
]
([[wikidata:Q{{{qCode}}}|Q{{{qCode}}}]])
 
{{#switch:  
{{#ifeq:
  {{#len:{{{url|}}} }} | 0
| equal
| not equal}}  
| not equal = {{{url}}}  
| equal = wikipedia:{{PAGENAME}}
}}

Latest revision as of 12:17, 9 July 2022

This template can be used as follows:

{{PageNameTemplate
 |qCode=Q[0-9]*
 |url={{{url}}}
 }}


PageNameTemplate ([[wikidata:Q{{{qCode}}}|Q{{{qCode}}}]])