counting pages
We have a student employmnet site to list jobs by
department.
Each job listing is a page withing a dept. directory.
I index all the directories and grab the title and path to their
index pages to output a list of links.
I've been asked if it's possible to include in that list the number of open jobs in each dept. directory (there is a node for "open" with a value of "Yes" if it is).
Instead of just a list of links:
Admissions
Alumni
Annual-fund
They want:
Admissions (2)
Alumni (1)
etc.
Any suggestions as to how to go about this?
The current script and block xml are attached.
- curr-scrpt.txt 1.2 KB
- block.xml 142.7 KB
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Charlie Holder on 09 May, 2012 02:16 PM
This should be close to what you're looking for:
Support Staff 3 Posted by Charlie Holder on 09 May, 2012 02:27 PM
Update: added comments to the above code so it's more clear what's going on.
4 Posted by steelej on 09 May, 2012 03:05 PM
Charlie,
This is great. I added in the "open" switch so it only counts open positions. Thanks too for the comments.
We're up and running.
Jim
steelej closed this discussion on 09 May, 2012 03:06 PM.