Allows access to the portal site map.

<h1>{{ sitemap.root.title }}</h1>

<ul class="breadcrumb">
{% for crumb in sitemap.current.breadcrumbs %}
<li><a href="{{ crumb.title }}">{{ crumb.title }}</a></li>
{% endfor %}
<li class="active">{{ sitemap.current.title }}</li>
</ul>

{% for child in sitemap.current.children %}
<a href="{{ child.url }}">{{ child.title }}</a>
{% endfor %}

It's also possible to load a site map node by URL path:

{% assign node = sitemap["/content/page1/"] %}
{% if node %}
{% for child in node.children %}
<a href="{{ child.url }}">{{ child.title }}</a>
{% endfor %}
{% endif %}

Site Map Attributes

current

Returns the site map node object for the current page.

root

Returns the site map node object for the root (home) page of the website.

Site Map Node Attributes

breadcrumbs

Returns the breadcrumb site map node objects for the node, starting from the site map root node and ending at parent.

children

Returns the child site map node objects of the node.

description

The description/summary content for the node. (This field may contain HTML.)

entity

Returns the underlying entity object of the node.

If the node has no underlying entity, this value will be null.

is_sitemap_ancestor

Returns true if the sitemap node is an ancestor of the current node, otherwise false.

Added 7.0.0008

is_sitemap_current

Returns true if the sitemap node is the current node, otherwise false.

Added 7.0.0008

parent

Returns the parent site map node of the node.

If the node is the root node, parent will be null.

title

The title of the node.

url

The URL of the node.