Template:Place directory: Difference between revisions
| Robertbaxter (talk | contribs) No edit summary | Robertbaxter (talk | contribs)  No edit summary | ||
| (3 intermediate revisions by the same user not shown) | |||
| Line 4: | Line 4: | ||
|    {{#if:{{{state_province|}}}|[[In state/province::{{{state_province}}}]]|}} |    {{#if:{{{state_province|}}}|[[In state/province::{{{state_province}}}]]|}} | ||
|    {{#if:{{{city|}}}|[[In city::{{{city}}}]]|}} |    {{#if:{{{city|}}}|[[In city::{{{city}}}]]|}} | ||
|   {{#if:{{{category|}}}|[[Category:{{{category}}}]]|}} | |||
|    | format=count |    | format=count | ||
| }}) === | }}) === | ||
| {| class="wikitable" | {| class="wikitable" | ||
| ! Imported !! Active !! Inactive | ! Imported !! Active !! Inactive !! Unknown | ||
| |- | |- | ||
| | {{#ask:[[Category:Places]][[Has status::Imported]] | | {{#ask:[[Category:Places]][[Has status::Imported]] | ||
| Line 13: | Line 14: | ||
|    {{#if:{{{state_province|}}}|[[In state/province::{{{state_province}}}]]|}} |    {{#if:{{{state_province|}}}|[[In state/province::{{{state_province}}}]]|}} | ||
|    {{#if:{{{city|}}}|[[In city::{{{city}}}]]|}} |    {{#if:{{{city|}}}|[[In city::{{{city}}}]]|}} | ||
|   {{#if:{{{category|}}}|[[Category:{{{category}}}]]|}} | |||
|    | format=ul |    | format=ul | ||
|    | headers=hide |    | headers=hide | ||
|   | limit=150 | |||
| }} | }} | ||
| | {{#ask:[[Category:Places]][[Is active::true]] | | {{#ask:[[Category:Places]][[Is active::true]] | ||
| Line 20: | Line 23: | ||
|    {{#if:{{{state_province|}}}|[[In state/province::{{{state_province}}}]]|}} |    {{#if:{{{state_province|}}}|[[In state/province::{{{state_province}}}]]|}} | ||
|    {{#if:{{{city|}}}|[[In city::{{{city}}}]]|}} |    {{#if:{{{city|}}}|[[In city::{{{city}}}]]|}} | ||
|   {{#if:{{{category|}}}|[[Category:{{{category}}}]]|}} | |||
|    | format=ul |    | format=ul | ||
|    | headers=hide |    | headers=hide | ||
|   | limit=150 | |||
| }} | }} | ||
| | {{#ask:[[Category:Places]][[Is active::false]][[Has status::Closed||Inactive||Temporarily closed||Historic]] | | {{#ask:[[Category:Places]][[Is active::false]][[Has status::Closed||Inactive||Temporarily closed||Historic]] | ||
| Line 27: | Line 32: | ||
|    {{#if:{{{state_province|}}}|[[In state/province::{{{state_province}}}]]|}} |    {{#if:{{{state_province|}}}|[[In state/province::{{{state_province}}}]]|}} | ||
|    {{#if:{{{city|}}}|[[In city::{{{city}}}]]|}} |    {{#if:{{{city|}}}|[[In city::{{{city}}}]]|}} | ||
|   {{#if:{{{category|}}}|[[Category:{{{category}}}]]|}} | |||
|    | format=ul |    | format=ul | ||
|    | headers=hide |    | headers=hide | ||
|   | limit=150 | |||
| }} | }} | ||
| | {{#ask:[[Category:Places]][[Is active::false]][[Has status::Unknown]] | | {{#ask:[[Category:Places]][[Is active::false]][[Has status::Unknown]] | ||
| Line 34: | Line 41: | ||
|    {{#if:{{{state_province|}}}|[[In state/province::{{{state_province}}}]]|}} |    {{#if:{{{state_province|}}}|[[In state/province::{{{state_province}}}]]|}} | ||
|    {{#if:{{{city|}}}|[[In city::{{{city}}}]]|}} |    {{#if:{{{city|}}}|[[In city::{{{city}}}]]|}} | ||
|   {{#if:{{{category|}}}|[[Category:{{{category}}}]]|}} | |||
|    | format=ul |    | format=ul | ||
|    | headers=hide |    | headers=hide | ||
|   | limit=150 | |||
| }} | }} | ||
| |}</includeonly><!-- | |}</includeonly><!-- | ||
| Line 41: | Line 50: | ||
| == Usage == | == Usage == | ||
| This template can be called with values for country, state/province, and/or  | This template can be called with values for country, state/province, city, and/or category. You can also optionally provide a title override for the header that appears above the table. | ||
| <pre>{{Place directory|country=United States|state_province=Michigan}}</pre> | <pre>{{Place directory|country=United States|state_province=Michigan}}</pre> | ||
| Line 68: | Line 77: | ||
| 			"label": "Country", | 			"label": "Country", | ||
| 			"description": "The country to be queried.", | 			"description": "The country to be queried.", | ||
| 			"type": "string", | |||
| 			"suggested": true | |||
| 		}, | |||
| 		"category": { | |||
| 			"label": "Category", | |||
| 			"description": "The category to be queried (used for broader regions.", | |||
| 			"type": "string", | 			"type": "string", | ||
| 			"suggested": true | 			"suggested": true | ||
| Line 77: | Line 92: | ||
| 		"state_province", | 		"state_province", | ||
| 		"country", | 		"country", | ||
|         "category", | |||
| 		"title" | 		"title" | ||
| 	], | 	], | ||
Latest revision as of 16:22, 16 October 2025
This is a helper template for displaying a list of places within a region, broken up into their type categories (so that you can easily display active + inactive + imported places at the same time. It's meant to aid regional validation work: Help:Validating a place (and was created specifically for Atlas:Midwest.
Usage
This template can be called with values for country, state/province, city, and/or category. You can also optionally provide a title override for the header that appears above the table.
{{Place directory|country=United States|state_province=Michigan}}
Michigan (16)
| Imported | Active | Inactive | Unknown | 
|---|---|---|---|
TemplateData
Table display of imported, active, and inactive places in a region.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| City | city | The city to be queried. | String | optional | 
| State/province | state_province | The state/province to be queried. | String | optional | 
| Country | country | The country to be queried. | String | suggested | 
| Category | category | The category to be queried (used for broader regions. | String | suggested | 
| Title | title | Optional title for the header (H3) used above the table (otherwise uses the most specific of the provided location names). | String | optional |