Template:GM/cat/legacy: Difference between revisions

From Ring of Brodgar
Jump to navigation Jump to search
m (MvGulik moved page Template:Menu usage scan to Template:Menu usage-set catg-Legacy without leaving a redirect)
mNo edit summary
Line 1: Line 1:
<includeonly
<includeonly


>{{#if: {{{1|}}}
>{{#if: {{{1|}}}|{{#if: {{{2|}}}|{{
  |{{#if: {{{2|}}}
 
    |{{#set: Menu_Usage ={{#replace:{{{1}}}|$}} }}{{
#switch: {{#replace:{{{1}}}|$}}
    #if: {{{3|}}}
| (dummy case) = [[Category:Legacy foobar1]]
      |{{#set: Menu_Usage ={{#replace:{{{2}}}|$}} }}{{
}}{{#if: {{{3|}}}|{{
        #switch: {{#replace:{{{2}}}|$}}
 
          | (Optional Other case's)
#switch: {{#replace:{{{2}}}|$}}
          | Medicine & First Aid =[[Category:Medicine]]
| The Symbel = [[Category:Legacy The Symbel]]
        }}{{
}}{{#if: {{{4|}}}|{{
      #if: {{{4|}}}
 
        |{{#set: Menu_Usage ={{#replace:{{{3}}}|$}} }}{{
#switch: {{#replace:{{{3}}}|$}}
          #switch: {{#replace:{{{3}}}|$}}
| Hats = [[Category:Legacy Clothing]]
            | Hats =[[Category:Clothing]]
| Sausages = [[Category:Legacy Sausages]]
            | Sausages =[[Category:{{#replace:{{{3}}}|$}}]]
}}{{#if: {{{5|}}}|{{
          }}{{
 
        #if: {{{5|}}}
#switch: {{#replace:{{{4}}}|$}}
          |{{#set: Menu_Usage ={{#replace:{{{4}}}|$}} }}{{
| (dummy case) =  [[Category:Legacy foobar4]]
          #if: {{{6|}}}
}}{{#if: {{{6|}}}|{{
            |{{#set: Menu_Usage ={{#replace:{{{5}}}|$}} }}
 
          }}
#switch: {{#replace:{{{5}}}|$}}
        }}
| (dummy case) =  [[Category:Legacy foobar5]]
      }}
}}}}}}}}}}}}
    }}
 
  }}
}}</includeonly
}}</includeonly


><noinclude>{{documentation}}</noinclude>
><noinclude>{{documentation}}<!--
Code note:
The parameter-number offset, between the #switch and its leading #if part, is intentionally.
Effectively preventing categorising on the last given GM-parameter (is object name ... best not! categorised here).
--></noinclude>

Revision as of 21:20, 9 July 2018

Template documentation (for the template shown above, sometimes hidden or invisible)

Info

Game-Menu supplement template. (Legacy specific version)
Category assignment on specific menu's.
Currently supporting up to 6 parameters. (anonymous type)
(Only intended to be used from "GM/sub" template.)

Usage

{{GM/cat|Parm1|Parm2|..|Parm6}}

Used By template

GM/sub

Auto Categorising

(TODO-UPDATE)
Notes:
- Not all categories allowed for this.
- Most auto categorising is (should be?) managed by Infobox metaobj
- Case-sensitive.