Purpose
[edit]The {{RouteSection}} template provides a standardized way to display information about individual sections of a route, such as hiking trails, cycling paths, or other itineraries.
Why
[edit]1. Using structured data in a structured way. Values (like length, duration, ascent) can be pulled from or linked to Wikidata, ensuring consistency and reducing duplication, which enables:
- easy retrieval of verified route data
- dynamic integration with Template:Mapshapes
This template serves as a bridge between structured route metadata and visual representation on the wiki.
Usage
[edit]Basic syntax:
{{RouteSection
| name = Example Trail Section
| length = 8 km
| duration = 3 h
| ascent = 500 m
| wikidata = Q123456
}}
The template invokes Module:RouteSection to display the formatted output.
Parameters
[edit]| Parameter | Description | Example |
|---|---|---|
name |
Name of the trail section. | Mountain Pass Trail
|
length |
Length of the section (with or without units). | 12 km
|
duration |
Average duration or time to complete the section. | 4 h
|
ascent |
Total elevation gain (positive ascent). | 450 m
|
wikidata |
Wikidata item ID for this section (enables data linkage and Mapframe usage). | Q987654
|
convert |
Optional flag (e.g. yes) to convert or format numeric units automatically. |
yes
|
TemplateData
[edit]Displays a summary of a route section with details like name, length, and ascent.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Route name | name 1 | Name or title of the route section. | String | required |
| Length | length 2 | Total distance of the route section (e.g., in km or mi). | String | suggested |
| Duration | duration 3 | Estimated time to complete the route section. | String | optional |
| Ascent | ascent 4 | Total elevation gain for the route section (e.g., in meters). | Number | optional |
| Wikidata ID | wikidata 5 | Wikidata item ID associated with the route section (e.g., Q12345). | Line | optional |
| Convert units | convert 6 | If set, adds a simple unit conversion.
| String | optional |
Future additions
[edit]- Formatting improvements
- Parameters: role (excursion, approach, etc.), from, to. Descent should not be a parameter. Only cumulative elevation gain (called ascent in the template) is novel information. Descent (cumulative elevation loss) can simply be calculated from the combination of start point, end point, and cumulative elevation gain.
- Backlinks from sections displayed in a Template:Mapframe to the relevant {{RouteSection}}s in the text.
- Elevation charts.
See also
[edit]- Module:RouteSection – Lua module used by this template.
- Template:Mapshapes – For visualizing routes with subsections.