Replies: 10 comments 53 replies
-
This is a requirement on virtually every CMS-powered site. Linkit is great but not yet 2.5 compatible. It would be ideal not to rely on a third party add-on and have this be native functionality. |
Beta Was this translation helpful? Give feedback.
-
The LinkeIt plugin is your friend: https://github.com/fruitstudios/LinkIt |
Beta Was this translation helpful? Give feedback.
-
I could see us adding a generic Link field once #1662 is implemented. |
Beta Was this translation helpful? Give feedback.
-
Is this still something you're considering? |
Beta Was this translation helpful? Give feedback.
-
@jsunsawyer it’s a possibility down the road, but definitely not a priority for us right now. |
Beta Was this translation helpful? Give feedback.
-
@brandonkelly we've used LinkIt heavily in our projects; with recent conversation in Discord about LinkIt ceasing to be under active development, is there opportunity to revisit this as a built-in fieldtype in Craft? I'm not sure if this pain point is exclusive to us, but we've both relied heavily on LinkIt and have been burned by it during Craft upgrades. A first party link fieldtype would be a very welcome addition. Thank you for considering. |
Beta Was this translation helpful? Give feedback.
-
I wanted to poke this discussion since we're coming up on the Craft 4 release and there's no longer a stable release available for a "Link" field. This is definitely the biggest roadblock that will be holding us back from upgrading to Craft 4 (and was also the biggest roadblock holding us back from upgrading to Craft 3). My opinion is that a native link field should be a high priority given the crucial role it plays in every website and the lack of a well-maintained third-party alternative. |
Beta Was this translation helpful? Give feedback.
-
I was about to make a new issue, but found this one. So I'll paste my details here instead. A large portion of the community was relying on https://plugins.craftcms.com/typedlinkfield which is no longer being maintained. The remaining plugins available are 3rd party and cost money, but customers expect a link field that can handle entry/url/email/tel as a native CMS field. Other CMS platforms that compete with Craft CMS offer it, and its a standard in familiar UIs across apps, platforms etc. Minimum Viable Solution: Best Solution: "Extra": |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Been exploring Craft 5 and options for this today and come up with a solution that for my needs at least works really well, just as good as the Link Field plugin and fully native. Many thanks to @thupsi and @stephanedemotte above who guided me in this direction! Gotta say I am loving how flexible the data structure is in Craft 5, its so much neater and lets you work more in a modular fashion within Craft itself similar to how we want to build out front end structures...Thanks so much for the update! 1: Create the entry typeI made an entry type of "Button" with the required fields:
![]() 2: Create the fieldI then created a matrix field "buttons" with a max of 2 so that we can output the "button" entry type wherever we want with a maximum of two buttons, generally a primary and secondary (I left this selectable with a dropdown but you could specify this in the code) We now have a super flexible "link" entry type that can be used either directly in entries or as a field inside other entry types or another matrix field. Here are a couple of code examples for outputting (i've removed lots of other include settings for clarity) Built these quickly today so could probably be tidied up a fair bit: default.twig main page entry:
cp.hero.twig include:
cp.cta.twig our call to action or button include:
Having gone through this process I can see why P&T don't have a super high priority for this as its definitely possible to build something way more flexible. Downsides obviously this is no use for old sites that already use the link field plugin! Currently we aren't able to update most of our old sites as nearly all link data is stored in the typed link field and this would require us going through and re-doing all the link content which is not viable. But for new sites this seems a good option moving forward and has enabled me to ditch a bunch of plugins - no need for supertable or neo etc anymore... Hope this helps someone out and open to any suggestions as to how to improve! |
Beta Was this translation helpful? Give feedback.
-
Sometimes on a page it's necessary to give the client the option to add a button and/or customize button text, url, if the url should pull from an existing entry, if url should open in new tab, add a button class via a dropdown, etc.
Right now, you can easily do this with a Matrix block and restrict it to a max 1 block, but then the user has to "add the block" and it seems like an unnecessary step. Also, if you're needing to add a customizable link/button inside a matrix field, you can't add ANOTHER matrix field, so you'd have to create all those fields individually. It would be cool to see some way of grouping all of these things together into one field and just choose all the details you want associated with the link/button.
Beta Was this translation helpful? Give feedback.
All reactions