Template:Path: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 7: Line 7:
|#default={{Path/strings|Path}} {{{1|}}}{{#if:{{{2|}}}|.{{{2}}}|}}
|#default={{Path/strings|Path}} {{{1|}}}{{#if:{{{2|}}}|.{{{2}}}|}}
|exe={{Path/strings|exe}} - {{{1|}}}{{#if:{{{2|}}}|.{{{2}}}|}}
|exe={{Path/strings|exe}} - {{{1|}}}{{#if:{{{2|}}}|.{{{2}}}|}}
|execustom={{Path/strings|File}} - {{{1|}}}{{#if:{{{2|}}}|.{{{2}}}|}}<!-- Currently generic for now -->
|custom={{Path/strings|File}} - {{{1|}}}{{#if:{{{2|}}}|.{{{2}}}|}}<!-- Currently generic for now -->
|audio|sound|music={{Path/strings|Audio}} - {{{1|}}}{{#if:{{{2|}}}|.{{{2}}}|}}<!-- TODO: Automatically change the icon based of file format-->
|audio|sound|music={{Path/strings|Audio}} - {{{1|}}}{{#if:{{{2|}}}|.{{{2}}}|}}<!-- TODO: Automatically change the icon based of file format-->
|video|movie={{Path/strings|Video}} - {{{1|}}}{{#if:{{{2|}}}|.{{{2}}}|}}
|video|movie={{Path/strings|Video}} - {{{1|}}}{{#if:{{{2|}}}|.{{{2}}}|}}
Line 18: Line 18:
|#default=icon-folder open-filled.png
|#default=icon-folder open-filled.png
|exe=Icon-Windows_Executable.png
|exe=Icon-Windows_Executable.png
|execustom={{{customico}}}
|custom={{{customico}}}
|audio|sound|music=Icon-Music-Note.png
|audio|sound|music=Icon-Music-Note.png
|video|movie=Icon-Video_File-filled.png
|video|movie=Icon-Video_File-filled.png
Line 27: Line 27:
|#default={{Path/strings|Folder}}
|#default={{Path/strings|Folder}}
|exe=Windows EXE
|exe=Windows EXE
|execustom=Windows EXE
|custom=Custom Icon
|audio|sound|music={{Unicode|♪}}
|audio|sound|music={{Unicode|♪}}
|video|movie={{Unicode|[►]}}
|video|movie={{Unicode|[►]}}

Revision as of 09:01, 1 July 2023

Todo: Automatically use music icon if {{{2}}} is "wav", "mp3", "ogg", "vsnd_c" or any other audio formats.
Automatically use video icon if {{{2}}} is "bik", "avi", "wmv", "mov", "webm", "mp4" or any other video formats.
Automatically use picture icon if {{{2}}} is "jpg", "bmp", "tga", "vtf" or any other image and texture formats.
Todo: Generic "file" icon (sheet of paper with bent corner), to use if path target is file.

Template:ModernBug

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history
Icon-translate.png
This template uses a strings subpage
Please follow the format on this subpage(s) to add translations.

The path to the folder or file. {{file}} aliases here.

Parameters and Examples

Parameter Description Examples Preview
{{{1}}} The path to the folder or file.
{{Path|C:\Program Files\Steam}}
FolderC:\Program Files\Steam
{{{2}}} File extension, if any. Omit the dot.
{{Path|D:\Program Files\Steam\steam|exe}}
{{Path|de_dust2|bsp}}
{{Path|materials\debug\debugempty|vtf}}
FolderD:\Program Files\Steam\steam.exe
Folderde_dust2.bsp
Foldermaterials\debug\debugempty.vtf
{{{select}}} Text selection mode based on the CSS property user-select.
No effect on some browsers.
Warning.pngWarning:select=none is likely to cause user frustration; use sparingly.
{{Path|select=none|C:\Program Files}}
{{Path|select=all|C:\Program Files}}
FolderC:\Program Files
FolderC:\Program Files
{{{icon}}}
{{{customico}}}
Changes the icon. The tooltip (which appears if you are hovering the text or the icon itself), will have it's text changed aswell.

If the images is disabled in your browser or when a new icon file is being uploaded, it may fallback to Unicode symbols or simple text.

{{{customico}}} is used to change to any icon if you want. Tooltip will likely be limited with this method, which only refers custom icon as a generic file, and may cause a scaling bug (more noticeable when zooming in).
Executable:
{{Path|hl2|exe|icon=exe}}
Registry path:
{{Path|Computer\HKEY_CURRENT_USER\SOFTWARE\Valve\Source|icon=reg}}
Registry value:
{{Path|DXLevel_V1|icon=regv}}
Audio/Music:
{{Path|Half-Life01|mp3|icon=audio}}
Videos:
{{Path|valve|bik|icon=video}}
File (generic):
{{Path|example|sound.cache|icon=file}}
Image:
{{Path|d1_trainstation_010000|jpg|icon=image}}
Texture (currently same icon, but this will likely change):
{{Path|alyx_sheet|vtf|icon=texture}}
Custom icon:
{{Path|hl2|exe|icon=custom|customico=HL2-hires.png}}
Windows EXEhl2.exe
FolderHKEY_CURRENT_USER\SOFTWARE\Valve\Source
FolderDXLevel_V1
♪Half-Life01.mp3
[►]valve.bik
Fileexample.sound.cache
Imaged1_trainstation_010000.jpg
Texturealyx_sheet.vtf
Custom Iconp3.exe

See also