U4-3670 - Defining the view for a custom parameter editor is different from property editors

Created by Joachim Andersen 22 Nov 2013, 08:56:46 Updated by Shannon Deminick 25 Nov 2013, 02:56:20

The documentation (http://umbraco.github.io/Belle/#/tutorials/manifest) says that parametereditors should be specified in the same way as propertyeditors but if I specify the view inside an editor i.e.

editor: { view: '~/App_Plugins/path_to_view/view.html' }

it only works for property editors

If I define the view without wrapping it in the editor:

view: '~/App_Plugins/path_to_view/view.html'

it works.

Looking into the code reveals why it is like this, but I don't know if it is meant to work this way or if the documentation is wrong?

PropertyEditorConverter.cs: target.ManifestDefinedPropertyValueEditor = new PropertyValueEditor ;

ParameterEditorConverter.cs: target.ManifestDefinedParameterValueEditor = new ParameterValueEditor ;

Cheers Joachim


Shannon Deminick 25 Nov 2013, 02:56:12

The documentation is misleading unfortunately, we'll need to fix that up. (the tutorials will be migrated to Our.umbraco.org shortly too).

To define custom parameter editors that are not also property editors, the section looks like this:

parameterEditors :[
		alias: 'myParameter',
		name: 'My Parameter',        
		view: '~/App_Plugins/Test/backoffice/parameditors/test1.html'
		alias: 'myParameter2',
		name: 'My Parameter 2',        
		view: '~/App_Plugins/Test/backoffice/parameditors/test2.html'

Also note that you should be putting angular back office views inside the back office folder (again, we need to update the docs). It is not necessary but it is good practice because of the conventions listed here: http://umbraco.github.io/Belle/#/tutorials/Creating-Editors-Trees

Priority: Normal

Type: Bug

State: Closed

Assignee: Shannon Deminick

Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 7.0.0

Due in version:


Story Points: