« Modèle:Pagelang » : différence entre les versions

De wikarphy
m replace unnecessary old invokation of Template:PAGENAME by parser function "PAGENAME:"
m strip indentation whitespaces (template heavily used) to save 15-25 milliseconds per invokation (12-15ms used now), reducing it (in transclusions) to only 11 preprocessor nodes visited, 4 levels, 32 bytes expanded, 2-3 bytes tidied, no costly functions
Ligne 1 : Ligne 1 :
{{#ifeq:               {{#titleparts:{{PAGENAME}}||-1}}
{{#ifeq:{{#titleparts:{{PAGENAME}}||-1}}|{{#titleparts:{{PAGENAME}}|1}}||{{#ifeq:{{#titleparts:{{PAGENAME}}||-1}}|{{lc:{{PAGENAME:{{#titleparts:{{PAGENAME}}||-1}}}}}}|{{#ifeq:{{#titleparts:{{PAGENAME}}||-1}}|{{urlencode:{{#titleparts:{{PAGENAME}}||-1}}}}|{{#ifeq:{{lc:{{#titleparts:{{PAGENAME}}||-1}}}}|{{ucfirst:{{lc:{{#titleparts:{{PAGENAME}}||-1}}}}}}||{{#switch:{{#titleparts:{{PAGENAME}}||-1}}|doc|layout|sandbox|testcases=|#default={{#titleparts:{{PAGENAME}}||-1}}}}}}}}}}}}<noinclude>{{Documentation}}</noinclude>
|                     {{#titleparts:{{PAGENAME}}|1}}
|
| {{#ifeq:             {{#titleparts:{{PAGENAME}}||-1}}
  |   {{lc:{{PAGENAME:{{#titleparts:{{PAGENAME}}||-1}}}}}}
  | {{#ifeq:           {{#titleparts:{{PAGENAME}}||-1}}
    |     {{urlencode:{{#titleparts:{{PAGENAME}}||-1}}}}
    | {{#ifeq:   {{lc:{{#titleparts:{{PAGENAME}}||-1}}}}
      | {{ucfirst:{{lc:{{#titleparts:{{PAGENAME}}||-1}}}}}}
      |
      | {{#switch:     {{#titleparts:{{PAGENAME}}||-1}}
        | doc | layout | sandbox | testcases =
        | #default =   {{#titleparts:{{PAGENAME}}||-1}}
        }}
}}}}}}}}<noinclude>{{Documentation}}</noinclude>

Version du 27 mai 2014 à 22:59

{{#ifeq:{{#titleparts:Pagelang||-1}}|{{#titleparts:Pagelang|1}}||{{#ifeq:{{#titleparts:Pagelang||-1}}||{{#ifeq:{{#titleparts:Pagelang||-1}}|%7B%7B%23titleparts%3APagelang%7C%7C-1%7D%7D|{{#ifeq:{{#titleparts:pagelang||-1}}|{{#titleparts:pagelang||-1}}||{{#switch:{{#titleparts:Pagelang||-1}}|doc|layout|sandbox|testcases=|#default={{#titleparts:Pagelang||-1}}}}}}}}}}}}

Documentation du modèle

{{#if:|

[[Category:Template documentation pages{{#translation:}}]] }}