Usage: {{tags}}
or {{#foreach tags}}{{/foreach}}
in tag.hbs
you can use {{#tag}}{{/tag}}
to access tag properties
{{tags}}
is a formatting helper for outputting a linked list of tags for a particular post. It defaults to a comma-separated list (without list markup) but can be customised to use different separators, and the linking can be disabled. The tags are output in the order they appear on the post, these can be reordered by dragging and dropping.
The {{tags}}
helper does not output internal tags. This can be changed by passing a different value to the visibility
attribute.
You can use the translation helper for the prefix
and suffix
attribute.
limit
to the helper. E.g. adding a limit of 1 will output just the first tag:
from
and to
either together or on their own. Using to
will override the limit
attribute.
E.g. using from=“2” would output all tags, but starting from the second tag:
1
would do the same as limit=“1”
{{tags from="1" to="1"}}
is the same as {{tags limit="1"}}
visibility
attributevisibility
, which defaults to public
. The key feature build on this so far is Internal Tags, which are tags where the visibility
is marked as internal
instead of public
. These tags will therefore not be output by the {{tags}}
helper unless you specifically ask for them.
By default the visibility
attribute is set to the string “public”. This can be overridden to pass any other value, and if there is no matching value for visibility
nothing will be output. E.g. you can set visibility
to be “internal” to only output internal tags. You can also pass a comma-separated list of values, or the value “all” to output all items.
{{primary_tag.name}}
. You can also access all the same attributes in the object as above if you need more custom output.
primary_tag
, single subsequent tags can be outputted using {{tags.[1].name}}
. Tags can be referenced using a 0 indexed array, for example using tags.[1]
will reference the second tag (the tag immediately after primary_tag
). All the attributes on the tag can be accessed as well.