[albatross-users] <al-for> help!

John Abel admin at ccj-online.co.uk
Fri Oct 28 00:07:11 EST 2005


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>




More information about the Albatross-users mailing list