Template:Italic title: Difference between revisions
From Vigyanwiki
Template>TheDJ (replace str sub with substr any. Fixes issues with diacritics. per talkpage request) |
Template>Thumperward (strip out excessive whitespace) |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:{{ | {{DISPLAYTITLE:{{#switch: | ||
#switch: | |||
{{#ifexpr: {{str find|{{PAGENAME}}|(}} != -1 | {{#ifexpr: {{str find|{{PAGENAME}}|(}} != -1 | ||
| 1 | | 1 | ||
Line 8: | Line 7: | ||
| 0 | | 0 | ||
}}{{str ≤ len | {{PAGENAME}} | 49 <!-- The max {{str find}} can handle is 50 --> | 1 | 0 }}<!-- | }}{{str ≤ len | {{PAGENAME}} | 49 <!-- The max {{str find}} can handle is 50 --> | 1 | 0 }}<!-- | ||
-->| 100 = {{#if:{{NAMESPACE}}| | |||
-->| 100 = {{ | {{NAMESPACE}}: | ||
}}{{#switch:{{PAGENAME}} | }}{{#switch:{{PAGENAME}} | ||
| {{{1}}} ({{{2|}}}) = ''{{{1}}}'' ({{{2|}}}) | | {{{1}}} ({{{2|}}}) = ''{{{1}}}'' ({{{2|}}}) | ||
Line 20: | Line 17: | ||
| #default = {{PAGENAME}} | | #default = {{PAGENAME}} | ||
}}<!-- | }}<!-- | ||
-->| 101 = {{#if:{{NAMESPACE}}| | |||
-->| 101 = {{ | {{NAMESPACE}}:}}''{{str left| {{PAGENAME}} | {{#expr:{{str find|{{PAGENAME}}|(}}-2}} }}'' {{substr any| {{PAGENAME}} | {{#expr: {{str find|{{PAGENAME}}|(}} - 1}} | {{#expr: {{str len|{{PAGENAME}}}} - {{str find|{{PAGENAME}}|(}} }} + 1 }} | ||
| 010 | | 010 | ||
| 011 | | 011 | ||
| 110 | | 110 | ||
| 111 | | 111 | ||
| 001 = {{ | | 001 = {{#if:{{NAMESPACE}}| | ||
{{NAMESPACE}}: | |||
}}''{{PAGENAME}}''<!-- | }}''{{PAGENAME}}''<!-- | ||
-->| 000 = {{FULLPAGENAME}}<!-- | -->| 000 = {{FULLPAGENAME}}<!-- | ||
-->}}}}<noinclude>{{documentation}}<!-- Add categories and interwikis to the /doc subpage, not here! --></noinclude> | |||
-->}}}}<noinclude> | |||
{{documentation}} | |||
<!-- Add categories and interwikis to the /doc subpage, not here! --> | |||
</noinclude> |
Revision as of 18:09, 28 July 2011
Template documentation
[create]