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:}}
<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:}}
      <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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to