Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
You can try casting the model to a PropertyData object. This is an extract of how we set up the Tiny MCE editor:
public override void ModifyMetadata(EPiServer.Shell.ObjectEditing.ExtendedMetadata metadata, IEnumerable<Attribute> attributes)
{
base.ModifyMetadata(metadata, attributes);
//Grab property data
var propertyData = metadata.Model as PropertyData;
if(propertyData == null)
{return;}//Always check for null after "as" statement
//Load settings
TinyMCESettings propertySettings = (TinyMCESettings)propertyData.GetSetting(typeof(TinyMCESettings));
In EPiServer 7, you can configure custom editors for your properties, ref:
http://world.episerver.com/Blogs/Linus-Ekstrom/Dates/2012/9/EPiServer-7-Configuring-editors-for-your-properties/
But what if the drop down list items depends on property settings data?
I'm basically looking for a way to get the settings object (and still use the new ui), similar to this:
I assume this can be fetched from the EditorDescriptor class or the meta data object, but I haven't found a method to use.
Anyone?