Create dynamic secondary menu based on categories?

Hello. I am building a video/photo portfolio for my friend using Gatsby. The idea is to have 2 pages, for video and for photography as a collection/list of single items(like listing of a blog posts). Then on each page would have to be a secondary menu with categories (portfolio, food, drinks, jewellery etc.) which onclick will filter the items.

I can't figure out if there is any viable way to dynamiclly create this menu?

At the moment in the gallery custom type I have repeatable group of images with boolean (include in portfolio) and a select for categories + I would just .map() || .filter() ||.reduce to create a secondary menu.

However, what if the end user would like to add a category in the select field withouth the need to edit a custom type? Like getting the select values dynamiclly from another custom type? Is something like this possible at all? :sweat_smile:

Many thanks!

Hi Robert,

Welcome to the Prismic community,

If I understood correctly, what you are trying to do is pretty similar to blog posts; in fact, you can have a repeatable type such as Video for example, and then you can use the Tags to have different categories.

Please let me know If case of any doughts.

Hey Robert,

What Fares is describing are Custom Tags, would this work for you?

Thanks.