| This is a documentation subpage for Template:KeyDescription/Sandbox. It contains usage information, categories and other content or metadata that is not part of the original template. |
This is a proposed replacement for the {{KeyDescription}} template. The goal is to let it get the data from the data items if needed, but continue to work with the template parameters as before. This offers a migration path to removing all the template parameters in the future. Note that the template itself has just a few lines. All of the work is done in Module:DescriptionFromDataItem. At a minimum, template needs to figure out what key it is describing. If this template is placed in a key page, it will automatically determine the right data item, so inserting it is as simple as {{KeyDescription}}, with no parameters. Magic. For this help page, we have to specify the key parameter. Everything else is optional.
- TODO
- Support statuslink URLs (stored as references in some of the entities)
- The "status" localization word should come from data item, not be hardcoded in {{Description}}
- Import and support seealso, required, and other, less structured values
Dynamic - no template parameters
These templates do not provide any functional parameters. For this demo page, you still have to specify the key/tag values because the current page is not where the template will be placed. Also need to specify the language code (might be required), and hide the languagelink bar to reduce the clutter.
- Done
- descriptions
- image
- element icons (node/way/area/...)
- status
- Support local restrictions with the limited to language (P26) qualifiers (e.g. noexit=* should not be used on ways in the German-speaking regions)
{{KeyDescription/Sandbox
|key=bridge:movable
|lang=en
|languagelinks=no
}}
Template with parameters that partially match data item
Here are some examples of how side cards will be different when generated with and without parameters. In each pair, left card is generated just like above, without parameters.
bridge:movable=*
{{KeyDescription/Sandbox
|key=bridge:movable
}}
|
{{KeyDescription/Sandbox
|key=bridge:movable
|image=File:MovableBridge roll.gif
|description=The mechanism by which a movable bridge moves to clear the way beloweea.
|group=bridges
|onNode=no
|onWay=yes
|onArea=yes
|onRelation=yes
|combination=
* {{Tag|bridge|movable}}
* {{Tag|man_made|bridge}}
|status=approved
|statuslink=Proposed features/Bridge types
}}
|
noexit=* with the English description:
{{KeyDescription/Sandbox
|key=noexit
}}
|
{{KeyDescription/Sandbox
|key=noexit
|description=To describe the end of a way.
|image=File:Noexit.jpg
|group=restrictions
|onNode=yes
|onWay=yes
|onArea=no
|onRelation=no
|status=in use
}}
|
noexit=* with the German description.
Note that the onWay here is different because the German-speaking community prohibits it. See noexit (Q501).
{{KeyDescription/Sandbox
|key=noexit
|lang=de
}}
|
{{KeyDescription/Sandbox
|key=noexit
|image=File:Noexit.jpg
|description=Beschreibt, dass ab diesem Punkt kein Weiterkommen möglich ist
|onNode=yes
|onWay=no
|onArea=no
|onRelation=no
|lang=de
|status=in use
}}
|
|
|
|
|
|
|