Changes between Version 188 and Version 189 of TaggingPresets
- Timestamp:
- 2021-07-20T10:06:52+02:00 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TaggingPresets
v188 v189 223 223 Whether to search in `values=""` and `display_values=""`, respectively, `value=""` and `display_value=""` of `<combo />` or `<multiselect />` searching for presets. 224 224 value_template="template":: 225 A template to generate the value automatically based on other tag values of the object. The s yntax of`name_template=""` is used, [#NameTemplateSyntax see below]. ''(since r17639)'' \\225 A template to generate the value automatically based on other tag values of the object. The same syntax as in `name_template=""` is used, [#NameTemplateSyntax see below]. ''(since r17639)'' \\ 226 226 For instance, `"Bus {ref}: {from} → {to}"` can be used to generate the name of a bus route relation. \\ 227 227 **Note**: There are some minor problems with this attribute, see #20851 and #20861. 228 228 \\ 229 229 230 ===== name_template details ===== #name_templatedetails 231 Name templates can be used to define custom formatting for OSM primitives or GPX waypoints (for example in the Relations or theSelection).230 ===== name_template and value_template details ===== #name_templatedetails 231 Name templates can be used to define custom formatting for OSM primitives or GPX waypoints (for example in the Relations or Selection windows). 232 232 233 233 {{{ … … 254 254 255 255 ====== Syntax ======#NameTemplateSyntax 256 * `{ var}` - use value ofvariable var257 * `?{condition1 'value1' | condition2 'value2 | 'value3'}` - use ''value1'' if ''condition1'' is satisfied, ''value3'' if no condition is satisfied. Condition can be either explicit - in [wikitr:/Help/Action/Search JOSM search] syntax - or implicit ; the value is used when allvariables used inside exist256 * `{tag}` - insert the value of the tag. 257 * `?{condition1 'value1' | condition2 'value2' | 'value3'}` - use ''value1'' if ''condition1'' is satisfied, else use ''value2'' if ''condition2'' is satisfied, finally use ''value3'' if no condition is satisfied. Condition can be either explicit - in [wikitr:/Help/Action/Search JOSM search] syntax - or implicit: The value is used when all tags referenced inside exist. 258 258 * `!{search_expression 'template'}` - search_expression is evaluated and first matching primitive is used as context for template. Useful for example to get tags of parent relation. 259 * `\` - use a backslash to escape special characters '{', '}', '?', '!'. Eg. `What is this\? It is a {type}\!`. 259 260 \\ 260 261 261 262 ====== Available values ====== 262 For formatting of OSM primitives , the value of any tag can be used.You can use`{special:everything}` tosee what values areavailableforyour gpx waypoints.263 264 Some additional variables are available via the special prefix:263 For formatting of OSM primitives, the value of any tag can be used. Use the tag `{special:everything}` to display all available tags, eg. on your gpx waypoints. 264 265 You can also use these virtual tags: 265 266 - `{special:everything}` prints all available values, available for formatting of both primitives and waypoints. 266 - `{special:id}` prints the ID of anosm primitive267 - `{special:localName}` prints the localized name, that is the value of `name:lang` for your language if it is available or the value of the name tagif itdoesn't.267 - `{special:id}` prints the ID of the osm primitive. 268 - `{special:localName}` prints the localized name, that is the value of `name:lang` for your language if it is available, or the value of `name` if it is not. 268 269 \\ 269 270
