Difference between revisions of "Template:List Submenus/query template"

From Salem Wiki
Jump to: navigation, search
m (display icon-image from 'Has icon' property when available, and display the 'Unknown Item icon.png' when not available or not existing.)
m (Protected "Template:List Submenus/query template": Key feature of wiki ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
<onlyinclude><li><!--
 
<onlyinclude><li><!--
-->[[{{#if: {{HasProp
+
-->[[{{#if: {{HasProp |page={{{1|GameMenu/Learning}}} |Has icon}}
|page={{#titleparts: {{{1|}}} ||-1 }}
 
|Has icon
 
}}
 
 
| {{#ifexist:
 
| {{#ifexist:
{{#show: {{#titleparts: {{{1|GameMenu/Build}}} ||-1 }}
+
{{#show: {{{1|GameMenu/Learning}}}
 
|?Has icon
 
|?Has icon
 
|link=none
 
|link=none
 
}}
 
}}
| {{#show: {{#titleparts: {{{1|GameMenu/Build}}} ||-1 }}
+
| {{#show: {{{1|GameMenu/Learning}}}
 
|?Has icon
 
|?Has icon
 
|link=none
 
|link=none
 
}}
 
}}
| Image:Unknown Item icon.png{{!}}link=:{{
+
| Image:Unknown Item icon.png{{!}}link={{
#show: {{#titleparts: {{{1|GameMenu/Build}}} ||-1 }}
+
#show: {{{1|GameMenu/Learning}}}
 
|?Has icon
 
|?Has icon
 
|link=none
 
|link=none
 
}}{{!}}No image found, click to upload
 
}}{{!}}No image found, click to upload
 
}}
 
}}
| Image:Unknown Item icon.png{{!}}link=:Image:Menu Button {{#titleparts: {{{1|GameMenu/Build}}} ||-1 }}.png{{!}}No image found, click to upload
+
| Image:Unknown Item icon.png{{!}}link=Image:Menu Button {{#titleparts: {{{1|GameMenu/Learning}}} ||-1 }}.png{{!}}No image found, click to upload
}}]] [[{{{1|GameMenu/Build}}} | {{#titleparts: {{{1|GameMenu/Build}}} ||-1 }}]].<!--
+
}}]] [[{{{1|GameMenu/Learning}}} | {{#titleparts: {{{1|GameMenu/Learning}}} ||-1 }}]].<!--
 
--></li></onlyinclude><noinclude>{{documentation}}</noinclude>
 
--></li></onlyinclude><noinclude>{{documentation}}</noinclude>

Latest revision as of 18:43, 25 July 2012

  • Menu Button Learning.png Learning.

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

    Description

    This template is used to format the output-results of the SMW-Query used in {{List Submenus}}.
    It uses {{HasProp|Has icon}}, on the page of the entry to be displayed, and use that as icon-image to display.
    If it can't find that property or the set image doesn't exist it will use Unknown Item icon.png and link this image, so ppl can click it, to "Menu Button " followed by the last part of the entry-name followed by ".png".
    fe. when an entry should be displayed for "GameMenu/subpage", then this link would point to "Image:Menu Button subpage.png".
    See Inline queries to see how an inline query can use this to format the display of query results.