Conditional Render Navigation

Hi ! I am struggling with conditional render navigation. I mean I need a subpage navigation with diffrent link. I’ve made in my admin panel two kind of navigation, but now I need render each one depend on route. In my Navigation component I use staticQuery hook, but I can not use any conditions. Does any one has Idea how can I cope with this ??

I want to avoid query for allNavigation and then filter in component the right resource. If it is possible.

@wfRud maybe for each Navigation component you can query a set of components based on the slug and filter them somehow?

Why are you concerned by getting all of the items? Do you have many of them? If you use our source plugin all the queries are going to be managed locally, you are not querying our APIs, so it’s not going to be too bad. If you are doing one query anyway getting more items is not going to change things much, I think.

Hi @mat_jack1 thanks for your answer. I did exactly how you said I’ve got all Navigation items and then filter locally right Navigation bar.