Template:Feature: Difference between revisions
From Freephile Wiki
make the description not link |
add a fallback for title so that feature title is always set |
||
(54 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{| class=" | <onlyinclude> | ||
<!-- Use #set for property setting --> | |||
{{#set: | |||
feature title = {{{title|{{PAGENAME}}}}} | |||
| feature description = {{{description|}}} | |||
| feature notes = {{{notes|}}} | |||
| feature examples = {{{examples|}}} | |||
| feature tests = {{{tests|}}} | |||
| has image description = {{{imgdesc|}}} | |||
| has image collection = {{{collection|}}} | |||
}} | |||
{| 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: {{{ | {{#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> | |||
<noinclude> | <noinclude> | ||
{{ | {{Documentation}} | ||
</noinclude> | </noinclude> |
Latest revision as of 14:51, 12 September 2025
Feature | |
---|---|
Summary | |
Title: | Feature |
More |
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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Feature image | image | a suitable representation of the feature | File | optional |
feature image description | imgdesc | describe the image used | String | optional |
Image collection | collection | no description | Unknown | optional |
Feature Title | title | no description | String | optional |
Feature description | description | no description | String | optional |
notes | notes | no description | String | optional |
examples | examples | no description | String | optional |
tests | tests | no description | String | optional |
The above documentation is transcluded from Template:Feature/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |