This project is read-only.

Add alias to enumeration field items

Topics: Writing modules
Jan 20, 2013 at 6:02 PM
Edited Jan 20, 2013 at 6:05 PM

Can i add short alias or id to enumeration field items? (I will use these values as query string param)

I wanted to create custom table for this (id, fieldId, value, ...). But i cant get filed id or content part definition name from PartFieldEditor function in my custom EditorEvent class.


    public class EnumerationFieldSearchListModeEvents : ContentDefinitionEditorEventsBase {

        public override IEnumerable PartFieldEditor(ContentPartFieldDefinition definition) {
            if (definition.FieldDefinition.Name == "EnumerationField") {
                var model = definition.Settings.GetModel<EnumerationFieldSearchSettings>();
                //need get the field identity and add it to model
                yield return DefinitionTemplate(model);
Jan 20, 2013 at 9:45 PM

You should create your own field.

Jan 20, 2013 at 11:51 PM

How i can get field id or part name (that identify the field) from my custom field setting event (like above)

Jan 21, 2013 at 3:26 AM

What do you mean? What doesn't work when you do it like above?

Jan 21, 2013 at 9:49 AM
Edited Jan 21, 2013 at 9:55 AM

To uniquely identify field i need to get id from Settings_ContentPartFieldDefinitionRecord table. (or something else)

I can not get uniquely identify field from code above.


Feb 10, 2013 at 11:00 PM
What exactly are you trying to do?