Permanently protected template

Difference between revisions of "Template:Navigation"

From Yugipedia
Jump to: navigation, search
(I always have trouble remembering which of these is correct when =P )
(let's see if we can't stop card info pages from getting orphaned when card pages are moved from now on (or maybe we'll just break everything spectacularly =D ))
Line 7: Line 7:
 
| titlestyle = font-size: 95%;
 
| titlestyle = font-size: 95%;
  
 +
<!--
 +
 +
The code used to create the links is ripe for being templated, but I've had my fill for now. =)
 +
If someone decides to do so before I get around to it, be sure to also update {{CardTable2}} to use the template.
 +
 +
-->
 
| list1      = {{
 
| list1      = {{
 
     #ifeq: {{ lc: {{{mode}}} }} | spirit          <!-- spirits don't get galleries -->
 
     #ifeq: {{ lc: {{{mode}}} }} | spirit          <!-- spirits don't get galleries -->
     || [[Card Gallery:{{ #if: {{{demo|}}} | {{{demo}}} | {{PAGENAME}} }}|Gallery]] -  
+
     || [[{{ #if: {{{demo|}}} | Card Gallery:{{{demo}}} | {{ #if: {{IfSemantics|{{ #ask: [[Card Gallery page for::{{PAGENAME}}]] | link=none }}}} | {{ #ask: [[Card Gallery page for::{{PAGENAME}}]] | link=none }} | Card Gallery:{{PAGENAME}} }} }}|Gallery]] -  
 
   }} {{
 
   }} {{
 
     #if: {{{mode|}}}                              <!-- only OCG/TCG cards get rulings or errata -->
 
     #if: {{{mode|}}}                              <!-- only OCG/TCG cards get rulings or errata -->
     || [[Card Rulings:{{ #if: {{{demo|}}} | {{{demo}}} | {{PAGENAME}} }}|Rulings]] - [[Card Errata:{{ #if: {{{demo|}}} | {{{demo}}} | {{PAGENAME}} }}|Errata]] -  
+
     || [[{{ #if: {{{demo|}}} | Card Rulings:{{{demo}}} | {{ #if: {{IfSemantics|{{ #ask: [[Card Rulings page for::{{PAGENAME}}]] | link=none }}}} | {{ #ask: [[Card Rulings page for::{{PAGENAME}}]] | link=none }} | Card Rulings:{{PAGENAME}} }} }}|Rulings]] - [[{{ #if: {{{demo|}}} | Card Errata:{{{demo}}} | {{ #if: {{IfSemantics|{{ #ask: [[Card Errata page for::{{PAGENAME}}]] | link=none }}}} | {{ #ask: [[Card Errata page for::{{PAGENAME}}]] | link=none }} | Card Errata:{{PAGENAME}} }} }}|Errata]] -  
 
   }} {{
 
   }} {{
 
     #switch: {{ lc: {{{mode}}} }}                  <!-- only OCG/TCG/Bandai/DDM/VG cards get tips -->
 
     #switch: {{ lc: {{{mode}}} }}                  <!-- only OCG/TCG/Bandai/DDM/VG cards get tips -->
 
     | token | nongame | spirit | tip =  
 
     | token | nongame | spirit | tip =  
     | #default                      = [[Card Tips:{{ #if: {{{demo|}}} | {{{demo}}} | {{PAGENAME}} }}|Tips]] -  
+
     | #default                      = [[{{ #if: {{{demo|}}} | Card Tips:{{{demo}}} | {{ #if: {{IfSemantics|{{ #ask: [[Card Tips page for::{{PAGENAME}}]] | link=none }}}} | {{ #ask: [[Card Tips page for::{{PAGENAME}}]] | link=none }} | Card Tips:{{PAGENAME}} }} }}|Tips]] -  
 
   }} {{
 
   }} {{
 
     #switch: {{ lc: {{{mode}}} }}                  <!-- tokens and tip/strategy cards don't get appearances -->
 
     #switch: {{ lc: {{{mode}}} }}                  <!-- tokens and tip/strategy cards don't get appearances -->
 
     | token | tip =  
 
     | token | tip =  
     | #default    = [[Card Appearances:{{ #if: {{{demo|}}} | {{{demo}}} | {{PAGENAME}} }}|Appearances]] -  
+
     | #default    = [[{{ #if: {{{demo|}}} | Card Appearances:{{{demo}}} | {{ #if: {{IfSemantics|{{ #ask: [[Card Appearances page for::{{PAGENAME}}]] | link=none }}}} | {{ #ask: [[Card Appearances page for::{{PAGENAME}}]] | link=none }} | Card Appearances:{{PAGENAME}} }} }}|Appearances]] -  
 
   }} {{
 
   }} {{
 
     #ifeq: {{ lc: {{{mode}}} }} | token            <!-- tokens don't get trivia -->
 
     #ifeq: {{ lc: {{{mode}}} }} | token            <!-- tokens don't get trivia -->
     || [[Card Trivia:{{ #if: {{{demo|}}} | {{{demo}}} | {{PAGENAME}} }}|Trivia]]
+
     || [[{{ #if: {{{demo|}}} | Card Trivia:{{{demo}}} | {{ #if: {{IfSemantics|{{ #ask: [[Card Trivia page for::{{PAGENAME}}]] | link=none }}}} | {{ #ask: [[Card Trivia page for::{{PAGENAME}}]] | link=none }} | Card Trivia:{{PAGENAME}} }} }}|Trivia]]
 
   }} {{
 
   }} {{
 
     #switch: {{lc: {{{mode}}} }}                  <!-- tokens, spirits, and tip/strategy cards don't have a linebreak -->
 
     #switch: {{lc: {{{mode}}} }}                  <!-- tokens, spirits, and tip/strategy cards don't have a linebreak -->
Line 32: Line 38:
 
     #switch: {{ lc: {{{mode}}} }}                  <!-- tokens, spirits, and tip/strategy cards don't get names or lores -->
 
     #switch: {{ lc: {{{mode}}} }}                  <!-- tokens, spirits, and tip/strategy cards don't get names or lores -->
 
     | token | spirit | tip =  
 
     | token | spirit | tip =  
     | #default            = [[Card Names:{{ #if: {{{demo|}}} | {{{demo}}} | {{PAGENAME}} }}|Names]] - [[Card Lores:{{ #if: {{{demo|}}} | {{{demo}}} | {{PAGENAME}} }}|Lores]] -  
+
     | #default            = [[{{ #if: {{{demo|}}} | Card Names:{{{demo}}} | {{ #if: {{IfSemantics|{{ #ask: [[Card Names page for::{{PAGENAME}}]] | link=none }}}} | {{ #ask: [[Card Names page for::{{PAGENAME}}]] | link=none }} | Card Names:{{PAGENAME}} }} }}|Names]] - [[{{ #if: {{{demo|}}} | Card Lores:{{{demo}}} | {{ #if: {{IfSemantics|{{ #ask: [[Card Lores page for::{{PAGENAME}}]] | link=none }}}} | {{ #ask: [[Card Lores page for::{{PAGENAME}}]] | link=none }} | Card Lores:{{PAGENAME}} }} }}|Lores]] -  
 
   }} {{
 
   }} {{
 
     #switch: {{ lc: {{{mode}}} }}                  <!-- spirits and tip/strategy cards don't get artworks -->
 
     #switch: {{ lc: {{{mode}}} }}                  <!-- spirits and tip/strategy cards don't get artworks -->
 
     | spirit | tip =  
 
     | spirit | tip =  
     | #default    = [[Card Artworks:{{ #if: {{{demo|}}} | {{{demo}}} | {{PAGENAME}} }}|Artworks]]
+
     | #default    = [[{{ #if: {{{demo|}}} | Card Artworks:{{{demo}}} | {{ #if: {{IfSemantics|{{ #ask: [[Card Artworks page for::{{PAGENAME}}]] | link=none }}}} | {{ #ask: [[Card Artworks page for::{{PAGENAME}}]] | link=none }} | Card Artworks:{{PAGENAME}} }} }}|Artworks]]
 
   }}{{
 
   }}{{
 
     #if: {{{Other2|}}}
 
     #if: {{{Other2|}}}
Line 53: Line 59:
 
   }} A-Z'''
 
   }} A-Z'''
 
<div style="font-size: 95%;">{{Contents|Category:{{ #if: {{{demo_ns|}}} | {{{demo_ns}}} | {{NAMESPACE}} }}}}</div>
 
<div style="font-size: 95%;">{{Contents|Category:{{ #if: {{{demo_ns|}}} | {{{demo_ns}}} | {{NAMESPACE}} }}}}</div>
 +
}}<!--
 +
 +
SMW and categories
 +
 +
-->{{IfSemantics
 +
| [[{{NAMESPACE}} page for::{{PAGENAME}}| ]]
 
}}{{
 
}}{{
 
   #switch: {{NAMESPACE}}
 
   #switch: {{NAMESPACE}}
Line 73: Line 85:
 
       #if: {{ #pos: {{PAGENAME}} | = }}
 
       #if: {{ #pos: {{PAGENAME}} | = }}
 
       | <!-- hack to keep "Damage = Reptile" info pages out of the tracking category -->
 
       | <!-- hack to keep "Damage = Reptile" info pages out of the tracking category -->
       | [[Category:Navigation transclusions to be checked|N{{PAGENAME}}{{NAMESPACE}}]]<!-- card page doesn't exist or is redirect -->
+
       | {{ #if: {{ #show: {{PAGENAME}} |?Page Name }} | {{Rename|{{NAMESPACE}}:{{ #show: {{PAGENAME}} | ?Page Name }}|per main page}} }}[[Category:Navigation transclusions to be checked|N{{PAGENAME}}{{NAMESPACE}}]]<!-- card page doesn't exist or is redirect -->
 
     }}
 
     }}
 
   }}}}{{
 
   }}}}{{

Revision as of 08:03, 19 November 2011