I'm looking to create a DataType that should work as a key/value dropdownlist, but when I try to create one (using dropdown list as "Render control") I seem to only be allowed to edit the 'Text'. The 'Value' gets an integer automatically assigned.
I want to use the dropdown so that editors can choose a 'style' for a certain document type. I want the text in the ddl to be Green, Blue and Red, and I would like theit corresponing value to be something like myGreenCssClass, myBlueCssClass etc. This so I can use
Custom datatype - key/value dropdownlist
Hello,
I'm looking to create a DataType that should work as a key/value dropdownlist, but when I try to create one (using dropdown list as "Render control") I seem to only be allowed to edit the 'Text'. The 'Value' gets an integer automatically assigned.
I want to use the dropdown so that editors can choose a 'style' for a certain document type. I want the text in the ddl to be Green, Blue and Red, and I would like theit corresponing value to be something like myGreenCssClass, myBlueCssClass etc. This so I can use
in a xslt macro. Can I achieve this?
Think this is what you are looking for,,,
http://www.richardsoeteman.net/CommentView,guid,24E1D561-1F6C-4411-BD62-584023D31DF7.aspx#c97c0910-13e7-4d21-88a4-aaae18e44043
specifically look at the line
eg new ListItem(Text, Value)
I discovered it linked from http://our.umbraco.org/wiki/how-tos/how-to-create-a-custom-macro-parameter-type
is working on a reply...