Dropdown Menu based on Metafield Data

ali303
Tourist
10 0 4

Hi, I'm trying to create a dropdown menu based on Metafield data and place it somewhere midway down our homepage, displayed horizontally. I would like it to function somewhat like the Shopify Filters on a collection page, albeit on our homepage and using dropdown menus.

 

For example, I'd like dropdown #1 to display data from our "custom.brands" metafield, so customers can select from a list of brands.

 

Dropdown #2 would display data "custom.product_type". However, like Shopify Filters, it would only show product types that are available for the Brand that has been chosen in Dropdown #1.

 

The reason we want to use this method is in the hope that each menu would automatically update each time we add a new piece of data to the Brand or Product Type metafield. Again, exactly how a new tick box would appear on a Collections page via Shopify Filters when you add a new piece of data.

 

I hope that makes sense and perhaps someone has tried to do something similar in the past! In an ideal world there would simply be a menu option whereby the contents of a dropdown are automatically populated by a metafield definition of your choosing.

Replies 2 (2)

SujalD
Visitor
1 0 0

Got any solution to this ?

ali303
Tourist
10 0 4

Unfortunately not. It's quite frustrating as I feel like it should be relatively straightforward to arrange the metafield data (that's already being used to generate filter lists on collection pages) in a dropdown format elsewhere in the theme, but unfortunately that's beyond my capabilities!