Difference between revisions of "Template:Menu"

From POV-Wiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
 
<includeonly><span class="hotkey" style="border:0.1em outset #383838;color:#e5e5e5;background:#5176b2;padding:0.5em 0.8em;font-size:0.8em;white-space:nowrap;"><!--
 
<includeonly><span class="hotkey" style="border:0.1em outset #383838;color:#e5e5e5;background:#5176b2;padding:0.5em 0.8em;font-size:0.8em;white-space:nowrap;"><!--
-->{{{#ifexist :{{{1|}}}|{{Literal|{{{1}}}|}}}}}<!--
+
-->{{#if: {{{1|}}} |{{Literal|{{{1}}}|}}}}}<!--
-->{{{#ifexist :{{{2|}}}|{{Menu/sep}}{{Literal|{{{2}}}|}}}}}<!--
+
-->{{#if: {{{2|}}} |{{Menu/sep}}{{Literal|{{{2}}}|}}}}<!--
-->{{{#ifexist :{{{3|}}}|{{Menu/sep}}{{Literal|{{{3}}}|}}}}}<!--
+
-->{{#if: {{{3|}}} |{{Menu/sep}}{{Literal|{{{3}}}|}}}}<!--
-->{{{#ifexist :{{{4|}}}|{{Menu/sep}}{{Literal|{{{4}}}|}}}}}<!--
+
-->{{#if: {{{4|}}} |{{Menu/sep}}{{Literal|{{{4}}}|}}}}<!--
-->{{{#ifexist :{{{5|}}}|{{Menu/sep}}{{Literal|{{{5}}}|}}}}}<!--
+
-->{{#if: {{{5|}}} |{{Menu/sep}}{{Literal|{{{5}}}|}}}}<!--
-->{{{#ifexist :{{{6|}}}|{{Menu/sep}}{{Literal|{{{6}}}|}}}}}<!--
+
-->{{#if: {{{6|}}} |{{Menu/sep}}{{Literal|{{{6}}}|}}}}<!--
-->{{{#ifexist :{{{7|}}}|{{Menu/sep}}{{Literal|{{{7}}}|}}}}}<!--
+
-->{{#if: {{{7|}}} |{{Menu/sep}}{{Literal|{{{7}}}|}}}}<!--
-->{{{#ifexist :{{{8|}}}|{{Menu/sep}}{{Literal|{{{8}}}|}}}}}<!--
+
-->{{#if: {{{8|}}} |{{Menu/sep}}{{Literal|{{{8}}}|}}}}<!--
-->{{{#ifexist :{{{9|}}}|{{Menu/sep}}{{Literal|{{{9}}}|}}}}}</span></includeonly><!--
+
-->{{#if: {{{9|}}} |{{Menu/sep}}{{Literal|{{{9}}}|}}}}</span></includeonly><!--
 
--><noinclude>{{Documentation}}</noinclude>
 
--><noinclude>{{Documentation}}</noinclude>

Revision as of 18:31, 27 October 2019

This template can be used to display menu selections.

Usage:

{{Menu|<menuname>|<submenu1>|submenu2|…}}

The menu items are formatted using {{Literal}}. Between them the seperator {{Menu/sep}} (currently: '                ▶    ') is inserted. Up to 9 menu levels are supported.

Examples

Import a .obj with {{Menu|File}} {{Submenu|Import}}{{Submenu|Wavefront (.obj)…}}.

Results in:

Import a .obj with {{#if: File |File}}}{{#if: |                ▶    {{{2}}}}}{{#if: |                ▶    {{{3}}}}}{{#if: |                ▶    {{{4}}}}}{{#if: |                ▶    {{{5}}}}}{{#if: |                ▶    {{{6}}}}}{{#if: |                ▶    {{{7}}}}}{{#if: |                ▶    {{{8}}}}}{{#if: |                ▶    {{{9}}}}}                 ▶    Import                ▶    Wavefront (.obj)….


If used in combination with a {{Shortcut/Keypress}} template, you can continue a shotcut in a menu.

{{Menu|{{Shortcut/Keypress|shift|a}}|Add|Mesh|Cube}}

Results in: {{#if: Shift |Shift}}}{{#if: Add |                ▶    Add}}{{#if: Mesh |                ▶    Mesh}}{{#if: Cube |                ▶    Cube}}{{#if: |                ▶    {{{5}}}}}{{#if: |                ▶    {{{6}}}}}{{#if: |                ▶    {{{7}}}}}{{#if: |                ▶    {{{8}}}}}{{#if: |                ▶    {{{9}}}}}


See also: Template:Shortcut