Re: <al-for> help!
Frederick Polgardy <[email protected]> Thu, 27 Oct 2005 12:55:04 -0500
| Newsgroups | gmane.comp.web.albatross.general |
|---|---|
| Message-ID | <[email protected]> |
Do you modify locals.bookLinks or locals.foundBooks anywhere else in your code? It's really hard to tell what's going on from what we're seeing here. Can you post a small but complete demo that illustrates the problem? John Abel wrote: > Hi! > > I'm hoping someone can point me in the right direction. I have a > dictionary containing paths, and a description for each. I have > assigned each to locals like so: > > simpleCtx.locals.foundBooks = foundBooks > simpleCtx.locals.bookLinks = foundBooks.keys() > > I've then iterated on the list with this: > > <al-for iter="book" expr="bookLinks"> > <tr> > <td style="width: 15%;">Picture Will Go There</td> > <td><a href='<al-value expr="book.value()">'><al- > value expr="foundBooks[ book.value() ]"></a></td> > </tr> > </al-for> > > The odd thing, is the list loops twice, and then exits. If I run the > cgi from the command line, it processes the entire list, and displays > them all ( as per below ). > > I'm running on OSX 10.4.2, using Apple's Apache. I've tried > Python2.3 and Python2.4.2, with the same results. > > Any pointers would be much appreciated. > > Regards > > J > > Content-Type: text/html > > <html> > <head> > <title>Library - Main Page</title> > </head> > <body> > <h1>Main Page</h1> > <hr noshade> > <table style="text-align: left; width: 45%; " border="1" > cellpadding="0" cellspacing="0"> > <tbody> > <tr> > <td style="width: 15%;">Picture Will Go There</td> > <td><a href='BooksOnline/MySQL/index.html'> > MySQL 4.1 Reference Manual</a> > </td> > </tr> > <tr> > <td style="width: 15%;">Picture Will Go There</td> > <td><a href='BooksOnline/albatross/index.html'> > Albatross Manual</a> > </td> > </tr> > <tr> > <td style="width: 15%;">Picture Will Go There</td> > <td><a href='BooksOnline/networking/index.htm'> > The Networking CD Bookshelf</a> > </td> > </tr> > <tr> > <td style="width: 15%;">Picture Will Go There</td> > <td><a href='BooksOnline/networking/index.html'> > The Networking CD Bookshelf</a> > </td> > </tr> > <tr> > <td style="width: 15%;">Picture Will Go There</td> > <td><a href='BooksOnline/perl4/index.htm'> > The Perl CD Bookshelf, v4.0</a> > </td> > </tr> > <tr> > <td style="width: 15%;">Picture Will Go There</td> > <td><a href='BooksOnline/unix3/index.htm'> > The Unix CD Bookshelf, v3.0</a> > </td> > </tr> > <tr> > <td style="width: 15%;">Picture Will Go There</td> > <td><a href='BooksOnline/unix3/index.html'> > The Unix CD Bookshelf, v3.0</a> > </td> > </tr> > </tbody> > </table> > </body> > </html> > > _______________________________________________ > Albatross-users mailing list > [email protected] > https://www.object-craft.com.au/cgi-bin/mailman/listinfo/albatross-users >