Template:Menu: Difference between revisions

From KDE UserBase Wiki
No edit summary
No edit summary
Line 7: Line 7:
will result in {{Menu|A|very|long|sequence|of|choices}}
will result in {{Menu|A|very|long|sequence|of|choices}}


This way of specifying menu choices differs from the old "manual" way in that long sequences may split lines as in {{Menu|A|very|long|sequence|of|choices}} and that it doesn't work well with bulleted lists and similar.
This way of specifying menu choices differs from the old "manual" way in that long sequences may split lines as in {{Menu|A|very|long|sequence|of|choices}}.
 
{{Warning|1=Using this template with certain formatting will interfere with the expected layout. Fx using it in a bulleted list will introduce blank lines:
 
<nowiki>* {{Menu|File}}</nowiki>
 
will result in
 
* {{Menu|File}}
}}


[[Category:Template]]
[[Category:Template]]
</noinclude>
</noinclude>{{#tag: menuchoice | {{{1}}} }} {{#if:  
<span class="menuchoice">{{{1}}}</span>
  {{{2| }}} | &rarr; {{#tag: menuchoice | {{{2}}} }} {{#if:
{{#if: {{{2| }}} | &rarr; <span class="menuchoice">{{{2}}}</span>
    {{{3| }}} | &rarr; {{#tag: menuchoice | {{{3}}} }} {{#if:
{{#if: {{{3| }}} | &rarr; <span class="menuchoice">{{{3}}}</span>
      {{{4| }}} | &rarr; {{#tag: menuchoice | {{{4}}} }} {{#if:
{{#if: {{{4| }}} | &rarr; <span class="menuchoice">{{{4}}}</span>
        {{{5| }}} | &rarr; {{#tag: menuchoice | {{{5}}} }} {{#if:
{{#if: {{{5| }}} | &rarr; <span class="menuchoice">{{{5}}}</span>
          {{{6| }}} | &rarr; {{#tag: menuchoice | {{{6}}} }}
{{#if: {{{6| }}} | &rarr; <span class="menuchoice">{{{6}}}</span>}} }} }} }} }}
}} }} }} }} }}

Revision as of 07:21, 11 May 2019


This template can be used to enter a sequence of menu choices (at most 6 levels deep, although it could easily be expanded to allow for more). Entering

{{Menu|File|Open}}

will result in File Open , while

{{Menu|A|very|long|sequence|of|choices}}

will result in A very long sequence of choices

This way of specifying menu choices differs from the old "manual" way in that long sequences may split lines as in A very long sequence of choices . {{{1}}}