-
Notifications
You must be signed in to change notification settings - Fork 64
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link field allows entries without urls #153
Comments
Hi @dgsiegel, you can control which sections the user can pick linked elements from within the field settings. You can disable those sections that do not expose an url there. Check the settings page of the individual link field you've created, you've probably selected the option to allow all sections. As users might do all kind of stuff with the information about the linked element, I don't think we should restrict the sections to only those exposing urls. |
I know that I could choose the sections individually, but that is not feasible in this case as we use a high number of link fields. But that would be something for #47. The actual issue is the link being empty, something a user would probably not expect. After all, what's the reason for an empty link? What kind of use cases are you thinking about? |
@dgsiegel I actually have a use-case for that - i have a section of entries that are reusable content for "modal dialogs". They aren't displayed on their own, hence they have no URLs. I am using the LinkField to be able to select those "modal" entries and assign them to a button (instead of a href) to open a modal with that entry content. I do get your point around the pain of having to modify multiple field instances to exclude them - I ended up configuring my desired settings on one field, and then doing some copy/paste work directly in the project config yaml files of the other field instances, and then doing |
I do use a similar setup, but the correct field for that would be an entry field, not a Link field? |
True - but the Link field gives me the flexibility for my button/action to link to either an entry with a url (eg a page), one with out a url (like a modal), or just a custom url.. |
Okay, I think we definitely should not disable this but I can understand that it might be handy to have this as an option. |
I also set up modals as entries and link to them using the link field, just like michaelroper described, so I'd also hate to see this functionality disappear! :-) |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
I do have a few sections which do not have a URL (empty site settings in the section configuration). With Link field you can still choose these sections if you enabled the selection of entries in a link. The result looks like the following:
Ideally, a user should not be able to choose entries without a URL.
The text was updated successfully, but these errors were encountered: