Breadcrumb
A breadcrumb displays the sequential path of pages, indicating the complete path to the current page and offering a means to navigate back to previous points.
Menu Item Schema
Field
Data Type
Description
label
string
User-friendly text for the URL.
url
string
The URL of the menu item.
level
int
The breadcrumb level.
pk
UUID
The UUID of the menu item.
sort_order
int
The order from the oldest ancestor to the current menu item, equal to the level
field.
path
string
The breadcrumb path, with each step encoded into 4 characters.
parent_pk
Null
Always null.
parent
Null
Always null.
generator_name
string
Generator name, e.g., menu_item.
extra_context
JSON
Additional information about the object, such as numchild
and attributes
.
GET
Generate Breadcrumb
GET
Generate BreadcrumbThe path
field stores the complete breadcrumb path, where every 4 characters represent a distinct breadcrumb step. For example, if the path
is 0001000N0002
, then 0001
is the first step, 000N
is the second, and 0002
is the third. This way, the objects with the values 0001
and 0001000N
of the path
field become its ancestors.
Path: https://{commerce_url}/menus/generate_breadcrumb/
This method is used to fetch a menu with the given UUID and its ancestors.
Query Parameters
To generate a breadcrumb, the following query parameters must be provided:
Query String Params
Data Type
Description
item
string
Menu item UUID to generate the breadcrumb.
generator_name
string
Generator name, e.g., menu_item.
Example Response (200 OK)
Example Response (400 Bad Request)
If both item
and generator_name
are not sent as query parameters, the system will return a 400 bad request response, indicating the missing parameters like below:
Was this helpful?