Template:GM/cat/legacy: Difference between revisions

From Ring of Brodgar
Jump to navigation Jump to search
(New (testing))
 
m (Mvg bot moved page Template:Menu usage-set catg-Legacy to Template:GM/cat/legacy: GM name-restructure: Rename Code Pages.)
 
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>
<includeonly
Self check:
:A:{{Menu_usage_scan}}:(empty)
:B:{{Menu_usage_scan|foobar1}}:(empty)
:C:{{Menu_usage_scan|foobar1|foobar2}}:(a)
:D:{{Menu_usage_scan|foobar1|foobar2|foobar3|foobar4}}:(c)
:E:{{Menu_usage_scan|foobar1|foobar2|foobar3|||foobar6}}:(b)
</noinclude><includeonly>{{


#if: {{{1|}}}
>{{#if: {{{1|}}}
  |{{#if: {{{2|}}}
|{{#if: {{{2|}}}|{{
    |a{{#set: Menu_Usage = {{#replace:{{{1}}}|$}} }}{{
    #if: {{{3|}}}
      |b{{#set: Menu_Usage = {{#replace:{{{2}}}|$}} }}{{
      #if: {{{4|}}}
        |c{{#set: Menu_Usage = {{#replace:{{{3}}}|$}} }}{{
        #if: {{{5|}}}
          |d{{#set: Menu_Usage = {{#replace:{{{4}}}|$}} }}{{
          #if: {{{6|}}}
            |e{{#set: Menu_Usage = {{#replace:{{{5}}}|$}} }}{{
          }}
        }}
      }}
    }}
  }}


}}</includeonly><noinclude>{{documentation}}</noinclude>
#switch: {{{1}}}
| (dummy case) = [[Category:Legacy foobar1]]
}}{{#if: {{{3|}}}|{{
 
#switch: {{{2}}}
| The Symbel = [[Category:Legacy The Symbel]]
}}{{#if: {{{4|}}}|{{
 
#switch: {{{3}}}
| Hats = [[Category:Legacy Clothing]]
| Sausages = [[Category:Legacy Sausages]]
}}{{#if: {{{5|}}}|{{
 
#switch: {{{4}}}
| (dummy case) =  [[Category:Legacy foobar4]]
}}{{#if: {{{6|}}}|{{
 
#switch: {{{5}}}
| (dummy case) =  [[Category:Legacy foobar5]]
}}}}}}}}}}}}
 
}}</includeonly
 
><noinclude
><br style="clear:both;" />{{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).
-->
[[Category:Legacy Template]]
</noinclude>

Latest revision as of 16:07, 11 September 2024


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.