I am trying to use a nested xslt sort by 2 parameters.
I am looking to sort by venueName and also I have 5 premium venues that need to be displayed at the top also by venueName
I have a property 'isPremiumVenue' and this is a true/false data type.
So, in summary: sort by venueName and then sort where isPremiumVenue = 1 (so they display at the top of the results, all other non-premium venues to show underneath in venueName order)
Use data-type="number" on the sort element
and convert the boolean to a number to catch the off chance elements that don't
have that property - so something like this:
Ah - but of course :) Silly me. The other way round would sort venues without the isPremiumVenue property (or
having it set to false) to the top first...
Help with nested xslt sort by
Hi all
I am trying to use a nested xslt sort by 2 parameters.
I am looking to sort by venueName and also I have 5 premium venues that need to be displayed at the top also by venueName
I have a property 'isPremiumVenue' and this is a true/false data type.
So, in summary: sort by venueName and then sort where isPremiumVenue = 1 (so they display at the top of the results, all other non-premium venues to show underneath in venueName order)
here is my code
Could you help please?
Thanks
Paul
Hi Paul,
Use data-type="number" on the sort element and convert the boolean to a number to catch the off chance elements that don't have that property - so something like this:
/Chriztian
Hello Chriztian,
Sorry for taking a while to respond, i have been away from the computer. However, Once again mate you code seemed to do the trick! :)
For some reason it wouldn't work this way
but this way works
Either way I'm happy!!
Thanks again
Paul
Ah - but of course :) Silly me. The other way round would sort venues without the
isPremiumVenue
property (or having it set to false) to the top first.../Chriztian
Chriztian,
Like always with your quick responses and great advice we managed to get there in the end, that is the main thing :).
This forum and the fellow members are always a great help when your having a dull moment(which is frequent with me) ha.
Paul
is working on a reply...