Template:GM/box: Difference between revisions

From Ring of Brodgar
Jump to navigation Jump to search
m (Mvg bot moved page Template:Key box to Template:GM/box: GM name-restructure: Rename Code Pages.)
(GM name-restructure: Update Call-Names.)
 
Line 20: Line 20:


">{{
">{{
     #if:{{{1|}}}|{{Str_us2sp|{{Key_ws|{{Str_sp2us|{{{1}}}}}}}}}}}{{
     #if:{{{1|}}}|{{Str_us2sp|{{GM/keys|{{Str_sp2us|{{{1}}}}}}}}}}}{{
     #if:{{{2|}}}| > {{Str_us2sp|{{Key_ws|{{Str_sp2us|{{{2}}}}}}}}}}}{{
     #if:{{{2|}}}| > {{Str_us2sp|{{GM/keys|{{Str_sp2us|{{{2}}}}}}}}}}}{{
     #if:{{{3|}}}| > {{Str_us2sp|{{Key_ws|{{Str_sp2us|{{{3}}}}}}}}}}}{{
     #if:{{{3|}}}| > {{Str_us2sp|{{GM/keys|{{Str_sp2us|{{{3}}}}}}}}}}}{{
     #if:{{{4|}}}| > {{Str_us2sp|{{Key_ws|{{Str_sp2us|{{{4}}}}}}}}}}}{{
     #if:{{{4|}}}| > {{Str_us2sp|{{GM/keys|{{Str_sp2us|{{{4}}}}}}}}}}}{{
     #if:{{{5|}}}| > {{Str_us2sp|{{Key_ws|{{Str_sp2us|{{{5}}}}}}}}}}}{{
     #if:{{{5|}}}| > {{Str_us2sp|{{GM/keys|{{Str_sp2us|{{{5}}}}}}}}}}}{{
     #if:{{{6|}}}| > {{Str_us2sp|{{Key_ws|{{Str_sp2us|{{{6}}}}}}}}}
     #if:{{{6|}}}| > {{Str_us2sp|{{GM/keys|{{Str_sp2us|{{{6}}}}}}}}}
     }}
     }}
   }}</span></span>{{#if:{{{inline|}}}|{{nop}}|</p>}}</includeonly><noinclude>{{documentation}}
   }}</span></span>{{#if:{{{inline|}}}|{{nop}}|</p>}}</includeonly><noinclude>{{documentation}}
Line 34: Line 34:
     &#32;>&nbsp;    //visual separator between input parms. (for p2 to pN line)
     &#32;>&nbsp;    //visual separator between input parms. (for p2 to pN line)
     {{Str_us2sp|    //convert underscores to spaces.
     {{Str_us2sp|    //convert underscores to spaces.
       {{Key_ws|      //scan for '$' char, del and place Key-call around next char.
       {{GM/keys|      //scan for '$' char, del and place Key-call around next char.
         {{Str_sp2us| //convert spaces to underscores.
         {{Str_sp2us| //convert spaces to underscores.
           {{{1}}}    //pass parm 1 text.
           {{{1}}}    //pass parm 1 text.
         }}          //close:sp2us
         }}          //close:sp2us
       }}            //close:Key_ws
       }}            //close:GM/keys
     }}              //close:us2sp
     }}              //close:us2sp
   }}                //close:if
   }}                //close:if

Latest revision as of 12:22, 12 September 2024

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

Info

General "menu path to feature" template.
Currently supporting up to 6 parameters. (anonymous type)
Use a leading '$' character to target a string character.
Targeted character gets enclosed by a Key/box template call.
(Only intended, and tested, with one '$' instance per string.)
(Only intended to be used from "GM"/"GM/sub" template.)

Usage

{{GM/box|String1|String2|..|String6}}

Example

{{GM/box| $Menu Item 1 | Menu $Item 2 | Menu Ite$m 3 | Menu Item $4| Menu Item 5}}
Output:

Icon keyboard.pngMenu Item 1 > Menu Item 2 > Menu Item 3 > Menu Item 4 > Menu Item 5

or
{{GM/box
| $Menu Item 1
| Menu $Item 2
| Menu Ite$m 3
| Menu Item $4
| Menu Item 5
}}
Output:

Icon keyboard.pngMenu Item 1 > Menu Item 2 > Menu Item 3 > Menu Item 4 > Menu Item 5

Leading and trailing string spaces in examples are optional.

Used templates

GM/keys
Str_us2sp
Str_sp2us

Visit Template:GM/box/doc to edit this text! (How does this work?)