Template:Feature: Difference between revisions

From Freephile Wiki
No edit summary
revert Special:CreateTemplate and add a link in the doc block to the form
Tag: Undo
Line 1: Line 1:
<noinclude>
{| class="wikitable" align="right" style="width:min-content;"
This is the "Feature" template.
It should be called in the following format:
<pre>
{{Feature
|explains=
|description=
|notes=
|tests=
|examples=
}}
</pre>
Edit the page to see the template text.
</noinclude><includeonly>{| class="wikitable"
! Page or feature name
| [[Feature explanation::{{{explains|}}}]]
|-
! Description
| [[Feature description::{{{description|}}}]]
|-
! Notes
| [[Feature notes::{{{notes|}}}]]
|-
! Test it (after upgrade)
| [[Feature tests::{{{tests|}}}]]
|-
|-
! Examples
| [[{{{explains}}}]]
| [[Feature examples::{{{examples|}}}]]
| {{{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}}
|}
|}


[[Category:Feature]]
{{#declare:
</includeonly>
feature explanation=explains
|feature description=description
|feature notes=notes
|feature tests=tests
|feature examples=examples
}}
<includeonly>[[Category:Feature]] [[Category:Wiki]]</includeonly>
<noinclude>
{{documentation}}
<!-- Categories go in the /doc subpage, and interwikis go in Wikidata. -->
This is the Feature template. To use it, use the [[Form:Feature|Feature]] form.
The [https://www.semantic-mediawiki.org/wiki/Help:Argument_declaration_in_templates declare block] turns parameters into properties
 
</noinclude>

Revision as of 08:16, 28 April 2020

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



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

This is the Feature template. To use it, use the Feature form. The declare block turns parameters into properties