More actions
Gammaton32 (talk | contribs) No edit summary |
Gammaton32 (talk | contribs) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 18: | Line 18: | ||
In its simplest form: <code><nowiki>{{PageRef|Lash}}</nowiki></code> {{PageRef|Lash}} | In its simplest form: <code><nowiki>{{PageRef|Lash}}</nowiki></code> {{PageRef|Lash}} | ||
Example where the icon doesn't exist: <code><nowiki>{{PageRef| | Example where the icon doesn't exist: <code><nowiki>{{PageRef|Shopkeeper}}</nowiki></code> {{PageRef|Shopkeeper}} | ||
Using alt_name: <code><nowiki>{{PageRef|Lash|alt_name=Jacob}}</nowiki></code> {{PageRef|Lash|alt_name=Jacob}} | Using alt_name: <code><nowiki>{{PageRef|Lash|alt_name=Jacob}}</nowiki></code> {{PageRef|Lash|alt_name=Jacob}} | ||
Line 31: | Line 31: | ||
Note: Instead of repeated use of <i>alt_file_name</i>, it is recommended to create a redirect at <nowiki>[[<first_parameter>.png]]</nowiki> to <nowiki>[[<alt_file_name>.png]]</nowiki>, allowing the use of the simplest form of PageRef, making it much easier to reference in the future. | Note: Instead of repeated use of <i>alt_file_name</i>, it is recommended to create a redirect at <nowiki>[[<first_parameter>.png]]</nowiki> to <nowiki>[[<alt_file_name>.png]]</nowiki>, allowing the use of the simplest form of PageRef, making it much easier to reference in the future. | ||
If a file does not exist, it will look like | |||
{{PageRef|My cool page}} | |||
To not use the file, use: | |||
<code><nowiki>{{PageRef|My cool page|no_file=true}}</nowiki></code> | |||
{{PageRef|My cool page|no_file=true}} | |||
=Parameters= | =Parameters= | ||
<templatedata> | <templatedata> | ||
{ | { | ||
Line 44: | Line 50: | ||
"aliases": [ | "aliases": [ | ||
"1" | "1" | ||
] | ], | ||
"type": "string" | |||
}, | }, | ||
"no_file": { | |||
"label": "Do not use file", | |||
"description": "Do not use any file; also use this parameter when a file doesn't exist. Note that passing 'false' does not make it use a file, the parameter must then be omitted. This is for code efficiency", | |||
"required": false, | |||
"example": "true", | |||
"type": "string" | |||
}, | |||
"alt_name": { | "alt_name": { | ||
"label": "Alternate Name", | "label": "Alternate Name", |