Difference between revisions of "Template:Set gallery"

From Yugipedia
Jump to: navigation, search
(Forgot to apply the group abbr to the file name. Not the perfect logic, but should do it, while avoiding #ifs.)
(This should be able to get the set name correctly, if it's on the page name and has dab text.)
Line 26: Line 26:
 
       | {{ #if: {{{set|}}}
 
       | {{ #if: {{{set|}}}
 
           | {{{set}}}
 
           | {{{set}}}
           | {{ #explode: {{PAGENAME}} | ( | 0 }}
+
           | {{ #sub: {{PAGENAME}} <!-- Page name: /<Set name>( <dab>)? \(info\)/. -->
 +
                | 0 <!-- Start partitioning from the beginning. -->
 +
                | -{{ #expr: <!-- But remove, -->
 +
                      {{ #len: <!-- Length of: -->
 +
                        {{ #explode: {{PAGENAME}} | ( | -1 }} <!-- The part with the info, -->
 +
                      }} + 2 <!-- Plus 2, which corresponds to / \(/; the opening parenthesis and the preceding space. -->
 +
                  }}
 +
            }}
 
         }}
 
         }}
 
   }}<!--
 
   }}<!--

Revision as of 16:23, 18 April 2017