Template:Filename to sort key: Difference between revisions
(Created page with "<noinclude> This template is used in Template:Graphic to automatically populate the Property:Has sort key based on the name of the file page. See also Template:Ts-212 sort keys. <pre> {{Filename to sort key| {{PAGENAME}} }} </pre> </noinclude> {{#switch: {{#len: {{#explode:{{#explode:{{#explode:{{#explode:{{#explode:{{#explode:{{#explode:{{PAGENAME}}|v|0}}|r|0}}|a|0}}|b|0}}|.|0}}|,|1}}|-|0}} }} | 1 = {{#explode:{{PAGENAME}}|,|0}},00{{#explode:{{PAGENAME}}|...") |
No edit summary |
||
Line 6: | Line 6: | ||
</pre> | </pre> | ||
</noinclude> | </noinclude> | ||
{{#switch: {{#len: {{#explode:{{#explode:{{#explode:{{#explode:{{#explode:{{#explode:{{#explode:{{ | {{#switch: {{#len: {{#explode:{{#explode:{{#explode:{{#explode:{{#explode:{{#explode:{{#explode:{{{1}}}|v|0}}|r|0}}|a|0}}|b|0}}|.|0}}|,|1}}|-|0}} }} | ||
| 1 = {{#explode:{{ | | 1 = {{#explode:{{{1}}}|,|0}},00{{#explode:{{{1}}}|,|1}} | ||
| 2 = {{#explode:{{ | | 2 = {{#explode:{{{1}}}|,|0}},0{{#explode:{{{1}}}|,|1}} | ||
| {{ | | {{{1}}} | ||
}} | }} |
Revision as of 15:06, 10 November 2024
This template is used in Template:Graphic to automatically populate the Property:Has sort key based on the name of the file page. See also Template:Ts-212 sort keys.
{{Filename to sort key| {{PAGENAME}} }}
{{{1}}}