I have searched the forum and Google for an answer for this, but no luck, so I'll try posting.
I have a list of values like this:
"Smá samfeløg" "stórbýir og globalisering" "Mentan, miðlar og samskifti"
And I can get the value like this f.x.: @samfelagsfroding.GetProperty("oki").Value
This gives me a comma seperated list like this: "Smá samfeløg,stórbýir og globalisering,Mentan, miðlar og samskifti" but the problem is that there are too many commas, as I have commas in the text. I would like to get the 3 selected values as a list - not as a comma seperated string. How can I do this?
I can get all the possible values by using umbraco.library.GetPreValues(1050), but now I need the selected values for a specific node.
I've found something about PrevaluesAsKeyValuePairList, which seems to be what I am looking for, but I can't find any documentation of how to use this exactly.
Get selected dropdown values as a list
I have searched the forum and Google for an answer for this, but no luck, so I'll try posting.
I have a list of values like this:
"Smá samfeløg"
"stórbýir og globalisering"
"Mentan, miðlar og samskifti"
And I can get the value like this f.x.: @samfelagsfroding.GetProperty("oki").Value
This gives me a comma seperated list like this: "Smá samfeløg,stórbýir og globalisering,Mentan, miðlar og samskifti" but the problem is that there are too many commas, as I have commas in the text. I would like to get the 3 selected values as a list - not as a comma seperated string. How can I do this?
I can get all the possible values by using umbraco.library.GetPreValues(1050), but now I need the selected values for a specific node.
I've found something about PrevaluesAsKeyValuePairList, which seems to be what I am looking for, but I can't find any documentation of how to use this exactly.
Hope someone can help :)
Thanks
Hi Limberg,
Yes the answer is to use "DropDown List Publishing Keys", the documentation and code samples for this editor are here
Jeavon
is working on a reply...