#foreach and page iterators

"Andrew Speakman" <[email protected]> Tue, 21 Jan 2003 17:11:40 -0000
Newsgroups gmane.comp.java.jpublish.devel
Message-ID <[email protected]>
JPublish looks like a great framework but I am struggling with one aspect.

I would like to iterate through a group of page definitions to extract a
list of titles and other properties. Something like this ...

#foreach ( $topic in $site.getPageManager().getPages("/topics") )
	<p>Topic title:
$site.getPageManager().getPage("$topic").getProperty("title")</p>
#end

This throws up a number of errors but I am wondering if it is possible for
the Velocity #foreach directive to do this, given that getPages() returns an
Iterator rather than a reference to a List.

Andrew Speakman



-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp