Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > appending to a list of editable links View modes: 
User avatar
Member
Member
dcollins-marketwired - 2/14/2014 2:46:07 PM
   
appending to a list of editable links
Hopefully this has a quick answer.

I want to provide sort of 'Quick Links' boxes on various pages. Authors should be able to add links as they see fit (so I don't know how many there might be. Maybe on the homepage they want Sitemap, FAQ, and Company Directory, and then someone later on wants to add our Facebook account).

I don't want them to be entering HTML since they could easily break it. I hope to provide them two fields for a link: a name and a URL.

The only way I've found to control their input, while a the same time not controlling how many links they add is to make a new doctype (with only two fields) called QuickLink, and add an instance of that doctype to that page, and then point a repeater at that doctype (so that it just grabs as many as there are). An author will have to add a new doctype QuickLink to the page and fill it out, just as if it were a whole subpage.

This seems like overkill. Or maybe not. Is there a more expedient way of doing it? Or am I on the right track?

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 2/14/2014 3:05:09 PM
   
RE:appending to a list of editable links
What I've done the past is add a new field, IsQuickLink, to the doc type(s) you want them to be able to have in the list (in most cases, just cms.menuitem). Then add a repeater to your page and style it accordingly. In your transformation you'd create an <a > link.

Other option I've done as well is create a simple webpart with a dropdown list in it and load all the doc types using DocumentName as the text and the NodeAliasPath as the value and on selected index change, redirect to the selected URL.

No need to add a new doc type and make it confusing. And don't be afraid to add fields to the built-in doc types.