Difference between revisions of "Template:List Locations/query template/doc"

From Salem Wiki
Jump to: navigation, search
(Initial setup)
 
m (Protected "Template:List Locations/query template/doc": Documentation of key-feature ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Description==
 
==Description==
 
:This template is used to format the output-results of the SMW-Query used in {{t|List Locations}}.
 
:This template is used to format the output-results of the SMW-Query used in {{t|List Locations}}.
 +
:It expects one un-named parameter consisting of a link to a subpage of a page, eg: <code>Terrain/Grassland</code>.
 +
:To compose the filename of the image to show it replaces the '/' with an '_', in the parameter-value, followed by '.png'.
 +
:When the image is displayed, it will link to the original parameter-value, and re-sized to 30px width.
 +
:If no image exist by that name then [[Image:Unknown Item icon.png]] will be shown and linked to the image-file with the composed filename.
 
:See [http://semantic-mediawiki.org/wiki/Help:Inline_queries Inline queries] to see how an inline query can use this to format the display of query results.
 
:See [http://semantic-mediawiki.org/wiki/Help:Inline_queries Inline queries] to see how an inline query can use this to format the display of query results.
 
<includeonly>[[Category:Templates|{{PAGENAME}}]]<!-- Any categories for the template itself -->
 
<includeonly>[[Category:Templates|{{PAGENAME}}]]<!-- Any categories for the template itself -->
 
[[Category:Templates/©TriMoon™|{{SUBPAGENAME}}]]
 
[[Category:Templates/©TriMoon™|{{SUBPAGENAME}}]]
 
</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
 
</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>

Latest revision as of 18:23, 25 July 2012

Description

This template is used to format the output-results of the SMW-Query used in {{List Locations}}.
It expects one un-named parameter consisting of a link to a subpage of a page, eg: Terrain/Grassland.
To compose the filename of the image to show it replaces the '/' with an '_', in the parameter-value, followed by '.png'.
When the image is displayed, it will link to the original parameter-value, and re-sized to 30px width.
If no image exist by that name then Unknown Item icon.png will be shown and linked to the image-file with the composed filename.
See Inline queries to see how an inline query can use this to format the display of query results.