Skip to content
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

Custom Fields for the Link fieldtype #16365

Open
Michael-Paragonn opened this issue Dec 30, 2024 · 0 comments
Open

Custom Fields for the Link fieldtype #16365

Michael-Paragonn opened this issue Dec 30, 2024 · 0 comments
Labels
content modeling 📓 features related to content modeling

Comments

@Michael-Paragonn
Copy link

With Craft as dependent as it is on custom fields, it seems a bit incongruous to have the advanced fields of the Link fieldtype be a limited assortment of "hard-coded" options. I mean, what you do have absolutely does make sense, it just begs the question of why there isn't a "custom field" type of option.

IRL use cases for custom fields on links:

  • Link style: Many times, a client will want to have the option to show a link in a button-style, rather than a "text link" style. It would simplify things if us developers could provide a dropdown field to select that on the link itself.
    image
  • Progressive enhancement: A link which goes to a "utility" page of some sort (login/register/search/subscribe/etc) by default, but if JS is enabled, the functionality of those pages gets loaded into a <dialog> instead.
  • Marketing: Typically it's more user-friendly to allow content authors to add marketing URL params in a visual manner instead of a technical one. Having them type out "?ref=campaign_name" in the URL suffix field is a technical approach; allowing them to select (via a Relationship field) the associated Campaign entry is a visual approach.

Taken to the "extreme", perhaps links could benefit from being Entry Types themselves?

Originally posted by @Michael-Paragonn in #16268 (comment)

@brandonkelly brandonkelly added the content modeling 📓 features related to content modeling label Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content modeling 📓 features related to content modeling
Projects
None yet
Development

No branches or pull requests

2 participants