Template:Feature: Difference between revisions

From Freephile Wiki
No edit summary
add a fallback for title so that feature title is always set
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<onlyinclude>
This is the 'Feature' template.
<!-- Use #set for property setting -->
 
{{#set:
It is used like this:
feature title = {{{title|{{PAGENAME}}}}}
<pre>
| feature description = {{{description|}}}
{{Feature
| feature notes = {{{notes|}}}
|image=
| feature examples = {{{examples|}}}
|imgdesc=
| feature tests = {{{tests|}}}
| has image description = {{{imgdesc|}}}
| has image collection = {{{collection|}}}
}}
}}
</pre>
[[Category:Info templates]]


== Template preview ==
</noinclude><onlyinclude>
{| class="smworgtable-v2" style="position: relative; float: right; clear: right; width: 260px;"
{| class="smworgtable-v2" style="position: relative; float: right; clear: right; width: 260px;"
! colspan="2" style="padding-top: 2px; " |  {{PAGENAME}} <span style="position: relative; top:-2px; float: right;">[[File:Dialog-information.svg|14px|link=Special:Browse/{{FULLPAGENAME}}]]</span>
! colspan="2" style="padding-top: 2px; " |  {{PAGENAME}} <span style="position: relative; top:-2px; float: right;">[[File:Dialog-information.svg|14px|link=Special:Browse/{{FULLPAGENAME}}]]</span>
|- <!-- *** IMAGE *** -->
|- <!-- *** IMAGE *** -->
{{#if: {{{image|}}} |{{Tablesection |Label=[[File:{{{image|}}}|280px|center|{{{imgdesc|}}}]] |Textcolor=#ddd |Color=#fff }}{{#set: Has image=File:{{{image|}}} }} }}
{{#if: {{{image|}}} |{{Tablesection |Label=[[File:{{{image|}}}|280px|center|link=|{{{imgdesc|}}}]] |Textcolor=#ddd |Color=#fff }}{{#set: Has image=File:{{{image|}}} }} }}
|-
|-
{{#ifeq: {{{imgdesc|}}} | | |{{Tablerow |Label=Image shows: |Value={{{imgdesc|}}} }} }}
{{#ifeq: {{{imgdesc|}}} | | |{{Tablerow |Label=Image shows: |Value={{{imgdesc|}}} }} }}
Line 27: Line 25:
|-
|-
{{#ifeq: {{#show: {{FULLPAGENAME}} |?feature description}} | | |{{Tablerow |Label=Description: |Value={{#show: {{FULLPAGENAME}}|?feature description }} }} }}
{{#ifeq: {{#show: {{FULLPAGENAME}} |?feature description}} | | |{{Tablerow |Label=Description: |Value={{#show: {{FULLPAGENAME}}|?feature description }} }} }}
|-
{{#ifeq: {{#show: {{FULLPAGENAME}} |?Located in}} | | |{{Tablerow |Label=Located in: |Value={{#show: {{FULLPAGENAME}} |?Located in }} }} }}
|-
{{#ifeq: {{#show: {{FULLPAGENAME}} |?Average rainy days}} | | |{{Tablerow |Label=Average rainy days: |Value={{#show:  {{FULLPAGENAME}} |?Average rainy days }} }} }}
|- <!-- *** MAP *** -->
|- <!-- *** MAP *** -->
{{#if: {{#show: {{FULLPAGENAME}} |?Has coordinates }} |{{Tablesection |Label=Map |Color=#dcf0f7 |Textcolor=#0c2c52 }} }}
{{#if: {{#show: {{FULLPAGENAME}} |?Has coordinates }} |{{Tablesection |Label=Map |Color=#dcf0f7 |Textcolor=#0c2c52 }} }}
|-
|-
{{#if: {{#show: {{FULLPAGENAME}} |?Has coordinates }} |{{Tablesection |Label={{#display_map: {{#show: {{FULLPAGENAME}} |?Has coordinates }} |width=260 |height=260 |service=leaflet }} |Color=#fff }} }}
{{#if: {{#show: {{FULLPAGENAME}} |?Has coordinates }} |{{Tablesection |Label={{#display_map: {{#show: {{FULLPAGENAME}} |?Has coordinates }} |width=260 |height=260 |service=leaflet }} |Color=#fff }} }}
|- <!-- *** MORE *** -->
|- <!-- *** MORE *** -->
{{Tablesection |Label=More |Color=#dcf0f7 |Textcolor=#0c2c52 }}   
{{Tablesection |Label=More |Color=#dcf0f7 |Textcolor=#0c2c52 }}   
Line 45: Line 38:
{{#ifeq: {{#show: {{FULLPAGENAME}} |?feature examples}} | | |{{Tablerow |Label=Example: |Value={{#show: {{FULLPAGENAME}} |?feature examples }} }} }}
{{#ifeq: {{#show: {{FULLPAGENAME}} |?feature examples}} | | |{{Tablerow |Label=Example: |Value={{#show: {{FULLPAGENAME}} |?feature examples }} }} }}
|}
|}
<includeonly>{{DISPLAYTITLE:{{{feature title|}}} }}[[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