Menus are inherently recursive. In order to generate ours, I need to generate a series of UL and LI tags with class="current" on the menu for the current page, and class="currentAncestor" for the ancestors of the current page.
Example: <UL> <LI class="currrentAncestor"> <a t:type="pagelink" page="Index">Top Level</A> <UL> <LI class="currrentAncestor"> <a t:type="pagelink" page="Second">Second Level</A> <UL> <LI class="currrent"> <a t:type="pagelink" page="Third">Current Level</A></LI> </UL> </LI> </UL> </LI> </UL> To avoid problems with Tapestry and recursion, I figured out I could setup things this way, if the currentMenu has a list of its ancestors: <t:loop source="currentMenu.ancestors" value="displayMenu"> <UL> <LI class="currentAncestor"> <a type="pagelink" page="displayMenu.page">${displayMenu.title}</A> </t:loop> <LI class="currrent"> <a t:type="pagelink" page="Third">Current Level</A></LI>UL> <LI class="current"> <a type- <t:loop source="currentMenu.ancestors" value="displayMenu"> </LI> </UL> </t:loop> Problem is that's illegal XML above because I'm looping over open tags, and then below I'm looping over close tags. Is there any clever way around this besides looping over everything and then using a delegate to insert the current menu at the bottom? Pierce --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org