User:MarkS/Template:Place
Summary
A template to place details of a place on to the wiki page. The template places a text description in the page itself and a box on the right with links to further details on the place.
Parameters
The following parameters can be passed into the template:
Parameter name | Required | Purpose |
name | Yes | The name of the place being referred to (eg. Nottingham). |
type | Yes | The type of place. Recognised values are: village, city, town, district, province. |
area | Yes | The area the place is in (eg. China) |
subarea | No | A subarea of the area (for example a province of china). It is possible to not define the subarea and just use area instead. |
lat | Yes | The latitude of the place. |
long | Yes | The longitude of the place. |
zoom | No | The zoom level to open linked to maps at. Default value is 12. |
image | No | The title of the image to display. No image will be display if image is not defined |
sortkey | No | The sortkey for categories. If sortkey isn't supplied the name of the place will be used as the sortkey. |
list | No | URL of a mailing list for the place. If this is not supplied no archive link will appear. |
archive | No | URL of an archive page for the place. If this is not supplied no archive link will appear. |
forum | No | URL of a forum page for the place. If this is not supplied no forum link will appear. |
wikipedia | No | The article name on wikipedia. Default value is name |
Categories
If there is a category for the name of the place (eg. New York) then then this category is added to the page.
The template will allow the place to a category types in subarea (eg. Cities in Berkshire).
If the subarea is not defined then the template will also add the place to the category types in area (eg. Cities in UK). This increases the change the place will be allocated to a category that exists, but ensures that it if a more specfic category exists it isn't allocated to the parent category.
Examples
{{place|name=Reading|type=town|area=Berkshire|image=Image:UK_Reading_status.png|lat=51.445|long=-0.9685 |zoom=11}}
Result:
- Page is allocated to the Reading category if it exists
- Page is allocated to the Towns in Berkshire category.
- No link to mailing list, forum or archive is added.
- The image UK_Reading_status.png is added to the information box.
{{place|name=Los Angeles|type=city|subarea=California|area=United States|image=|lat=43|long=-75.5|zoom=7}}
- Page is allocated to the Lost Angeles category if it exists
- Page is allocated to the Cities in California category.
- Page is allocated to the Cities in United States category if the more specific category Cities in California does not exist
- No link to mailing list, forum or archive is added.
- No image of the place is added to the information box.
The template itself
{{{name}}}, {{{area}}} |
Latitude : {{{lat}}}, Longitude : {{{long}}} |
Browse {{{name}}} map |
Edit map |
|
External links:
|
Use this template for your city |
{{{name}}} is a {{{type}}} in [[{{{area}}}]] at latitude {{{lat}}}, longitude {{{long}}}.