Template:Webify: Difference between revisions
Jump to navigation
Jump to search
Created page with '{{#replace:{{#replace:{{#replace:{{{1}}}| |_}}|'|}}|.|}}<noinclude>Webify' |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{#replace:{{#replace:{{#replace:{{{1}}}| |_}}|'|}}|.|}}<noinclude>[[Category: | <includeonly>{{#ifeq:{{{2}}}|'|{{#replace:{{#replace:{{#replace:{{{1}}}| |_}}|'|}}|.|}}|{{#replace:{{#replace:{{{1}}}| |_}}|.|}}}}</includeonly><noinclude> | ||
{{Webify/doc}} | |||
[[Category:Webify templates|1]] |
Latest revision as of 17:44, 12 April 2016
Webify templates are not used on their own, but a suitable one may be used within another template which creates the URL for a weblink out of a name.
A website with multiple articles might create a webpage on, for example, East Lothian with a URL containing East_Lothian (apparently the most common usage). It might though use /eastlothian or /east-lothian. Choosing the right 'Webify' template can make the appropriate transformation:
- {{Webify}} would produce 'East_Lothian'
- {{Webify 0}} would produce 'eastlothian'
- {{Webify 2}} would produce 'east-lothian'
- {{Webify 2b}} would also produce 'east-lothian', but also change "Dunbar (East Lothian)" to 'dunbar-east-lothian'
- {{Webify 3}} would produce 'East-Lothian'
- {{Webify 3b}} would also produce 'East-Lothian', but also change "Dunbar (East Lothian)" to 'Dunbar--East-Lothian-'
- {{Webify 4}} would produce 'east_lothian', and also eliminates brackets
- {{Webify 5}} is a simpler transformation, and would produce 'East+Lothian', without changing any accented letter: it is mainly for query strings
Others may be added to this list.
[edit] [{{#invoke:Purge|main}}] Template documentation
Template loop detected: Template:Webify/doc
The above documentation is transcluded from Template:Webify/doc. (edit | history) Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |