Edit settings on Custom Property in Dynamic Content?

Vote:
 

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

#61756
Oct 01, 2012 13:59
Vote:
 

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.

#61937
Oct 08, 2012 10:31
Vote:
 

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)?

#61951
Oct 08, 2012 14:44
Vote:
 

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.

#61952
Oct 08, 2012 14:56
Vote:
 

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 ;-)

#61955
Oct 08, 2012 15:16
Vote:
 

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.

#61957
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.