Template:Place/service: Difference between revisions
| Robertbaxter (talk | contribs) No edit summary Tag: Manual revert | Robertbaxter (talk | contribs)  No edit summary | ||
| Line 1: | Line 1: | ||
| <noinclude></noinclude><includeonly>{{#subobject:{{{service_type}}}|@category=Services | <noinclude> | ||
| 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 == | |||
| <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 service type      = {{{service_type|}}} | ||
| | Has service name      = {{{service_name|}}} | | Has service name      = {{{service_name|}}} | ||
| | Has service url       = {{{service_url|}}} | | Has service 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> | ||
Revision as of 02:55, 18 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 |