Best practice editable link/button?

Justin L asked on July 4, 2017 22:29

Hello Kentico guru's,

I am creating some pages with some editable texts (title, text etc.) and beneath these texts, a link (styled as a button) is shown. This link should be able to be generated/picked by the editor, if possible with a page selector so an existing page from within the website can be selected by the same person who edits the titles/texts. Is this possible with the standard 'Link/Button' webpart? If not, what would be the best/easiest route to make this work?

Best regards, Justin

Recent Answers


Mike Wills answered on July 5, 2017 00:07

Hi Justin,

I think Brenden Kehren's answer to a similar question, linked below, is a must-read for everyone. It recommends using fields of a custom page type instead of a web part.

https://devnet.kentico.com/questions/webparts-vs-widgets-vs-static-html

This technique even works if you need to allow authors to add 0 to many sections of content on a page. I elaborated on this technique in a recent user group. The slidedeck is here:

https://www.slideshare.net/mikewills/kentico-content-architecture-the-inaugural-seattle-kentico-users-group-may-2017

If you were using this technique, the editable web parts would be fields within your page type instead of web parts on a template. You could provide a field with a "URL Selector" control as well.

Mike

0 votesVote for this answer Mark as a Correct answer

Peter Mogilnitski answered on July 5, 2017 19:05 (last edited on July 5, 2017 19:12)

My approach is the inline widget. There is a link button web part as you said, but you can create a customize widget based on the link/button web part. No programming involved. For customization I want editors to select links from a specific subset and I want the to use predefined styles etc. I've changed the default control to drop down which I populated with a query: Image Text

If a form control for a field in your document is Rich Text Editor(CK Editor), i.e. you can edit text as HTML in the form tab and you have ability to insert inline widgets:

Image Text

I use this feature to let editors to insert buttons (Call to Action) they can pick and customize them based on predefined values, i.e. links, CSS etc.

1 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on July 5, 2017 19:17

If you want to style the link or button a specific way (say to match your website's theme), keep in mind the Transformable WebPart on the marketplace allows you to create structured webparts easily, which then you can turn into a Widget and do inline.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.