Getting a list of services based on a checkbox list item being checked
Hey there...I have created a checkbox list datatype, which list all the rooms in a building.
I then have a serviceItem doc type which uses the above datatype. When the CMS user adds a new service item like "Flat screen TV" they can then check which room has this service.
So far so good i think!?
I now want to pull out using XSLT the list of services for each room, so my question is how do i check that a checkbox is checked?
Hey Rich thanks for the heads up on that worked a treat...I'm now thinking i want to extend this further... :-)
I've made my working XSLT a macro and allowed the user to insert via editor...can i use the datatype checkbox list that i created to enter the macro parameters?
I dont see the option in the parameter type dropdown...
So i've made this a macro so that the user can insert the code above into a text editor. However the above code use the hardcoded "The London Room" where as i would like to let the user select which room they want when inserting the macro.
It would seem the best way would be to re-use the datatype checkbox list of the rooms but can i do this for the parameters?
Getting a list of services based on a checkbox list item being checked
Hey there...I have created a checkbox list datatype, which list all the rooms in a building.
I then have a serviceItem doc type which uses the above datatype. When the CMS user adds a new service item like "Flat screen TV" they can then check which room has this service.
So far so good i think!?
I now want to pull out using XSLT the list of services for each room, so my question is how do i check that a checkbox is checked?
Cheers,
Stephen
Hi Stephen,
I would have a look at your App_Data/Umbraco.config file and see who the data is held, if I remember rightly it's CSV.
So you can use a 'contains' in XSLT, remember to add a preceeding and trailing comma, so you get an exact match.
Hope this helps
Rich
Hey Rich thanks for the heads up on that worked a treat...I'm now thinking i want to extend this further... :-)
I've made my working XSLT a macro and allowed the user to insert via editor...can i use the datatype checkbox list that i created to enter the macro parameters?
I dont see the option in the parameter type dropdown...
Stephen
Hey Stephen,
Glad you got that one bit worked out.
Not sure I understand your other question?
Rich
often the case!
Ok i have my XSLT that lists services by room like so...
So i've made this a macro so that the user can insert the code above into a text editor. However the above code use the hardcoded "The London Room" where as i would like to let the user select which room they want when inserting the macro.
It would seem the best way would be to re-use the datatype checkbox list of the rooms but can i do this for the parameters?
S
is working on a reply...