Difference between revisions of "Template:LevelCrossing"
Line 106: | Line 106: | ||
+ | |||
+ | ## Categories ## | ||
--><includeonly><!-- | --><includeonly><!-- | ||
Categorise in the main "All Crossings" category. They will be sorted by the name given in then "name" parameter, unless that is not used, in which case it uses the page name. | Categorise in the main "All Crossings" category. They will be sorted by the name given in then "name" parameter, unless that is not used, in which case it uses the page name. | ||
-->{{DEFAULTSORT:{{{name|{{PAGENAME}}}}}}} | -->{{DEFAULTSORT:{{{name|{{PAGENAME}}}}}}} | ||
− | [[Category:All Crossings]]</includeonly> | + | [[Category:All Crossings]] |
+ | |||
+ | <!-- If type is set to "train", add to "Level Crossing" category --> | ||
+ | {{#ifeq: {{{type|}}}| train | [[Category:Level Crossings]]}}</includeonly> |
Revision as of 14:29, 13 October 2015
<templatedata>
{
"description": "",
"params": {
"name": {
"description": "The name of the crossing",
"type": "string",
"required": true
},
"type": {
"description": "This should be set as:\ntrain",
"type": "string",
"required": true
},
"location": {
"description": "The location it is located, this is the local town, village or suburb of city",
"type": "string",
"required": true
},
"country": {
"description": "The Country it is located in",
"type": "string",
"required": true
},
"county": {
"description": "The name of the County",
"type": "string",
"required": true
},
"roads": {
"description": "The name of the road the crossing is located",
"type": "string",
"required": true
},
"crossingtype": {
"description": "This is the type of crossing.\n\nAutomatic Barriers\n\nManually Controlled Gates\n\nManually Controlled Barriers\n\nAutomatic Half Barrier\n\nAutomatic Open Crossing\n\nOpen Crossing\n\nOther Types",
"type": "string",
"required": true
}
}
}
</templatedata>
Example:
The code for the map is added after the crossing type.
{{LevelCrossing | name = Ardrossan Level Crossing | type = train | country = Scotland | county = North Ayrshire | location = Ardrossan | roads = Princes Street | crossingtype = Automatic Barriers {{#display_map: 55.63950883290983,-4.812919646501541|mappingservice=leaflet|zoom=15}} }}
LevelCrossing |