1) get-cats-belongs-related-menu-items which displays menu items based on the relationship, correct ? But what is this actually doing:
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-item index=other]
[wpv-post-taxonomy type="nomad-menu-category" format="id"],
[wpv-item index=last]
[wpv-post-taxonomy type="nomad-menu-category" format="id"]
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]
====>
Actually - "get-cats-belongs-related-menu-items" view is used to get the "nomad-menu-category" IDs attached to the Menu Items as you can see above we are retuning the category IDs using shortcode:
[wpv-post-taxonomy type="nomad-menu-category" format="id"]
2) menu-categories-list which displays Taxonomy -> Menu Categories with taxonomy fillter: Terms with ID set by the shortcode attribute:"terms" ....why is that ? what it does?
====>
That is your actual problem you created this ticket for.
As you know on your page it was displaying all categories and you want that you only want to display category where Menu Item is attached.
That is why we created the view "get-cats-belongs-related-menu-items" that will only return the category ids (term ids) as I explain above.
Now, we will use this view that will only return the term IDs where post is attached and pass this view as shortcode attribute "terms":
[wpv-view name="menu-categories-list" cached="off" terms='[wpv-view name="get-cats-belongs-related-menu-items" cached="off"]']
So, "terms" is view's shortcode argument and that will hold that ids of terms where menu item post is assigned and we filter the view "menu-categories-list" with taxonomy filter:
Taxonomy term filter
Taxonomy term ID is set by the shortcode attribute "terms"
So, view "menu-categories-list" will only display the terms where posts is assigned which we pass through the "terms" shortcode attribute.
3) menu-items-list which again retrieves menu-itme cpt relationship and is nested inside menu-categories-list
===>
That you have already - I did not make any change.
4) And then the content template ct-view-shortcode-container which it has the shortcode [wpv-view name="menu-categories-list" cached="off" terms='[wpv-view name="get-cats-belongs-related-menu-items" cached="off"]'] what does this exaclty and wehy is it working as we want ?
===>
As its a nested shortcode:
[wpv-view name="menu-categories-list" cached="off" terms='[wpv-view name="get-cats-belongs-related-menu-items" cached="off"]']
That is why I've created content template and added above shortcode withiin the content template and display the content template with your Oxygen builder. If you try to add the above nested shortcode directly to your oxygen builder it will not work as it will not get parsed/rendered correctly.