strapi-plugin-navigation
strapi-plugin-navigation copied to clipboard
Feature Request: provide an option to disable/hide the URL on internal links
In my strapi setup i have an entity type called "Page" which has an href as required argument. With this argument i will render all available pages.
In my frontend framework (Nuxt): If there is a request i will take the path and search for it in all pages. If no page was found i will trigger an 404.
In this setup i don't need the URL on the Navigation Element because i can get it from the refered entity. Do you plan to add an option to disable/hide the URL option on internal links?
Btw: Thank you so much for this Plugin. Was looking for sth like this a year or so.
A tricky question @luxterful ;) But it might be considered as an option. If I get you correctly, you would like to:
- entirely turn off url creation for your nav items
- return the url based on related entity or just keep it as part of related field?
@cyp3rius yes, both options would work :)
Hi, I really like this plugin. Any chance that you implement this feature? I really like the second idea. Same like title pulls from related entity.
@mariansimecek yep, we've got it in our backlog just after the i18n and custom metadata support :)
We would also really appreciate this feature! (We would you both options options on our projects, but mostly the second one). I'm really glad for this plugin, I found it just now, and immediately tried if this feature is available. I hope it will fit our needs, because we tried to create navigations just by Strapi content types and relations in at least three different ways on different projects, and it was painful (and it still is painful for content admins).
I see that i18n is available, I'm not sure about custom metadata and if you are still working on it, but do you have some estimated time of releasing this feature? Thanks for your work!
I'm working this week on testing and finalizing a big bundle of features that will come in version 2.2. I hope that it will be available as a release next week.
I also second that feature. In case of internal links, collection types usually contain slugs which will form the final url of the page. That's why having separate url entry field is redundant. In my project I have to either enter bogus data into url field when I have internal links or hack the package to ignore identical '/' urls.
@dmitrysmagin In the latest version of the plugin you should be able to configure field that will be automatically passed as internal path. This way you don't have to care about populating path field. Hope this will help your use case.
@ltsNotMike Thanks, you were right. Though, url and title fields are not filled instantly when you choose Content Type and Entity, but only after you press Save on the form. And more: once those fields are auto-filled, they are not re-filled when you change the Entity, you have to delete them first prior to saving. Dziękuję za pomoc.
Hello @ltsNotMike, and thanks for your plugin!
But same problem here, I configured the plugin to populate Title
as Name field, and Slug
as Path field, and it doesn't populate the fields when the entity is selected, and when I try to save, I can't because the URL field is required...
The excepted behaviour is if you choose to populate the Name and Path fields, when you create a new internal menu item, and select an entity, it should be populate the Title
in the Title field, and Slug
in the URL field.
And last little UX suggestion: maybe there is an inconsistency between the names of the input fields in General settings and the New navigation item? Maybe this would be more consistency: Title
→ Name
, and URL
→ Path
(or the opposite)
Thanks!
edit: I just discover that it doesn't work with pages created before the plugin configuration, but for pages created after, it's working! (excepted that i have the same comments as @dmitrysmagin in https://github.com/VirtusLab-Open-Source/strapi-plugin-navigation/issues/152#issuecomment-1207219938)
Hi @maximelebreton, Nice to hear that you enjoy the plugin. I will try to improve this feature when I'll find some time. Could you describe the steps to reproduce this behavior in other words? I'm not sure I understand the before and after configuration.
Hello, we really enjoy this plugin, but not being able to disable the url fields can be quite annoying. We are using url-alias
and it is not possible to use that as path default. The best solution for us would be if you could just disable the field.
Released as part of 2.4.0
.