verbb / navigation

A Craft CMS plugin to create navigation menus for your site.
Other
90 stars 22 forks source link

Exclude entries without URI in the selection window #391

Open pascalminator opened 4 months ago

pascalminator commented 4 months ago

What are you trying to do?

When we click on "add entry" in a navigation, all entries are shown, rather they have URI or not.

What's your proposed solution?

I feel like this is pointless and misleading to give end-users the possibility to add these entries to the navigation. They should be automatically excluded, or at least we should have the option to exclude them in the settings.

Additional context

As we all know, Globals are going away in Craft 6, so things like "header" and "footer" are gonna be more and more frequent in entries.

engram-design commented 3 months ago

My only real issue with this is that I actually included this behaviour in the Hyper plugin, where you can't pick an entry or other element that doesn't have a URI. It makes sense to not have a link to something that doesn't have a link!

But a lot of people were starting to find that frustrating, where they wanted to pick an entry, regardless of whether it had a URL or not. I'm a little hesitant to do this, creating a slew of support requests for "Why aren't my entries in the list to pick?".

Users are another good example, where they don't have URI's, but you still might want to link to them, or manually set the URL to a route you've defined to sort out the resolution to a template.

It's something that I can maybe opt-in (or opt-out) as a setting.

pascalminator commented 3 months ago

Maybe the possibility to exclude per entry manually could be a good compromise then? For example, as an admin, I could decide to exclude my header and footer singles, preventing them from being selectable by the end users. If someone want everything to be added to the navigation, they just don't exclude anything in the settings.

engram-design commented 3 months ago

At the moment we have permissions for sections and entry types, if that helps in the short-term?

pascalminator commented 3 months ago

I saw that, but I can't exclude all "singles" entries because most of them should be displayed and available to add in a menu. Anyway, I realise this problem extend to anything that allows to select entries. I guess I'll just switch back to traditional globals for now.