Edit settings on Custom Property in Dynamic Content?


Is this even possible? Suggested workarounds would be much appreciated...

Oct 01, 2012 13:59

You can use a global settting and use naming to find it (http://krompaco.nu/2010/07/retrieving-an-episerver-6-global-setting-value/) in your Dynamic Content-control and then apply the settings "by hand" in your Dynamic Content code.

Oct 08, 2012 10:31

Good input, but I should perhaps elaborate by saying that I use the settings to provide some different renderings of the custom property in edit mode - afaik, there isn't any way for the custom property to know what type of dynamic content it is being rendered on (in edit mode, that is)?

Oct 08, 2012 14:44

What I meant by naming is that you could have the dynamic content type.ToString() or something else matched to a specific global setting name.

Oct 08, 2012 14:56

Yeah, I understood that, but the code where I need to access the settings is run in the CreateEditControls-method of the custom property, and not in the dynamic content code ;-)

Oct 08, 2012 15:16

I see. If you need to stick with it that way I'm not sure on the event order but it might work to add something smart to HttpContext.Current.Items[] as early as you can in the DC and hopefully find it in the CreateEditControls-method.

Oct 08, 2012 15:22
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.