Template:Feature: Difference between revisions

adjust the set syntax
add a fallback for title so that feature title is always set
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<onlyinclude>
This is the 'Feature' template.
 
It is used like this:
<pre>
{{Feature
| image =
| imgdesc =
| collection =
| title =
| description =
| notes =
| examples =
| tests =
}}
</pre>
The template doesn't set 'has coordinates' but if the page does have the property, then the infobox will display a map
[[Category:Info templates]]
 
== Template preview ==
</noinclude><onlyinclude>
<!-- Use #set for property setting -->
<!-- Use #set for property setting -->
{{#set:
{{#set:
feature title = {{{title|}}}
feature title = {{{title|{{PAGENAME}}}}}
| feature description = {{{description|}}}
| feature description = {{{description|}}}
| feature notes = {{{notes|}}}
| feature notes = {{{notes|}}}
| feature examples = {{{examples|}}}
| feature examples = {{{examples|}}}
| feature tests = {{{tests|}}}
| feature tests = {{{tests|}}}
| has image description = {{{imgdesc|}}}
| has image collection = {{{collection|}}}
}}
}}


Line 58: Line 40:
<includeonly>[[Category:Feature]]</includeonly>
<includeonly>[[Category:Feature]]</includeonly>
</onlyinclude>
</onlyinclude>
<noinclude>
{{Documentation}}
</noinclude>