Displaying a dropdown list (data type) on a public page using XSLT?
Hi everyone!
I have created a data type in Umbraco that renders as a dropdown list in the Umbraco admin. Now I want to display this dropdown list on a public page using XSLT. I don't want to display the selected value - this I have working. What I want is a whole dropdown list, just like the one in the admin interface, but I want it on the public page.
The ugly solution would be to simply copy/paste the values, but if you changed the data type this would not be reflected on the public page.
The dropdown needs to be generated using XSLT - I'm not working with a user control in this case.
Is there a way to do this without dynamically rebuilding an HTML control with XSLT? Isn't there a way to directly reference the custom "data type" via .NET? The control is being generated in the back office - can't that same .NET control be invoked on a public page?
Displaying a dropdown list (data type) on a public page using XSLT?
Hi everyone!
I have created a data type in Umbraco that renders as a dropdown list in the Umbraco admin. Now I want to display this dropdown list on a public page using XSLT. I don't want to display the selected value - this I have working. What I want is a whole dropdown list, just like the one in the admin interface, but I want it on the public page.
The ugly solution would be to simply copy/paste the values, but if you changed the data type this would not be reflected on the public page.
The dropdown needs to be generated using XSLT - I'm not working with a user control in this case.
Thanks in advance!
/Thomas Kahn
With umbraco.library:GetPreValues(ID_OF_DATATYPE) you get an xml like this:
So you can do your own select drop down with this.
Thomas
here the complete code:
Thomas
Thanks Thomas!
Worked like a charm!
/Thomas Kahn
Is there a way to do this without dynamically rebuilding an HTML control with XSLT? Isn't there a way to directly reference the custom "data type" via .NET? The control is being generated in the back office - can't that same .NET control be invoked on a public page?
Thanks, DanO
is working on a reply...