Difference between revisions of "Template:Feature"

From Freephile Wiki
Jump to navigation Jump to search
(unlink the image)
(wrong brackets)
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
+
{| class="wikitable" align="right" style="width:min-content;"
This is the 'Feature' template.
+
|-
 +
| [[{{{explains}}}]]
 +
| {{{description}}}
 +
| {{#if: {{{notes|add notes:[[{{{explains}}}]]}}} | {{{notes}}} }}
 +
| {{#if: {{{tests|}}} | {{{tests}}} }}
 +
| {{#if: {{{examples|}}} | {{{examples}}} }}
 +
| {{#formlink:form=|link text=edit|link type=post button|tooltip=Edit with Form|target={{PAGENAME}}|popup|reload|returnto=Features}}
 +
|}
  
It is used like this:
+
{{#declare:
<pre>
+
feature explanation=explains
{{Feature
+
|feature description=description
|image=
+
|feature notes=notes
|imgdesc=
+
|feature tests=tests
 +
|feature examples=examples
 
}}
 
}}
</pre>
+
<includeonly>[[Category:Feature]] [[Category:Wiki]]</includeonly>
[[Category:Info templates]]
+
<noinclude>
 +
{{documentation}}
 +
<!-- Categories go in the /doc subpage, and interwikis go in Wikidata. -->
 +
The [https://www.semantic-mediawiki.org/wiki/Help:Argument_declaration_in_templates declare block] turns parameters into properties
  
== Template preview ==
+
</noinclude>
</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:Dialog-information.svg|14px|link=Special:Browse/{{FULLPAGENAME}}]]</span>
 
|- <!-- *** 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|}}} }} }}
 
|- <!-- *** SLIDESHOW *** -->
 
{{#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 }} }}
 
|- <!-- *** SUMMARY *** -->
 
{{Tablesection |Label=Summary |Color=#dcf0f7 |Textcolor=#0c2c52 }} 
 
|-
 
{{#ifeq: {{#show: {{FULLPAGENAME}} |?feature title}} | | |{{Tablerow |Label=Title: |Value={{#show: {{FULLPAGENAME}} |?feature title }} }} }}
 
|-
 
{{#ifeq: {{#show: {{FULLPAGENAME}} |?feature description}} | | |{{Tablerow |Label=Description: |Value={{#show: {{FULLPAGENAME}}|?feature description }} }} }}
 
|- <!-- *** 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 }} }}
 
|- <!-- *** MORE *** -->
 
{{Tablesection |Label=More |Color=#dcf0f7 |Textcolor=#0c2c52 }} 
 
|-
 
{{#ifeq: {{#show: {{FULLPAGENAME}} |?feature notes}} | | |{{Tablerow |Label=Notes: |Value={{#show: {{FULLPAGENAME}} |?feature notes }} }} }}
 
|-
 
{{#ifeq: {{#show: {{FULLPAGENAME}} |?feature tests}} | | |{{Tablerow |Label=Test: |Value={{#show: {{FULLPAGENAME}} |?feature tests }} }} }}
 
|-
 
{{#ifeq: {{#show: {{FULLPAGENAME}} |?feature examples}} | | |{{Tablerow |Label=Example: |Value={{#show: {{FULLPAGENAME}} |?feature examples }} }} }}
 
|}
 
<includeonly>[[Category:Feature]]</includeonly>
 
</onlyinclude>
 

Revision as of 09:29, 25 April 2020

[[{{{explains}}}]] {{{description}}} {{{notes}}}
Error: 'popup' and 'returnto' cannot be set in the same function.



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

Usage[edit source]

To use the template, please fill out the Feature form.

Note about implementation[edit source]

The declare block turns parameters into properties

The declare block turns parameters into properties