I have a lot of entries in the table that I want to display, and as i 
already have other things on the same page, i want to make this table show 
only 10-20 entries per page. How can I add that?

Here is the code I wrote in view:

    {{if prints:}}
    <h3>{{=T('Print history:')}}</h3>
    {{i=0}}
    <table>
        <thead>
                <th>#</th>
                <th>{{=T('Component name')}}</th>
                <th>{{=T('Component code')}}</th>
                <th>{{=T('Number of components')}}</th>
                <th>{{=T('Printing date')}}</th>
        </thead>
        <tbody>
            {{for design in prints:}}
                <tr><td>{{=i+1}}</td><td>         
{{=design.fk_printhistory_componentcatalog.component_name}}</td><td>{{=design.fk_printhistory_componentcatalog.component_code}}</td><td>{{=design.no_of_components}}</td><td>{{=design.time_stamp}}</td></tr>
            {{i=i+1}}
            {{pass}}
        </tbody>
    </table>
    {{pass}}

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to