Template:Path: Difference between revisions
Jump to navigation
Jump to search
Bug:Characters "<" and ">" can break the template partially. Use <nowiki> as a workaround.
Mailmanmicky (talk | contribs) m (test) |
mNo edit summary |
||
Line 5: | Line 5: | ||
* Use executable icon if {{param|2}} is "exe", "bat", "sh", "com", "app", or any other executable applications. | * Use executable icon if {{param|2}} is "exe", "bat", "sh", "com", "app", or any other executable applications. | ||
* Otherwise, use generic file icon if {{param|2}} exists.}} | * Otherwise, use generic file icon if {{param|2}} exists.}} | ||
{{ | {{Bug|Characters "<" and ">" can break the template partially. Use {{code|<nowiki><nowiki></nowiki>}} as a workaround.{{todo|Remove unnecessary (redundant) tooltip span that does this.}}}}{{Doc}}<includeonly><onlyinclude><!-- | ||
{{Doc}} | |||
<includeonly><onlyinclude><!-- | |||
--><span title="{{#switch:{{{icon}}} | --><span title="{{#switch:{{{icon}}} | ||
|#default={{Path/strings|Path}} {{{1|}}}{{#if:{{{2|}}}|.{{{2}}}|}} | |#default={{Path/strings|Path}} {{{1|}}}{{#if:{{{2|}}}|.{{{2}}}|}} |
Revision as of 18:11, 23 July 2023
Todo: Automatic icons (should be case insensitive):
- Use music icon if {{{2}}} is "wav", "mp3", "ogg", "vsnd_c", or any other audio formats.
- Use video icon if {{{2}}} is "bik", "avi", "wmv", "mov", "webm", "mp4", or any other video formats.
- Use picture icon if {{{2}}} is "jpg", "bmp", "tga", "vtf", "vtex_c", "spr", "png", or any other image and texture formats.
- Use executable icon if {{{2}}} is "exe", "bat", "sh", "com", "app", or any other executable applications.
- Otherwise, use generic file icon if {{{2}}} exists.

Todo: Remove unnecessary (redundant) tooltip span that does this.
[todo tested in ?]The above documentation is transcluded from Template:Path/doc. (Edit | Page history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.