Template:Area inline: Difference between revisions
Jump to navigation
Jump to search
HiddenDragon (talk | contribs) mNo edit summary |
HiddenDragon (talk | contribs) (Added categories, additional icon size templates) |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#cargo_query: tables = areas | <includeonly>{{#cargo_query: tables = areas | ||
| fields = _pageName=page, name, icon, CONCAT('true') = inline, CONCAT('{{#replace:{{{2|}}}|'|\'}}') = altname, CONCAT('{{#if:{{{w|}}}|{{{w}}}|25}}') = w, | | fields = _pageName=page, name, icon, CONCAT('true') = inline, CONCAT('{{#replace:{{{2|}}}|'|\'}}') = altname, CONCAT('{{#if:{{{w|}}}|{{{w}}}|25}}') = w, | ||
| where = _pageName = "{{#replace:{{{1}}}|'|\'}}" | | where = name = "{{#replace:{{{1}}}|'|\'}}" OR _pageName = "{{#replace:{{{1}}}|'|\'}}" | ||
| format = template | | format = template | ||
| template = Area/ | | template = Area full/format | ||
| named args = yes | | named args = yes | ||
| limit = 1 | | limit = 1 | ||
| order by = _ID | | order by = _ID | ||
| more results text= | | more results text= | ||
| default = [[{{{1}}}|{{{2|{{{1}}}}}}]][[Category:Pages with unknown areas]] | | default = [[{{{1}}}|{{{2|{{{1}}}}}}]]{{Main namespace only|[[Category:Pages with unknown areas]]}} | ||
}}</includeonly><noinclude>{{documentation|content= | }}</includeonly><noinclude>{{documentation|content= | ||
{{shortcut|Area}} | |||
Similar to [[Template:Area full]], but exclusively supports inline usage. | Similar to [[Template:Area full]], but exclusively supports inline usage. | ||
If provided, the second parameter changes the display name of the condition. | If provided, the second parameter changes the display name of the condition. | ||
== Examples == | |||
{{Template demo | |||
| style = table | |||
| <nowiki>{{Area|Acid}}</nowiki> | |||
| <nowiki>{{Area|Fire|Fiery}}</nowiki> | |||
}} | |||
== See also == | |||
* {{t link|Area full}} - Displays more detailed information about an area. | |||
* {{t link|Area page}} - Page generating template responsible for adding an area into the area Cargo table so that it can be referenced by this template. | |||
== | === Alternate icon sizes === | ||
* {{t link| | * {{t link|SmArea}} - sets the default size to 20 instead of 25 | ||
* {{t link| | * {{t link|MdArea}} - sets the default size to 30 instead of 25 | ||
* {{t link|LgArea}} - sets the default size to 40 instead of 25 | |||
== Template data == | == Template data == | ||
<templatedata> | <templatedata> | ||
{ | { | ||
"description": "Display compact/inline information for a surface or area.", | |||
"format": "inline", | |||
"params": { | "params": { | ||
"1": { | "1": { | ||
"label": "Area name", | "label": "Area name", | ||
"type": " | "description": "The name of the surface. This should correspond with the page name for that surface.", | ||
"type": "wiki-page-name", | |||
"required": true | "required": true | ||
}, | }, | ||
"2": { | "2": { | ||
"label": "altname", | "label": "altname", | ||
"description": "Alternative display name", | "description": "Alternative display name.", | ||
"type": "string" | "type": "string" | ||
} | } | ||
Line 46: | Line 51: | ||
"format": "inline" | "format": "inline" | ||
} | } | ||
</templatedata>}}</noinclude> | </templatedata>}} | ||
[[Category:Templates]] | |||
[[Category:Link templates]] | |||
[[Category:Area templates]] | |||
[[Category:Cargo templates]] | |||
</noinclude> |
Latest revision as of 22:20, 10 February 2025
Template documentation
Shortcut
- {{Area}}
Similar to Template:Area full, but exclusively supports inline usage.
If provided, the second parameter changes the display name of the condition.
Examples
Markup | Renders as |
---|---|
{{Area|Acid}} | ![]() |
{{Area|Fire|Fiery}} | ![]() |
See also
- {{Area full}} - Displays more detailed information about an area.
- {{Area page}} - Page generating template responsible for adding an area into the area Cargo table so that it can be referenced by this template.
Alternate icon sizes
- {{SmArea}} - sets the default size to 20 instead of 25
- {{MdArea}} - sets the default size to 30 instead of 25
- {{LgArea}} - sets the default size to 40 instead of 25
Template data
Display compact/inline information for a surface or area.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Area name | 1 | The name of the surface. This should correspond with the page name for that surface. | Page name | required |
altname | 2 | Alternative display name. | String | optional |