Template:Place/service: Difference between revisions
Robertbaxter (talk | contribs) No edit summary |
Robertbaxter (talk | contribs) No edit summary |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude></noinclude><includeonly>{{#subobject:{{{ | <noinclude>{{Class subtemplate}} | ||
| Has service type | This is a helper function for [[Template:Place]], it handles the semantic assignment of properties for a single service. It should not need to be invoked directly—it is the output for the service values in [[Form:Place]]. | ||
| Has | |||
| Has | It calls [[Template:Infobox place/service]] to return the infobox row to display the service. | ||
== TemplateData == | |||
<templatedata> | |||
{ | |||
"params": { | |||
"service_type": { | |||
"label": "Type", | |||
"description": "The type of service (of a list of fixed types). Used for sorting (and display if no name is provided).", | |||
"type": "string", | |||
"suggestedvalues": [ | |||
"Print for hire", | |||
"Public hours", | |||
"Open submissions", | |||
"Workshops", | |||
"Print subscription", | |||
"Residency", | |||
"Periodical", | |||
"Anthology" | |||
], | |||
"required": true | |||
}, | |||
"service_name": { | |||
"label": "Name", | |||
"description": "The custom name for the service (what the studio calls it).", | |||
"type": "string" | |||
}, | |||
"service_url": { | |||
"label": "Link", | |||
"description": "A link to a site that describes the service in more detail.", | |||
"type": "url", | |||
"suggested": true | |||
} | |||
}, | |||
"description": "Support function for the \"Place\" class to make semantic annotations for a service.", | |||
"format": "block" | |||
} | |||
</templatedata> | |||
</noinclude><includeonly>{{#subobject:{{{service_type}}}|@category=Services | |||
| Has service type = {{{service_type|}}} | |||
| Has name = {{{service_name|}}} | |||
| Has URL = {{{service_url|}}} | |||
}}{{Infobox place/service|service_type={{{service_type|}}}|service_name={{{service_name|}}}|service_url={{{service_url|}}}}}</includeonly> | }}{{Infobox place/service|service_type={{{service_type|}}}|service_name={{{service_name|}}}|service_url={{{service_url|}}}}}</includeonly> |
Latest revision as of 04:13, 20 December 2024
This is a helper function for Template:Place, it handles the semantic assignment of properties for a single service. It should not need to be invoked directly—it is the output for the service values in Form:Place.
It calls Template:Infobox place/service to return the infobox row to display the service.
TemplateData
Support function for the "Place" class to make semantic annotations for a service.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Type | service_type | The type of service (of a list of fixed types). Used for sorting (and display if no name is provided).
| String | required |
Name | service_name | The custom name for the service (what the studio calls it). | String | optional |
Link | service_url | A link to a site that describes the service in more detail. | URL | suggested |