U4-3700 - Possibility to extend the model that's available in prop editors from server side

Created by Tim Geyssens 25 Nov 2013, 14:05:33 Updated by Shannon Deminick 26 Nov 2013, 07:40:57

Just been looking around and I've seen that you can override public override object ConvertDbToEditor but that just allows you to work with model.value what I would like is to ability to add stuff to the model like you have model.config but with custom stuff like model.myListOfItems since in some cases it makes sense that stuff is available on load and doesn't have to be fetch async by calling an api controller...


Shannon Deminick 26 Nov 2013, 01:37:47

You can add stuff to model.config by overriding your pre-value editor's ConvertDbToEditor

Shannon Deminick 26 Nov 2013, 07:40:57

I'm not 100% positive but doing what I've said may add arbitrary editable pre-values to your pre-value editor (you'll have to check :P) The other option is to override Umbraco.Core.PropertyEditors.PropertyValueEditor.ConfigureForDisplay - this method is used purely to either set properties on your PropertyValueEditor instance based on pre-values or modify/add prevalues (model.config) based on the configured pre-values for use only on the editor (non-editable)

Priority: Normal

Type: Feature (request)

State: Closed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version:


Story Points: