Permanently protected template

Difference between revisions of "Template:Card info links"

From Yugipedia
Jump to: navigation, search
(top: Restoring revision 5089398 by User:Dinoguy1000 on 2022-10-23 04:34:22. don't add entries to the pagelinks table for nonexistent name/lore pages)
(Tag: New user edit)
(nothing uses the display overriding, and at this point I don't think anything should, so just axe it all)
Line 28: Line 28:
 
   }}
 
   }}
 
}}{{ #arrayintersect: @cil-display | @cil-pages | @cil-type | @cil-medium <!-- only links which are allowed by the specified type + medium get displayed -->
 
}}{{ #arrayintersect: @cil-display | @cil-pages | @cil-type | @cil-medium <!-- only links which are allowed by the specified type + medium get displayed -->
}}{{ #arraydefine: @cil-forbidden <!-- force non-display of a given link, regardless of card type or medium -->
+
}}{{ #arraydefine: @cil-names-lores <!-- only display Names and Lores if those pages exist -->
   | {{ #ifeq: {{{gallery}}}        | no                                                            | Gallery,
+
   | {{ #if: {{PROTECTIONEXPIRY:edit|{{ #var: $cil-ns-Names }}:{{ #var: $cil-link }}}}<!-- [[wikipedia:Template:Linkless exists]] --> || Names,
    }}{{ #ifeq: {{{rulings}}}      | no                                                            | Rulings,
+
     }}{{ #if: {{PROTECTIONEXPIRY:edit|{{ #var: $cil-ns-Lores }}:{{ #var: $cil-link }}}}<!-- [[wikipedia:Template:Linkless exists]] --> || Lores
    }}{{ #ifeq: {{{errata}}}        | no                                                            | Errata,
 
    }}{{ #ifeq: {{{artworks}}}      | no                                                            | Artworks,
 
    }}{{ #ifeq: {{{tips}}}          | no                                                            | Tips,
 
    }}{{ #ifeq: {{{trivia}}}        | no                                                            | Trivia,
 
    }}{{ #ifeq: {{{appearances}}}  | no                                                            | Appearances,
 
    }}{{ #if: {{ #ifeq: {{{names}}} | no | 1 }}{{ #if: {{PROTECTIONEXPIRY:edit|{{ #var: $cil-ns-Names }}:{{ #var: $cil-link }}}}<!-- [[wikipedia:Template:Linkless exists]] --> || 1 }} | Names,<!-- only show names link if page exists, unless names=yes -->
 
     }}{{ #if: {{ #ifeq: {{{lores}}} | no | 1 }}{{ #if: {{PROTECTIONEXPIRY:edit|{{ #var: $cil-ns-Lores }}:{{ #var: $cil-link }}}}<!-- [[wikipedia:Template:Linkless exists]] --> || 1 }} | Lores<!-- only show lores link if page exists, unless lores=yes -->
 
 
   }}
 
   }}
}}{{ #arraydiff: @cil-display | @cil-display | @cil-forbidden <!-- diff -->
+
}}{{ #arraydiff: @cil-display | @cil-display | @cil-names-lores <!-- diff -->
}}{{ #arraydefine: @cil-required <!-- force display of a given link, regardless of card type or medium -->
 
  | {{ #ifeq: {{{gallery}}}      | yes | Gallery,
 
    }}{{ #ifeq: {{{rulings}}}    | yes | Rulings,
 
    }}{{ #ifeq: {{{errata}}}      | yes | Errata,
 
    }}{{ #ifeq: {{{artworks}}}    | yes | Artworks,
 
    }}{{ #ifeq: {{{tips}}}        | yes | Tips,
 
    }}{{ #ifeq: {{{trivia}}}      | yes | Trivia,
 
    }}{{ #ifeq: {{{appearances}}} | yes | Appearances,
 
    }}{{ #ifeq: {{{names}}}      | yes | Names,
 
    }}{{ #ifeq: {{{lores}}}      | yes | Lores
 
  }}
 
}}{{ #arraymerge: @cil-display | @cil-display | @cil-required <!-- merge -->
 
 
}}{{ #arrayunique: @cil-display <!-- rm dupes and empty elements -->
 
}}{{ #arrayunique: @cil-display <!-- rm dupes and empty elements -->
 
}}{{ #arrayintersect: @cil-display | @cil-pages | @cil-display <!-- ensure that @cil-display keeps the canonical link order -->
 
}}{{ #arrayintersect: @cil-display | @cil-pages | @cil-display <!-- ensure that @cil-display keeps the canonical link order -->

Revision as of 19:42, 18 June 2023