Difference between revisions of "Template:Feature"

From Freephile Wiki
Jump to navigation Jump to search
(remove link from the 'Explains' arg)
(initial conversion to SMW 'City' template)
Line 1: Line 1:
<includeonly>
+
<noinclude>
{| class="wikitable" align="right" style="width:min-content;"
+
This is the 'Feature' template.
 +
 
 +
It is used like this:
 +
<pre>
 +
{{Feature
 +
|image=
 +
|imgdesc=
 +
}}
 +
</pre>
 +
[[Category:Info templates]]
 +
 
 +
== Template preview ==
 +
</noinclude><onlyinclude>
 +
{| 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:SMW-Info-button.png|14px|link=Special:Browse/{{FULLPAGENAME}}]]</span>
 +
|- <!-- *** IMAGE *** -->
 +
{{#if: {{{image|}}} |{{Tablesection |Label=[[File:{{{image|}}}|280px|center|{{{imgdesc|}}}]] |Textcolor=#ddd |Color=#fff }}{{#set: Has image=File:{{{image|}}} }} }}
 
|-
 
|-
| {{{explains}}}
+
{{#ifeq: {{{imgdesc|}}} | | |{{Tablerow |Label=Image shows: |Value={{{imgdesc|}}} }} }}
| {{{description}}}
+
|- <!-- *** SLIDESHOW *** -->
| {{#if: {{{notes|add notes:[[{{{explains}}}]]}}} | {{{notes}}} }}
+
{{#if: {{{collection|}}} |{{Tablesection |Label={{#ask: [[has image collection::{{{collection|}}}]] |?Has description |widths=220 |heights=220 |format=gallery |widget=slideshow |class=demo-center |navigation=auto |autocaptions=no }} |Color=#fff |Textcolor=#aaa }} }}
| {{#if: {{{tests|}}} | {{{tests}}} }}
+
|- <!-- *** SUMMARY *** -->
| {{#if: {{{examples|}}} | {{{examples}}} }}
+
{{Tablesection |Label=Summary |Color=#dcf0f7 |Textcolor=#0c2c52 }} 
| {{#formlink:form=|link text=edit|link type=post button|tooltip=Edit with Form|target={{PAGENAME}}|popup|reload|returnto=Features}}
+
|-
 +
{{#ifeq: {{#show: {{FULLPAGENAME}} |?Population}} | | |{{Tablerow |Label=Population: |Value={{#show: {{FULLPAGENAME}} |?Population }} }} }}
 +
|-
 +
{{#ifeq: {{#show: {{FULLPAGENAME}} |?Area}} | | |{{Tablerow |Label=Area: |Value={{#show: {{FULLPAGENAME}}|?Area }} }} }}
 +
|-
 +
{{#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 }} }} }}
 +
|- <!-- *** CHARTING *** -->
 +
{{#if: {{{chart|}}} |{{Tablesection |Label=Chart |Color=#dcf0f7 |Textcolor=#fff }} }}
 +
|-
 +
{{#if: {{{chart|}}} |{{Tablesection |Label={{{chart|}}} |Color=#fff }} }}
 +
|- <!-- *** MAP *** -->
 +
{{#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 }} }}
 
|}
 
|}
 
+
<includeonly>{{DISPLAYTITLE:{{{title|}}} }}[[Category:Feature]]</includeonly>
{{#declare:
+
</onlyinclude>
feature explanation=explains
 
|feature description=description
 
|feature notes=notes
 
|feature tests=tests
 
|feature examples=examples
 
}}
 
[[Category:Feature]] [[Category:Wiki]]</includeonly>
 
<noinclude>
 
{{documentation}}
 
</noinclude>
 

Revision as of 18:44, 13 May 2020

This is the 'Feature' template.

It is used like this:

{{Feature
 |image=
 |imgdesc=
}}

Template preview[edit source]

Feature 14px
Summary