What web-part or control to use when i want to allow users to set a hyperlink in a predefined area o

mun yung kan asked on February 2, 2015 08:15

i'm trying to build a web-part thats being used in a layout of a particular page type. any pages of this type will have this image text and hyperlink block displayed on it.

i've managed to get the image and text editable on the wysiwyg editor (CMSEditableRegion & CMSEditableImage).

is there a control or webpart that will allow me to provide a UI to the user to select a page in the site, and to also output a hyperlink when shown to the public?

Recent Answers

Mateusz Żebrowski answered on February 2, 2015 11:06

As I can understand, you want to have web part on document template in each new document (you creating new document go to design and configure web part witch is already there right?) So you have to approach:

1.Create new layout - it defines you web part zones. Then create new template which use this layout, and add there web parts. In general tab select clone template as ad-hoc. Go to your document type and set this template as a default template (general tab).

2.Add fields on document type and write a transformation. Create layout and template like above but don't add web parts. Add repeater and configure it to display your document according to your transformation. Set template as default in your document type.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on February 2, 2015 13:55

In your webpart define a public string property (using Kentico recommended way) called LinkUrl and write code around that to create a link as you needed.

Then when you define the webpart in Kentico's UI (Webparts app) add the LinkUrl as a property and set the control to a URL selector. This will allow you to define the URL in the page template the webpart is on.

0 votesVote for this answer Mark as a Correct answer

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