Template:Advanced link: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly><onlyinclude | <includeonly><onlyinclude>{{#switch:{{{1|}}}|link|text=|#default=<b style=position:relative;top:-.1em;user-select:none>[[File:{{{icon}}}|{{{icon size|x16}}}px|link={{{link}}}]]{{#ifeq:{{{1|}}}|icon|| }}</b>}}{{#switch:{{{1|}}}|icon=|text={{{name}}}|#default=[{{#if:{{{external}}}|[:{{{link}}}{{!}}|{{{link}}} <nowiki/>}}{{#ifeq:{{{1|}}}|styled|<b style="color:{{{color|#3C78D2}}}">{{{name}}}</b>|{{{name}}}}}{{{external|]}}}]}}</onlyinclude></includeonly> | ||
{{Todo|Come up with a better name for this template.}} | |||
This template is an improved and simplified version of template {{T|Software}}. | This template is an improved and simplified version of template {{T|Software}}. | ||
Line 42: | Line 44: | ||
{{tr| | {{tr| | ||
{{td| {{Code|<nowiki>{{Cs2d}}</nowiki>}} }} | {{td| {{Code|<nowiki>{{Cs2d}}</nowiki>}} }} | ||
{{td| This is {{Software inline|color=#FFD700|icon=CS2D icon.png|external= | {{td| This is {{Software inline|color=#FFD700|icon=CS2D icon.png|external=|link=https://store.steampowered.com/app/666220/CS2D|name=CS2D}}! }} | ||
{{td| External link. }} | {{td| External link. }} | ||
}} | }} | ||
Line 53: | Line 55: | ||
! Description | ! Description | ||
|- | |- | ||
| {{Code|{{P| {{Param||}} }}}} | | {{Code|{{P| {{Param|show|}} }}}} | ||
| The first parameter specifies the template display format: | | The first parameter specifies the template display format: | ||
* If the value is empty, the standard option will be displayed: an icon with a link. | * If the value is empty, the standard option will be displayed: an icon with a link. | ||
Line 59: | Line 61: | ||
* {{Code|link}} – Displays only the link. | * {{Code|link}} – Displays only the link. | ||
* {{Code|text}} – Displays link text only. | * {{Code|text}} – Displays link text only. | ||
* {{Code|styled}} – Displays an icon and link colored in the color specified by the {{Param|color}} parameter. | * {{Code|styled}} – Displays an icon and bold link colored in the color specified by the {{Param|color}} parameter. | ||
When used in child templates, you must specify {{Code|{{Param||}}}} so that you can change the modes when using them. | When used in child templates, you must specify it as {{Code|{{Param|show|}}}} (or {{Code|{{Param||{{Param|show|}}}}}} if the child template does not use unnamed parameters for anything else) so that you can change the modes when using them. | ||
|- | |- | ||
| {{Code|{{P| color | <color>}}}} | | {{Code|{{P| color | <color>}}}} | ||
Line 71: | Line 73: | ||
| Icon size. Don't include px at the end when specifying a parameter. Default value is {{Code|x16px}}. | | Icon size. Don't include px at the end when specifying a parameter. Default value is {{Code|x16px}}. | ||
|- | |- | ||
| {{Code|{{P| external | | | {{Code|{{P| external |}}}} | ||
| If this parameter is specified, the value of the {{Param|link}} parameter will be treated as an external link. | | If this parameter is specified, the value of the {{Param|link}} parameter will be treated as an external link. '''Do not''' enter anything into this parameter, it must be left blank, otherwise it will break the template. | ||
|- | |- | ||
| {{Code|{{P| link | Half-Life 2}}}} | | {{Code|{{P| link | Half-Life 2}}}} |
Revision as of 15:23, 6 October 2025
Todo: Come up with a better name for this template.
This template is an improved and simplified version of template {{Software}}.
Child Templates Usage
These examples are written directly using this template, since the {{Portal 2}}, {{Idtech3}} and {{Cs2d}} do not currently use this template as their base.
Code | Result | Description |
---|---|---|
{{Portal 2}} | This is
![]() This template has been marked as a candidate for speedy deletion because it is unwanted by the author.
If you object to this decision, then please discuss why here (If you make a discussion section also create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself Administrators / Moderators - Remember to check if anything links here and the page history before deleting. |
Link with icon. |
{{Portal 2|styled}} | This is
![]() This template has been marked as a candidate for speedy deletion because it is unwanted by the author.
If you object to this decision, then please discuss why here (If you make a discussion section also create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself Administrators / Moderators - Remember to check if anything links here and the page history before deleting. |
Colored link. |
{{Portal 2|icon}} | This is
![]() This template has been marked as a candidate for speedy deletion because it is unwanted by the author.
If you object to this decision, then please discuss why here (If you make a discussion section also create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself Administrators / Moderators - Remember to check if anything links here and the page history before deleting. |
Clickable Icon. |
{{Portal 2|link}} | This is
![]() This template has been marked as a candidate for speedy deletion because it is unwanted by the author.
If you object to this decision, then please discuss why here (If you make a discussion section also create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself Administrators / Moderators - Remember to check if anything links here and the page history before deleting. |
Link without icon. |
{{Portal 2|text}} | This is
![]() This template has been marked as a candidate for speedy deletion because it is unwanted by the author.
If you object to this decision, then please discuss why here (If you make a discussion section also create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself Administrators / Moderators - Remember to check if anything links here and the page history before deleting. |
Plain text. |
{{Idtech3}} | This is
![]() This template has been marked as a candidate for speedy deletion because it is unwanted by the author.
If you object to this decision, then please discuss why here (If you make a discussion section also create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself Administrators / Moderators - Remember to check if anything links here and the page history before deleting. |
Link to Wikipedia article. |
{{Cs2d}} | This is
![]() This template has been marked as a candidate for speedy deletion because it is unwanted by the author.
If you object to this decision, then please discuss why here (If you make a discussion section also create this redirect page). If this page doesn't meet the criteria for speedy deletion, then please remove this notice, but do not remove it from pages that you have created yourself Administrators / Moderators - Remember to check if anything links here and the page history before deleting. |
External link. |
Description
Parameter | Description |
---|---|
| {{{show|}}} | The first parameter specifies the template display format:
When used in child templates, you must specify it as {{{show|}}} (or {{{1|{{{show|}}}}}} if the child template does not use unnamed parameters for anything else) so that you can change the modes when using them. |
| color = <color> | Used to colorize a link in styled mode. Default value is #3C78D2rgb(60,120,210). |
| icon = Example.png | The icon that will be displayed next to the link. You only need to specify the file name and format, do not enter File: at the beginning. |
| icon size = 32 | Icon size. Don't include px at the end when specifying a parameter. Default value is x16px. |
| external = | If this parameter is specified, the value of the {{{link}}} parameter will be treated as an external link. Do not enter anything into this parameter, it must be left blank, otherwise it will break the template. |
| link = Half-Life 2 | Link. If the {{{external}}} parameter is specified, this link will be treated as external link. |
| name = Portal 2 | The text that will be displayed for the link. |