Cms: Create a "Link/Button" field

Created on 31 Jan 2017  路  6Comments  路  Source: craftcms/cms

Created by: Ryan ([email protected]) on 2015/06/27 22:53:39 +0000
Votes at time of UserVoice import: 3


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.

content modeling enhancement

Most helpful comment

@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.

All 6 comments

> Posted by Judd Lyon ([email protected]) on 2016/01/28 20:46:03 +0000

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.

> Posted by Kaspar ([email protected]) on 2015/03/11 14:14:49 +0000

The LinkeIt plugin is your friend: https://github.com/fruitstudios/LinkIt

I could see us adding a generic Link field once #1662 is implemented.

Is this still something you're considering?

@jsunsawyer it鈥檚 a possibility down the road, but definitely not a priority for us right now.

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rynpsc picture rynpsc  路  3Comments

angrybrad picture angrybrad  路  3Comments

angrybrad picture angrybrad  路  3Comments

mattstein picture mattstein  路  3Comments

brandonkelly picture brandonkelly  路  3Comments