I have created a custom data type (of a checkbox) with about 20 options.
My question is, is there a way in XSLT to read what all of these options are, and then count which ones (and how many of each) have been chosen in when the pages are created.
I may be able to the second part, but do not know a way of 'reading' the data type list.
First question is why did you implement a custom data type? You can use the build in CheckBoxList for that. Or do I misunderstand you? If you have used the checkboxlist for a new datatype with the prevalueeditor then you get the prevalues by umbraco.library:GetPreValues(DATATYPE_ID) as a XPathNodeIterator you can use in xslt. Just use xsl:copy-of to output the complete xml which you can see then in the html source.
Custom Data Type 'reading'
I have created a custom data type (of a checkbox) with about 20 options.
My question is, is there a way in XSLT to read what all of these options are, and then count which ones (and how many of each) have been chosen in when the pages are created.
I may be able to the second part, but do not know a way of 'reading' the data type list.
First question is why did you implement a custom data type? You can use the build in CheckBoxList for that. Or do I misunderstand you? If you have used the checkboxlist for a new datatype with the prevalueeditor then you get the prevalues by umbraco.library:GetPreValues(DATATYPE_ID) as a XPathNodeIterator you can use in xslt. Just use xsl:copy-of to output the complete xml which you can see then in the html source.
hth, Thomas
is working on a reply...