Changes between Version 188 and Version 189 of TaggingPresets


Ignore:
Timestamp:
2021-07-20T10:06:52+02:00 (5 years ago)
Author:
marcello@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TaggingPresets

    v188 v189  
    223223   Whether to search in `values=""` and `display_values=""`, respectively, `value=""` and `display_value=""` of `<combo />` or `<multiselect />` searching for presets.
    224224 value_template="template"::
    225    A template to generate the value automatically based on other tag values of the object. The syntax 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)'' \\
    226226   For instance, `"Bus {ref}: {from} → {to}"` can be used to generate the name of a bus route relation. \\
    227227  **Note**: There are some minor problems with this attribute, see #20851 and #20861.
    228228\\
    229229
    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 the Selection).
     230===== name_template and value_template details ===== #name_templatedetails
     231Name templates can be used to define custom formatting for OSM primitives or GPX waypoints (for example in the Relations or Selection windows).
    232232
    233233{{{
     
    254254
    255255====== Syntax ======#NameTemplateSyntax
    256 * `{var}` - use value of variable var
    257 * `?{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 all variables used inside exist
     256* `{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.
    258258* `!{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}\!`.
    259260\\
    260261
    261262====== Available values ======
    262 For formatting of OSM primitives , the value of any tag can be used. You can use `{special:everything}` to see what values are available for your gpx waypoints.
    263 
    264 Some additional variables are available  via the special prefix:
     263For 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
     265You can also use these virtual tags:
    265266- `{special:everything}` prints all available values, available for formatting of both primitives and waypoints.
    266 - `{special:id}` prints the ID of an osm primitive
    267 - `{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 tag if it doesn'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.
    268269\\
    269270