I’d like to have a brief text description underneath each submenu item in my navigation, but “Edit menu item” only has 2 fields: “Name” and “Link”. How can I add another field and attach it to an object that I can place in my code?
Here’s an example of what I’m hoping for:
{{ childlink.title }}
*{{ childlink.description }}*
Hi @hypobaker , welcome to Shopify Community.
At the moment it is not possible to extend the Shopify native Menu Items and add custom fields.
One possibility of course is to hardcode the additional description in your theme, but in this case every time you need to change the menu you’ll need to modify the code.
It is also true, that usually a store doesn’t change the menu every day.
An alternative is to build a parallel menu, with the same structure of the main menu and instead of adding the text of the link, you can add the description of the link.
I am not really sure what’s the character limit, but I used a similar solution in the past with short text description.
Then you just need to modify the menu navigation template and parse also the additional menu you have created and extract the link descriptions from there.
1 Like
Thanks @drakedev
I think I’ll just hard code the menu since I’m going to be maintaining the site myself anyway, I just wasn’t sure if Shopify would return errors and misbehave if I didn’t follow strict Liquid guidelines.