Hello, I'm new to this group and to web2py and even to web development but not completely to Python and thus this suggestion (that could be completely wrong):
(and BTW, I would like to use this first post to thank a lot Massimo Di Pierro for his fantastic work !!! ) On 19 sep, 09:27, annet <annet.verm...@gmail.com> wrote: > I have a table which contains news items. In the view I would like to > display the first 6 items in full and limit the display of the next 18 > items to their title. So something like: > > {{for item in news:}} {{for item in news[:6]:}} > <div class="newsitem"> > <h5>{{=db.nieuws.publicatie_datum.formatter(item.publicatie_datum)}} > </h5> > <h2>{{=item.titel}}</h2> > {{if item.ondertitel:}}<h3>{{=item.ondertitel}}</h3>{{pass}} > {{=XML(item.korte_inhoud)}} <br /> > <h4>{{=A('Lees meer',_onmouseover="this.style.cursor='pointer;",\ > _onclick="javascript:newsdetails('%s')"%URL > (r=request,f='newsdetails',args=[item.id]))}}</h4> > </div> <!-- newsitem --> > {{pass}} > > <table> > <tbody> > {{for item in news:}} {{for item in news[6:24]:}} > <tr> > <td> > {{=item.titel}} > </td> > </tr> > {{pass}} > </tbody> > </table> > > I hope one of you could provide me with the correct for loop to make > this work. > > Kind regards, > > Annet. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---