Template:Feature: Difference between revisions

From Freephile Wiki
add has image description and has image collection properties
add a fallback for title so that feature title is always set
 
(2 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 description = {{{imgdesc|}}}
| has image collection = {{{collection|}}}
| has image collection = {{{collection|}}}
}}
}}
Line 60: Line 40:
<includeonly>[[Category:Feature]]</includeonly>
<includeonly>[[Category:Feature]]</includeonly>
</onlyinclude>
</onlyinclude>
<noinclude>
{{Documentation}}
</noinclude>

Latest revision as of 14:51, 12 September 2025


Feature
Summary
Title: Feature
More


Documentation icon Template documentation[view] [edit] [history] [purge]

This is the 'Feature' template.

Usage

When you create a new Feature page, just use the Feature form which automatically uses this template.

If you were to manually include it in a page, it would be used like this:

{{Feature
 | image =
 | imgdesc =
 | collection =
 | title =
 | description =
 | notes =
 | examples =
 | tests =
}}

The template doesn't set has coordinates. But if a page does have the property, then the infobox will display a map


A template for creating pages with the content type "Feature", making the pages semantically rich, included in the Feature category and displayed on the Feature page.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Feature imageimage

a suitable representation of the feature

Fileoptional
feature image descriptionimgdesc

describe the image used

Stringoptional
Image collectioncollection

no description

Unknownoptional
Feature Titletitle

no description

Stringoptional
Feature descriptiondescription

no description

Stringoptional
notesnotes

no description

Stringoptional
examplesexamples

no description

Stringoptional
teststests

no description

Stringoptional