Editing
Template:PageRef/doc
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=Overview= Outputs an icon in svg and a link to the given localized page with an optional alternate display name. Output should be:<br> <icon> <pagename> * Both icon and page name should be hyperlinked to first parameter as the pagename * Icon should be <pre style="width: fit-content>[[File:<pagename>.svg]]</pre> if the svg file exists, otherwise the .png. * The .svg should be both light and dark theme compatible ** It's possible CSS may be used to automatically invert colors, precluding the need for the icon to be theme-compatible * The .png should be default theme compatible (light) =Examples= {{PageRef|Lash|alt_name=Jacob}} {{PageRef|Bullet Lifesteal|alt_link=Bullet Lifesteal (item)}} {{PageRef|Siphon Life|alt_link=Abrams#(1) Siphon Life}} ==not yet working== {{PageRef|Lash|alt_name=Jacob}} {{PageRef|Siphon Life|size=50}} {{PageRef|AttributeIconTechDuration}} {{PageRef|Basic Magazine}} {{PageRef|The Curiosity Shop|alt_name=Shop|size=100}} Below is a fake example. Ideally, the template is called like: <pre style="width: fit-content">{{PageRef|Lash|alt_name=Jacob}}</pre> In wikitext it would look be outputted as: <pre style="width: fit-content">[[File:Lash.svg|class=dark_or_light|link=Lash|size=15]] [[Lash|Jacob]]</pre> Which would appear in visual as {{HeroIcon|Lash|Jacob}} <templatedata> { "params": { "name": { "label": "Name", "description": "The localized name of the page to link to, also used to determine the icon.", "type": "string", "required": true, "example": "Lash" }, "alt_name": { "label": "Alternate Name", "description": "An optional display name to show instead of the page name in the link.", "type": "string", "required": false, "example": "Jacob" }, "alt_link": { "label": "Alternate Link", "description": "An optional link to link to instead of the 1st parameter (name).", "type": "string", "required": false, "example": "Death Slam" }, "size": { "label": "Size", "description": "Size of the icon link, defaulted to '15'px", "type": "number", "required": false, "example": "50" } }, "format": "inline" } </templatedata>
Summary:
Please note that all contributions to Deadlock Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Deadlock:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Preview page with this template
Templates used on this page:
Data:Dictionary
(
edit
)
Data:HeroData.json
(
edit
)
Data:LangCodes.json
(
edit
)
Data:Lang en.json
(
edit
)
Template:HeroIcon
(
edit
)
Template:PageRef
(
edit
)
Module:Dictionary
(
edit
)
Module:Lang
(
edit
)
Module:PageRef
(
edit
)
Module:Utilities
(
edit
)
Navigation menu
Personal tools
English
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Template
Discussion
English
Views
Read
Edit source
View history
More
Search
Navigation
Main page
Discord community
Recent changes
Random page
Tools
What links here
Related changes
Special pages
Page information
Languages