I have created one datatype for dropdown e.g Us-Dropdown with render control of Dropdown list, publish keys and added values us USA states in the same.
e.g
Text Value AZ 19 Delete
MA 20 Delete
NV 21 Delete
After that I used them as property in one document type and added them under generic property tab.
E.g. State (State), Type: US: StateDropDown.
Then I created one template for the same and I placed that state property following way.
After that from Content tab I create one entity for that template and render it.
When I render the page I can see the Number of the state that I selected while creating the same.
E.g 19. ](*,)
Please help me in getting the name rather than number.
Need help for Dropdown and Dropdown datatype
[size=6]Help regarding Dropdown.
Hi All,
I am new to Umbraco and I stuck up in a problem.
I have created one datatype for dropdown e.g Us-Dropdown with render control of Dropdown list, publish keys and added values us USA states in the same.
e.g
Text Value
AZ 19 Delete
MA 20 Delete
NV 21 Delete
After that I used them as property in one document type and added them under generic property tab.
E.g. State (State), Type: US: StateDropDown.
Then I created one template for the same and I placed that state property following way.
After that from Content tab I create one entity for that template and render it.
When I render the page I can see the Number of the state that I selected while creating the same.
E.g 19. ](*,)
Please help me in getting the name rather than number.
Hope you understood my problem.
[/size]
Hi,
If you need the value rather than the key, use umbraco.library.GetPrevalueAsString(id)
If you'd like to use this function inline, have a look at http://umbraco.org/documentation/books/inline-xslt
Hope this helps.
Regards,
/Dirk
is working on a reply...