VirtusLab-Open-Source / strapi-plugin-navigation

A plugin for Strapi Headless CMS that provides navigation / menu builder feature with their possibility to control the audience and different output structure renderers like (flat, tree and RFR - ready for handling by Redux First Router)
MIT License
318 stars 58 forks source link

Is there a way to add a relation to one of navigations created? #349

Closed c3s4 closed 10 months ago

c3s4 commented 1 year ago

Hi, I was trying to find a way to add a relation to navigation plugin. I mean: imagine you have a single type used as site global configuration where I set many things, the page that is the homepage (using a relation to the page content type), a relation to cookie page and so on. Using my custom menu content type I had a relation to a menu, so the user could create different menus and select the desired one using that relation.

So the question: is it possible to add a relation to navigations so the user can choose the one he wants?

tim-vyg commented 1 year ago

I'd +1 this, for example we'd quite to make our link component be able to refer to the NavigationItem collection so a user could select from a page route that exists

But I see you dismissed https://github.com/VirtusLab-Open-Source/strapi-plugin-navigation/issues/340

We're generating all our routes from the navigation plugin, is there a workaround to make a link component that reads from existing routes?

cyp3rius commented 1 year ago

To archive that you can try to extend the Content Types of our plugin using Strapi Extensions strategy and simply do the changes in this part:

  pluginOptions: {
    "content-manager": {
      visible: false
    },
    "content-type-builder": {
      visible: false
    },
    i18n: {
      localized: false
    }
  },

Hope it gives you some kind of direction :)

cyp3rius commented 10 months ago

Closing as no response.