Skip to Content

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

FieldTypeDescription
levelsIntThe 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.
titleStringThe display name of the link, typically shown as the link’s label in navigation components.
typeStringThe type of object this link points to, such as ‘product’, ‘category’, ‘page’, or ‘article’.
urlStringThe URL that this link points to. This can be an internal or external address.
targetStringThe target attribute for the link, indicating how the link should be opened (e.g., in a new tab).
productProductThe product object associated with this link, if the link points to a product.
productGroupProductGroupThe category object associated with this link, if the link points to a category.
pagePageThe page object associated with this link, if the link points to a page.
articleArticleThe 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