Difference between revisions of "Template:Navigation"
Dinoguy1000 (talk | contribs) (fix category (temporarily)) |
Dinoguy1000 (talk | contribs) (more fixes) |
||
Line 1: | Line 1: | ||
{{ #vardefine: $mode | {{ lc: {{{mode|}}} }} | {{ #vardefine: $mode | {{ lc: {{{mode|}}} }} | ||
− | }}{{ #vardefine: $pagename | {{Normalized pagename|{{PAGENAME}}}} | + | }}{{ #vardefine: $pagename | {{Normalized pagename|{{ #sub: {{PAGENAME}} | {{ #expr: {{ #pos: {{PAGENAME}} | : }} + 1 }} }}}} |
}}{{ #vardefine: $name | {{ #if: {{{demo|}}} | {{{demo}}} | {{ #if: {{{name|}}} | {{{name}}} | {{ #var: $pagename }} }} }} | }}{{ #vardefine: $name | {{ #if: {{{demo|}}} | {{{demo}}} | {{ #if: {{{name|}}} | {{{name}}} | {{ #var: $pagename }} }} }} | ||
}}{{ #vardefine: $display-name | {{ #if: {{{demo|}}} | {{{demo}}} | {{ #if: {{{1|}}} | {{{1}}} | {{ #var: $name }} }} }} | }}{{ #vardefine: $display-name | {{ #if: {{{demo|}}} | {{{demo}}} | {{ #if: {{{1|}}} | {{{1}}} | {{ #var: $name }} }} }} | ||
− | }}{{ #vardefine: $ns | {{ #if: {{{demo_ns|}}} | {{{demo_ns}}} | {{ #if: {{{demo|}}} | {{NAMESPACE:{{{demo}}}}} | {{ | + | }}{{ #vardefine: $ns | {{ #if: {{{demo_ns|}}} | {{{demo_ns}}} | {{ #if: {{{demo|}}} | {{NAMESPACE:{{{demo}}}}} | {{ #explode: {{PAGENAME}} | : }} }} }} |
}}{{ #vardefine: $show-name | {{ #show: {{ #var: $pagename }} | ?Page name }} | }}{{ #vardefine: $show-name | {{ #show: {{ #var: $pagename }} | ?Page name }} | ||
}}{{Navbox | }}{{Navbox | ||
Line 61: | Line 61: | ||
SMW and categories | SMW and categories | ||
− | -->{{IfSemantics | [[{{ | + | -->{{IfSemantics | [[{{ #var: $ns }} page for::{{ #var: $pagename }}| ]] |
− | }}{{ #switch: {{ | + | }}{{ #switch: {{ #var: $ns }} |
− | | | + | | Card Gallery |
− | | | + | | Card Rulings |
− | | | + | | Card Errata |
− | | | + | | Card Tips |
− | | | + | | Card Trivia |
− | | | + | | Card Appearances |
− | | | + | | Card Lores |
− | | | + | | Card Artworks |
− | | | + | | Card Names |
− | | | + | | Card Sets = {{ #if: {{{nocat|}}} |
| <!-- suppress content categories --> | | <!-- suppress content categories --> | ||
| [[Category:{{ #explode: {{PAGENAME}} | : }}]] | | [[Category:{{ #explode: {{PAGENAME}} | : }}]] | ||
Line 80: | Line 80: | ||
| {{Mbox | | {{Mbox | ||
| type = move | | type = move | ||
− | | text = '''This page should be [{{fullurl:Special:MovePage/{{FULLPAGENAMEE}}|wpNewTitle={{urlencode:{{ | + | | text = '''This page should be [{{fullurl:Special:MovePage/{{FULLPAGENAMEE}}|wpNewTitle={{urlencode:{{ #var: $ns }}:{{ #var: $show-name }}}}&wpReason={{urlencode:per main page}}&wpLeaveRedirect=0}} renamed]''' to "{{ #var: $ns }}:{{ #var: $show-name }}" per its [[{{ #var: $show-name }}|main card article]].<br />After renaming, please null-edit [{{fullurl:{{ #var: $ns }}:{{ #var: $show-name }}|action=edit}} this page], ''and then'' the [{{fullurl:{{ #var: $show-name }}|action=edit}} main card article], to properly update this notice. |
}}[[Category:Navigation transclusions to be checked|N]]<!-- card page doesn't exist or is redirect --> | }}[[Category:Navigation transclusions to be checked|N]]<!-- card page doesn't exist or is redirect --> | ||
}} | }} |
Revision as of 03:34, 14 November 2017
Usage
This template is used to create the navigation box at the top of Card Gallery, Rulings, Errata, Tips, Appearances, and Trivia pages. Ordinarily, this template can be used just by placing the template call {{Navigation}} on the target page. However, there are some parameters that can be used to influence the final appearance of the navbox.
Examples
{{Navigation}} |
|
{{Navigation|mode=nonGame}} If the card is only found in an anime or manga series or the Yu-Gi-Oh! Duel Monsters promotional cards set, use mode=nonGame to remove Rulings, Tips and Errata links. Shortcut: {{subst:Navigation2}} Note that the shortcut doesn't allow for any additional parameters, such as |other=[[Flame Swordsman (Bandai)|Bandai]]. |
|
{{Navigation|mode=otherGame}} If the card is only found in the Bandai series, Dungeon Dice Monsters or is video game only, you should use mode=otherGame to remove Rulings and Errata links. Shortcut: {{subst:Navigation3}} Note that the shortcut doesn't allow for any additional parameters, such as |other=[[Flame Swordsman (Bandai)|Bandai]]. |
|
{{Navigation|mode=token}} If the card is a token, you should use mode=token to remove the irrelevant links at the top of the box. |
|
{{Navigation|mode=Tip}} if the card is a Tip, Strategy or FAQ card, you should use mode=Tip to remove the Gallery, Rulings, Errata, Anime and Manga Appearances and Tips links at the top of the box. |
|
{{Navigation|other=Other links and information}} If there are any other pages relating to the card, they can be listed using this parameter. |
Tracking categories
{{Navigation}} automatically detects several different possible errors and tracks them in Category:Navigation transclusions to be checked. In additions, uses of the other
parameter are tracked in Category:((Navigation)) transclusions with "other" parameter.