content_type_urls

Return the available content representations and URLs for a resource.

The result is a list of {ContentType, Url} pairs derived from the resource's content-type dispatch rules. This can be used to present links to HTML, JSON, or other export formats.

For example:

{% for content_type, url in id|content_type_urls %}
    <a href="{{ url }}">{{ content_type|content_type_label }}</a>
{% endfor %}

Edit on GitHub

Referred by

Category

Filters

Template value transformations for text, collections, dates, numbers, URLs, and other data.