Is there a way to generate menu items?

triple
Excursionist
12 0 2

Looking for a way to generate menu items based on a tag, product type, etc. Looks like they only way to do this is manually. Is that right?

Replies 10 (10)
triple
Excursionist
12 0 2

Just to be clear, I'm looking for a way to do this other than manually entering the menu items in the Navigation page. 

Kyle_W
Shopify Expert
168 26 105

Hi @triple!

At the moment Shopify does not offer a Navigation API, and unfortunately there isn't a way to generate menu items automatically based on certain conditions. You will need to manually create menu items using the navigation settings in the Shopify admin (found under Online Store > Navigation).  

Hopefully this helps!

Kyle W | Helium
Helium builds apps that thousands of merchants depend on:
- Customer Fields ✪✪✪✪✪ (300+ reviews)
- Meteor Mega Menu ✪✪✪✪✪ (200+ reviews)
triple
Excursionist
12 0 2

Thank you for the reply. Is that absolutely the only way to create menu items? 

Is there anything in the API available for exporting an existing menu item and then importing it back to the store or another store?

Kyle_W
Shopify Expert
168 26 105

From my understanding the only way to create menu items is via the navigation settings in the Shopify admin. It looks like the GraphQL version of the Admin API includes a NavigationItem object, but I am not personally familiar with it: https://shopify.dev/docs/admin-api/graphql/reference/store-properties/navigationitem

Kyle W | Helium
Helium builds apps that thousands of merchants depend on:
- Customer Fields ✪✪✪✪✪ (300+ reviews)
- Meteor Mega Menu ✪✪✪✪✪ (200+ reviews)
oneluca
Tourist
9 1 5

Any updates on this? 

Danh11
Shopify Partner
62 2 20

Doubtful about an update but damn we need API access for this. Creating megamenu's just for some development data only to be blown away when the client takes over the store is such a waste of time.

RetroShirtsMan
Excursionist
20 1 8

Any updates on this? I have like 350 collections and I really don't see me adding them manually to a navigation... 

Kyle_W
Shopify Expert
168 26 105

Hey @RetroShirtsMan!

 

Sadly Shopify has yet to release an API that allows for navigation menus (or their menu items) to be created/edited. At the moment these actions must be done through the admin UI. Technically you can use the Storefront API to get existing menu items if you have the menu handle, but that doesn't really help the use cases described in this thread.

 

Just my two cents: 350 menu items is quite a bit of links! Not only would it be difficult for you to set up, but it could also be difficult for customers to use. General best practices suggest that a user should only have to decide between 3-5 options at one time. Perhaps it would be better to use some filters instead? The idea here would be to simplify your website navigation and link hierarchy while using filters so customers can narrow down their results to find what they are looking for with minimal effort. A popular solution for this is using Shopify's Search & Discovery app: https://apps.shopify.com/search-and-discovery

 

That being said, we here at Helium are considering a new feature for our Meteor Mega Menus app that would automatically populate mega menus with products from specific collections. If you (or anyone else reading this thread) are interested in this type of feature please let me know!

Kyle W | Helium
Helium builds apps that thousands of merchants depend on:
- Customer Fields ✪✪✪✪✪ (300+ reviews)
- Meteor Mega Menu ✪✪✪✪✪ (200+ reviews)
Sermgodts
Visitor
2 0 1

I would be interested in automatically populating mega menus with products from specific Collections.

Kyle_W
Shopify Expert
168 26 105

@Sermgodts Awesome! Our team is actively working on the development of this feature. No formal ETA at this point, but as soon as it's available I'll let you know 👍

Kyle W | Helium
Helium builds apps that thousands of merchants depend on:
- Customer Fields ✪✪✪✪✪ (300+ reviews)
- Meteor Mega Menu ✪✪✪✪✪ (200+ reviews)