SortTool
I'm having some difficulty with the sortTool and can't figure out why. I'm indexing pages that contain student employment job listings. I'm pulling out the path to the page, the job title and the wage. The wage is entered in this format: 00.00, so for example it would be 13.00 or 8.50. I'm trying to sort by the wage so that it lists the jobs from the highest to the lowest wage on the page. Secondarily, I want to list the jobs with the same wage, alphabetically (for instance, all the jobs that pay 8.00 would be listed together in alphabetical order by job title.
Hasn't worked for me yet.
- block.xnl.xml 361 KB
- script.txt 1.23 KB
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac
1 Posted by Ryan Griffith on 04 Mar, 2015 02:46 PM
Hi Jim,
I believe you are going to run into an issue by using two sort criterion. Specifically, it's going to sort the same list twice, so you won't get that grouping by wage you are looking for. XSLT might be a better choice there using
<xsl:key>.That being said, you could sort by job title and then loop over the jobs and generate an array of Map objects. You can then use the Sort Tool to sort by a wage property. You would then loop over the resulting list. When you have a moment, give the following a try for starters and let me know how it works out:
Please let me know if you have any questions.
Thanks!
2 Posted by steelej on 04 Mar, 2015 03:09 PM
It appears to work very well. That's admittedly not one I would have figured out by myself. Thanks
steelej closed this discussion on 04 Mar, 2015 03:09 PM.