Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Customization of settings for LinkItemCollection



Is there a way to customize how the dialog for adding a new link is presented to the editor in properties of type LinkItemCollection? (Episerver 8)

Say if the client does not want the "Link name/text" to be mandatory, is there a way to customize or override this?

Thanks in advance!


Mar 15, 2016 18:12
Edited, Mar 15, 2016 18:35

Thanks Daniel. I'm familiar with EditorDescriptors, we don't want to build though a Dojo property for this. But there might actually not be a way to customize the dialog for adding links to the LinkItemCollection.. at least I've search and still haven't found any.

Mar 15, 2016 20:37

My best guess is to use dotPeek and modify Episervers own implementation and smack a UIhint on the property. Might be a better way but not that I know of...

Mar 15, 2016 21:37

Hi, Kenia,

I'd suggest you to take a slightly different approach, it will be way less time and cleaner as well. I don't think you'll be able to fully customize built-in properties, especially those that are somewhat legacy from older versions, like LinkItemCollection.

Create a block called Link and give it the properties you need, ex. Url, Target and Name/Title. Then create a simple rendering of <a> tag and add content area to the page instead of LinkItemCollection. You can then decorate Name/Title with [Required].

If you'd like to still want to have all of the exactly the same features as LinkItemCollection or you already have some field filled in, I am afraid you'll need to go with something similar to this:

If you are lucky, something like this:


with [Required] on the property you want required might do the trick (but I would expect the dojo part will also not contain clientside logic that won't work the way you expect it, so you'd need to inherit/override the widget, but that might go down the path of endless rewriting).

The third option is adding custom validation server side that would be triggered only after the page is saved, but would allow you to prevent the editor from publishing a page that has empty titles, if that's good enough.



Mar 16, 2016 13:48

Hi Marija!

That was a bunch of good suggestions! Thank you!

I think the idea of just replacing the LinkItemCollection with a ContentArea and creating a block type with similiar properties as LinkItem is the simplest and most flexible solution. Trying to extend the property and the Dojo-widget sounds like lots of work that can be achieved in easier ways.

Unfortunately the client set low priority on this se we dropped it.



Apr 11, 2016 9:29

Glad I could help :)

Apr 11, 2016 13:15

Is there a simple way to customize the LinkItemCollection to only accept page references?

Nov 01, 2016 10:08

Check out the ContentReferenceList property type instead. You can restrict that one to only accept certain content as well...

Nov 01, 2016 10:26

Excellent! Thank you, @Daniel.

Nov 01, 2016 10:59
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.