Skip to content

HeaderLink

The HeaderLink object represents a single link in the Header of the storefront.

classDiagram
  direction LR
  HeaderLink --> Url
  HeaderLink --> CategoriesList
  HeaderLink --> Category
  HeaderLink --> BlogCategoriesList
  HeaderLink --> BlogCategory
  HeaderLink --> CollectionsList
  HeaderLink --> Collection
  HeaderLink --> Page
  class Url{
  }
  class CategoriesList{
  }
  class Category{
  }
  class BlogCategoriesList{
  }
  class BlogCategory{
  }
  class CollectionsList{
  }
  class Collection{
  }
  class Page{
  }
  class HeaderLink{
    int id
    Url url
    string title
    int order
    bool isPopup
    bool isActive
    bool isAllCategoriesLink
    bool isCategoryLink
    bool isAllCollectionsLink
    bool isCollectionLink
    bool isPageLink
    bool isAllBlogCategoriesLink
    bool isBlogCategoryLink
    CategoriesList categories 
    Category category 
    BlogCategoriesList blogCategories 
    BlogCategory blogCategory 
    CollectionsList collections 
    Collection collection 
    Page page 
    bool isPromotionsLink
  }

Properties

Attribute name Type Description
id int The unique identifier of the link.
url Url The Url object that represents an external or internal url. If the link is associated with a page within the storefront, the direct render an Url object return the relative URL of the page. In other cases, it will be always full external URL.
title string The title of the link.
order int The order of the header link.
isPopup bool Returns true if the link should be opened in a new window.
isAllCategoriesLink bool Returns true if the link represents tree of all of its categories in menu.
isCategoryLink bool Returns true if the link points to a category page.
isAllCollectionsLink bool Returns true if the link represents list of all of its collections in menu.
isCollectionLink bool Returns true if the link points to a collection page.
isAllBlogCategoriesLink bool Returns true if the link represents list of all of its blog categories in menu.
isBlogCategoryLink bool Returns true if the link points to a blog category page.
isPageLink bool Returns true if the link points to an information page.
categories CategoriesList Reference to the CategoriesList object that represents the list of categories.
category Category Reference to the Category object that represents the category.
blogCategories BlogCategoriesList Reference to the BlogCategoriesList object that represents the list of blog categories.
blogCategory BlogCategory Reference to the BlogCategory object that represents the blog category.
collections CollectionsList Reference to the CollectionsList object that represents the list of collections.
collection Collection Reference to the Collection object that represents the collection.
page Page Reference to the Page object that represents the information page.
isPromotionsLink bool Returns true if the link points to a page with products on sale.

Examples

id property

{{ headerLink.id }}
1

url property

{{ headerLink.url }}
/en_US/contact

title property

{{ headerLink.title }}
Example Website

order property

{{ headerLink.order }}
2

isPopup property

{{ headerLink.isPopup }}
true
{{ headerLink.isAllCategoriesLink }}
true
{{ headerLink.isCategoryLink }}
true
{{ headerLink.isAllCollectionsLink }}
true
{{ headerLink.isCollectionLink }}
true
{{ headerLink.isAllBlogCategoriesLink }}
true
{{ headerLink.isBlogCategoryLink }}
true
{{ headerLink.isPageLink }}
true

categories property

{% for category in headerLink.categories %}
  <p>{{ category.description }}</p>
{% endfor %}
<p>example category description 1</p>
<p>example category description 2</p>
<p>example category description 3</p>

category property

{{ headerLink.category.name }}
Example category

blogCategories property

{% for category in headerLink.blogCategories %}
  <p>{{ category.description }}</p>
{% endfor %}
<p>example blog category description 1</p>
<p>example blog category description 2</p>
<p>example blog category description 3</p>

blogCategory property

{{ headerLink.blogCategory.name }}
Example blog category

collections property

{% for category in headerLink.collections %}
  <p>{{ category.description }}</p>
{% endfor %}
<p>example collection description 1</p>
<p>example collection description 2</p>
<p>example collection description 3</p>

collection property

{{ headerLink.collection.name }}
Example collection

page property

{{ headerLink.page.name }}
Example page
{{ headerLink.isPromotionsLink }}
true