Letting the editor add a class to dynamic list items
Hello everyone,
I would like to make it possible for list items to display in different colors depending on the subject. The editer of the page should be able to choose out of radio buttons. I have classes and backgrounds set up in my CSS to give the items the styling. Now i want the editor to give a class to a new item.
I havo no experience with XSLT and this is my code whitch i just copied from someone else.
The code that you have postet is a mix of XSLT to new and old XML schema. The new XML schema was introduced in Umbraco 4.5 and heigher. There are some major difference between the old and new XML schema. You can read about the difference here:
But with this code, you user should be able to choose a color from a radio buttion list on every page, and then your li tag would get the class of that e.g red.
Letting the editor add a class to dynamic list items
Hello everyone,
I would like to make it possible for list items to display in different colors depending on the subject. The editer of the page should be able to choose out of radio buttons. I have classes and backgrounds set up in my CSS to give the items the styling. Now i want the editor to give a class to a new item.
I havo no experience with XSLT and this is my code whitch i just copied from someone else.
Thanks for the help!!
Hi Joost and welcome to our.
The code that you have postet is a mix of XSLT to new and old XML schema. The new XML schema was introduced in Umbraco 4.5 and heigher. There are some major difference between the old and new XML schema. You can read about the difference here:
http://our.umbraco.org/wiki/reference/xslt/45-xml-schema
http://our.umbraco.org/wiki/reference/xslt/45-xml-schema/xslt-examples-updated-to-new-schema
If you already were familar with the old XML schema you have the possiblity to switch to the old, a description on how this can be done is here: http://our.umbraco.org/wiki/reference/xslt/45-xml-schema/switching-between-old-and-new-schema
But with this code, you user should be able to choose a color from a radio buttion list on every page, and then your li tag would get the class of that e.g red.
Hope this helps,
/Dennis
is working on a reply...