link
A link in a navigation menu.
Properties
Whether the link is active.
true: Activefalse: Inactive
A link is considered active if the current URL path matches or contains the link's path. For example, if the current URL path is /blog/tag/cutlery, links pointing to the following paths will be active:
/blog/tag/cutlery/blog/tag
The link.active property is especially useful for implementing active states in navigation menus. For example, when a customer is browsing an article from the "Cutlery" blog, the "Cutlery" link becomes active and is highlighted in the menu.
Whether a child link of the link is active.
true: Activefalse: Inactive
For example, when the current URL path is /blog/tag/cutlery, the child_active property of the parent link /blog/tag/ is true.
Whether the link has a child link pointing to the current URL path.
true: The link has a child link pointing to the current URL path.false: The link has no child link pointing to the current URL path.
Query parameters (the part after the ? in the URL) are ignored during URL matching.
Whether the link points to the current URL path.
true: Points to the current URL path.false: Does not point to the current URL path.
Query parameters (the part after the ? in the URL) are ignored during URL matching.
The handle of the link.
The number of nested levels within the link.
A list of the link's child links.
The title of the link.
The type of the link. Valid values are:
article_link: The link points to an article.blog_link: The link points to a blog.catalog_link: The link points to the catalog of all products.collection_link: The link points to a product collection.collections_link: The link points to a list of product collections.frontpage_link: The link points to the homepage.http_link: The link points to an external webpage.page_link: The link points to a custom page.policy_link: The link points to a policy page.product_link: The link points to a product page.search_link: The link points to the search page.
The URL of the link.