[Zope] Clueless About <dtml-in> and Sequencing.

Kevin Lewandowski kevin@zinkmedia.com
Tue, 11 Jun 2002 09:31:13 -0700


You can do this all in index_html.

try something like this:

<dtml-in listEntryID size=25 start=qs>

---display stuff here---

<dtml-if sequence-end>
 <dtml-if previous-sequence-start-number>
  <a href="<dtml-var URL><dtml-var sequence-query>qs=<dtml-var previous-sequence-start-number>">&lt;&lt; Previous</a>
 </dtml-if>
 <dtml-if next-sequence-start-number>
  <a href="<dtml-var URL><dtml-var sequence-query>qs=<dtml-var next-sequence-start-number>">Next &gt;&gt;</a>
 </dtml-if>
</dtml-if>

</dtml-in>



On Tue, Jun 11, 2002 at 12:25:46PM -0400, Douglas Perry wrote:
> I'm struggling with trying to display 25 records out of a MySQL table at a
> time. I know what <dtml-in> does but not how to control how many results per
> page I get and how to create links that navigate between batches.
> 
> How it works is that when the user arrives at the homepage, they see the
> first set of 25 records. By clicking on "Next", they get the next set of
> records. Can this be done with index_html or do I need a seperate page to
> display the next sets of batches and to navigate those sets of records?
> 
> This is the code I'm working on:
> 
> <dtml-in listEntryID>
>         <tr>
>           <td height="22" class="categories" width="80">
>             <font size="1" class="categories">
>             <dtml-var firstname missing="N/A">
>             </font> </td>
>           <td height="22" class="categories" width="148">
>             <dtml-var lastname missing="N/A">
>           </td>
>           <td width="51" height="22"><a href="editContact?entry_ID=<dtml-var
> entry_ID missing="">" target="_top"><img src="edit.png" width="50"
> height="20" border="0"></a></td>
>           <td width="92" height="22"><a href="del_form?entry_ID=<dtml-var
> entry_ID missing="">"><img src="delete.png" width="50" height="20"
> border="0"></a></td>
>         </tr>
> </dtml-in>
> 
> listEntryID is my Z SQL Method that pulls all records from a table, BTW.
> 
> 
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )