Difference between revisions of "Template:PageNameTemplate"

From PKC
Jump to navigation Jump to search
 
(23 intermediate revisions by 2 users not shown)
Line 7: Line 7:
</noinclude>
</noinclude>


[{{#ifexpr: {{#len:{{{url}}} }} >0| }}{{#ask:
[[wikipedia:{{PAGENAME}}]]
}} {{PAGENAME}}]([[wikidata:Q{{{qCode}}}|Q{{{qCode}}}]])


{{#ifexpr: 3<5 | This expression is {{#expr: 0=0}} | This expression is evaluated to {{#expr: 9>9}} }}
{{#ifeq:  
 
  {{#len:{{{url|}}} }} | 0
#switch
| [[wikipedia:{{PAGENAME}}|{{PAGENAME}}]]
 
| [{{{url}}} {{PAGENAME}}] }}
{{#switch: comparison string
([[wikidata:Q{{{qCode}}}|Q{{{qCode}}}]])
| case = result
| case = result
| ...
| case = result
| default result
}}
 
 
{{#switch: test | Bar | {{#len:{{{url}}} }} >0 = Foo | baz = Baz }}

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}}}]])