Template:Infobox place/service: Difference between revisions
Robertbaxter (talk | contribs) No edit summary |
Robertbaxter (talk | contribs) No edit summary |
||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude>{{Infobox place/service|service_url=https://www. | <noinclude> | ||
This is a helper template for [[Template:Infobox place]], it takes information about a single service and displays it as a segment (wrapped in a <code><nowiki><div/></nowiki></code>) of the "Services" section. | |||
== Behavior == | |||
''The examples below are embedded in the "Services" section of empty infoboxes for accurate table row display.'' | |||
If an (optional) <code>service_name</code> has been provided, it is displayed as the text, otherwise the (required) <code>service_type</code> is used. Service types are a limited set of tokens that can be used for filtering in the atlas and elsewhere, where as service names are unique names for services (e.g. the "Periodical" at [[Taxonomy Press]] is named "The Floral Observer"). | |||
<pre>{{Infobox place/service|service_type=Residency}} | |||
{{Infobox place/service|service_type=Residency|service_name=Artist Residency at Directangle}}</pre> | |||
{| class="infobox" | |||
! Services | |||
| {{Infobox place/service|service_type=Residency}} | |||
|- | |||
! Services | |||
| {{Infobox place/service|service_type=Residency|service_name=Artist Residency at Directangle}} | |||
|} | |||
An optional <code>service_url</code> can be provided, which turns the text into an external link. | |||
<pre>{{Infobox place/service|service_type=Residency|service_name=Artist Residency at Directangle|service_url=https://www.directanglepress.com/residency}}</pre> | |||
{| class="infobox" | |||
! Services | |||
| {{Infobox place/service|service_type=Residency|service_name=Artist Residency at Directangle|service_url=https://www.directanglepress.com/residency}} | |||
|} | |||
== Template Data == | |||
<templatedata> | |||
{ | |||
"params": { | |||
"service_url": { | |||
"label": "Service link", | |||
"description": "A URL to more information about the service.", | |||
"type": "url", | |||
"suggested": true | |||
}, | |||
"service_name": { | |||
"label": "Service name", | |||
"description": "A custom name for the service.", | |||
"type": "string" | |||
}, | |||
"service_type": { | |||
"label": "Service type", | |||
"description": "A general type for the service (used in filtering/querying + categories).", | |||
"type": "string", | |||
"required": true | |||
} | |||
}, | |||
"description": "A helper template to display items in the \"Services\" row in the infobox for a place.", | |||
"format": "inline" | |||
} | |||
</templatedata> | |||
</noinclude><includeonly><div>{{#if:{{{service_url|}}}|[{{{service_url}}} {{#if:{{{service_name|}}}|{{{service_name}}}|{{{service_type}}}}}]|{{#if:{{{service_name|}}}|{{{service_name}}}|{{{service_type}}}}}}}</div></includeonly> |
Latest revision as of 00:43, 17 December 2024
This is a helper template for Template:Infobox place, it takes information about a single service and displays it as a segment (wrapped in a <div/>
) of the "Services" section.
Behavior
The examples below are embedded in the "Services" section of empty infoboxes for accurate table row display.
If an (optional) service_name
has been provided, it is displayed as the text, otherwise the (required) service_type
is used. Service types are a limited set of tokens that can be used for filtering in the atlas and elsewhere, where as service names are unique names for services (e.g. the "Periodical" at Taxonomy Press is named "The Floral Observer").
{{Infobox place/service|service_type=Residency}} {{Infobox place/service|service_type=Residency|service_name=Artist Residency at Directangle}}
Services | Residency
|
---|---|
Services | Artist Residency at Directangle
|
An optional service_url
can be provided, which turns the text into an external link.
{{Infobox place/service|service_type=Residency|service_name=Artist Residency at Directangle|service_url=https://www.directanglepress.com/residency}}
Services |
---|
Template Data
A helper template to display items in the "Services" row in the infobox for a place.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Service link | service_url | A URL to more information about the service. | URL | suggested |
Service name | service_name | A custom name for the service. | String | optional |
Service type | service_type | A general type for the service (used in filtering/querying + categories). | String | required |