Difference between revisions of "Template:List Submenus"

From Salem Wiki
Jump to: navigation, search
m (adding default for no results)
m (Protected "Template:List Submenus": Key feature of wiki ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{#ask:
 
{{#ask:
 
[[isGameMenu::y]]
 
[[isGameMenu::y]]
[[isinGameMenu::{{#ifeq:
+
[[isinGameMenu::{{#ifeq: {{SUBJECTSPACE: {{{page|{{FULLPAGENAME}} }}} }}
{{SUBJECTSPACE: {{{page|{{FULLPAGENAME}} }}} }}
+
| {{ns:Template}}
| {{ns:Template}}
+
| GameMenu
| GameMenu
+
| {{#titleparts: {{{page|{{PAGENAME}} }}} ||-1 }}
| {{#titleparts: {{{page|{{PAGENAME}} }}} ||-1 }}
+
}}]]
}}]]
+
|intro=Sub-menus you can find in the <!--
|format=ul
+
-->[[<!--
|intro=Sub-menus you can find in the '''''{{#ifeq:
+
-->{{#ifeq: {{SUBJECTSPACE: {{{page|{{FULLPAGENAME}} }}} }}
{{#ifeq:
+
| {{ns:Template}}
{{SUBJECTSPACE: {{{page|{{FULLPAGENAME}} }}} }}
+
| GameMenu
| {{ns:Template}}
+
| {{{page|{{PAGENAME}} }}}
| GameMenu
+
}}<!--
| {{#titleparts: {{{page|{{PAGENAME}} }}} ||-1 }}
+
-->|<!--
}}
+
-->'''''{{#ifeq: {{#ifeq: {{SUBJECTSPACE: {{{page|{{FULLPAGENAME}} }}} }}
| GameMenu
+
| {{ns:Template}}
| Main
+
| GameMenu
| {{#titleparts: {{{page|{{PAGENAME}} }}} ||-1}}
+
| {{#titleparts: {{{page|{{PAGENAME}} }}} ||-1 }}
}}'''''-menu are:
+
}}
 +
| GameMenu
 +
| Main
 +
| {{#titleparts: {{{page|{{PAGENAME}} }}} ||-1}}
 +
}}'''''<!--
 +
-->]]-menu are:<ul>
 +
|outro=</ul>
 
|default=no sub-menus found.
 
|default=no sub-menus found.
}}
+
|format=template
 +
|template=List Submenus/query template
 +
|link=none<!-- disable automatic turning results into links -->
 +
}}<noinclude>{{documentation}}</noinclude>

Latest revision as of 18:35, 25 July 2012

Sub-menus you can find in the Main-menu are:


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

Description

This template is used to automatically list the submenus of a GameMenu using an SMW-Query.
It uses {{List Submenus/query template}} for output formating.
This template is used by {{GameMenu intro}}.
See these pages for more SMW-documentation:

Syntax

Type the below code somewhere on a page:
{{List Submenus}}
It can accept one parameter to select a specific menu to list, to accommodate usage on any page.
This optional named parameter is called page
It defaults to the pagename where you invoke this template in.
Except when in the Template-namespace; In this case it will default to "GameMenu" which is the main-menu of the game.

Examples

  1. {{List Submenus}} gives:
    Sub-menus you can find in the Main-menu are:
  2. {{List Submenus|page=GameMenu/Build}} gives:
    Sub-menus you can find in the Build-menu are: