Link
Represents a single navigational link, which may point to a product, category, page, article, or an external URL. Links can be nested to form hierarchical menus.
Type Definition
type Link {
levels: Int
links: [Link]
title: String
type: String
url: String
target: String
product: Product
productGroup: ProductGroup
page: Page
article: Article
}Fields
| Field | Type | Description |
|---|---|---|
levels | Int | The maximum depth of nested child links below this link. |
links | [Link] | The list of child links for this link. Each child link can itself have further children, forming a hierarchy. |
title | String | The display name of the link, typically shown as the link’s label in navigation components. |
type | String | The type of object this link points to, such as ‘product’, ‘category’, ‘page’, or ‘article’. |
url | String | The URL that this link points to. This can be an internal or external address. |
target | String | The target attribute for the link, indicating how the link should be opened (e.g., in a new tab). |
product | Product | The product object associated with this link, if the link points to a product. |
productGroup | ProductGroup | The category object associated with this link, if the link points to a category. |
page | Page | The page object associated with this link, if the link points to a page. |
article | Article | The article object associated with this link, if the link points to an article. |
Relationships
The Link type represents navigational elements within a hierarchical structure. Links can be self-referential through the links field, allowing for nested menu hierarchies. Additionally, a link can reference various content types: it may point to a Product through the product field, to a ProductGroup through the productGroup field, to a Page through the page field, or to an Article through the article field. The type field indicates which of these related types the link actually references.
Example
{
levels
title
type
url
target
links {
title
url
type
}
product {
id
name
}
productGroup {
id
name
}
}Implements
None