November Happy Hour will be moved to Thursday December 5th.

•Content Managed List of Options

Vote:
 

Hi,

I am new to the episerver, currently i am facing an issue for the dropdownlist.

I have to create a Content Managed List of Options.

So is there any way/property where editor can create selectitem object and these object will get added to the list of options?

I appreciate for your help.

#142910
Jan 05, 2016 13:13
Vote:
 

Brijesh,

You can use an ISelectionFactory implementation on your property to set where possible values are driven from.

There's an example in the documentation here:

http://world.episerver.com/documentation/Items/Developers-Guide/Episerver-CMS/8/Content/Properties/Property-types/Single-or-multiple-list-options/

This example has some hard coded key/value pairs - and you can extend it to meet your requirement by storing the dictionary somewhere within Episerver. I'd recommend placing a property on the Start Page or a Settings Page that allows administrators to control these values. This could be a Content Area that allows Blocks to be placed within it to set potential values.

Once you have that property, modify the ISelectionFactory implementation to read the dictionary from it.

Hope this helps,

/Matt 

#142971
Edited, Jan 07, 2016 18:25
* 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.