MenuItem - Liquid Object Reference - 0.11.4
Object Name | MenuItem |
Version | 0.11.4 |
Description
A MenuItem represents a link in a Menu. It can be a simple label with a link, or it might link to one of the following objects:
- Article
- ArticleCategory
- Page
- Product
- ProductCategory
MenuItems may contain child MenuItems.
Attributes
Attribute | Type | Description |
---|---|---|
article | Article | Returns the Article linked to this MenuItem |
article_category | ArticleCategory | Returns the ArticleCategory linked to this MenuItem |
child_categories | List[ArticleCategory, Page, ProductCategory] | Returns a list of child categories for the linked object. Only relevant when linked_type is one of: article_category, page, product_category |
child_category_levels | Number | Returns the number of levels to show for child categories |
id | String | Returns the unique id for this MenuItem |
identifier | String | Returns the value of the Identifier attribute |
image | Image | Returns the Image for to this MenuItem |
link_label | String | Returns the label for the link, based on its type and linked object (if any) |
link_target | String | Returns the target url or path for the link, based on its type and linked object (if any) |
link_type | String | Returns the type of link this is. It will be one of: article, article_category, page, product, product_category, link |
menu_items | List[MenuItem] | Returns a list of MenuItems belonging to this MenuItem |
page | Page | Returns the Page linked to this MenuItem |
product | Product | Returns the Product linked to this MenuItem |
product_category | ProductCategory | Returns the ProductCategory linked to this MenuItem |
style_classes | String | Returns the CSS classes that should be added for this MenuItem |
Objects that return MenuItems
Back to Liquid Reference for 0.11.4
Back to Documentation