Hi, Ketan... I looked at your query-to-unordered-list project out of curiousity to see how your coded the solution.
I was wondering what role "depth" and "link" play in your table data? I understand what depth represents, but wouldn't depth be dynamically determined based on parentID, rather than having to be coded into the table data? Also, is "link" simply a URL link for the items in the list? Thanks for clarifying. This looks like a good solution for a many-to-many relationship display I was working on recently. Rick -----Original Message----- From: Ketan Jetty [mailto:kje...@yahoo.com] Sent: Sunday, September 12, 2010 11:50 AM To: cf-talk Subject: Re: Function to Output a query as an ol or ul Tom King, I have done a similar project recently and please find the a similar but much simpler logic to convert the query to unordered list at http://ketanjetty.com/coldfusion/useful-code/query-to-unordered-list/ I have used your query (modified it to have parentID) as the base query to "query to unordered list" converter logic. Hope this helps you. Thanks, Ketan Jetty http://KetanJetty.com >Hi all, >Having not found an existing function to do this (output a query object as a >nested ol or ul), I thought I'd try my own hand at it - I'm *so* close. Yet, >not quite there. > >Basically, my mind has given up trying to get the logic correct in when to >close </li> elements. It works most of the time, but if I say have a nested >list, it gets a bit confused and doesn't close the </li> - So XHTML throws a >wobbly. > >Can anyone see where I'm going wrong? (or better still, happen to have a >function which does something similar I might adapt?) > >Here's some dummy data and the function: >http://neokoenig.pastebin.com/k7EQ8B98 > >Thanks in advance for any insight... > >T ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336961 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm