[ZDP] BackTalk to Document The Zope Book (2.5 Edition)/Variables and Advanced DTML
webmaster@zope.org
webmaster@zope.org
Sun, 17 Nov 2002 08:16:58 -0500
A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZopeBook/current/AdvDTML.stx#2-103
---------------
The *in* tag provides several variables to facilitate batch
processing. Let's look at a complete example that shows how to
display 100 items in batches of 10 at a time::
<dtml-var standard_html_header>
<dtml-in expr="_.range(100)" size=10 start=query_start>
<dtml-if sequence-start>
<dtml-if previous-sequence>
<a href="<dtml-var URL><dtml-var sequence-query
>query_start=<dtml-var previous-sequence-start-number>">
(Previous <dtml-var previous-sequence-size> results)
</a>
</dtml-if>
<h1>These words are displayed at the top of a batch:</h1>
<ul>
</dtml-if>
<li>Iteration number: <dtml-var sequence-item></li>
<dtml-if sequence-end>
</ul>
<h4>These words are displayed at the bottom of a batch.</h4>
<dtml-if next-sequence>
<a href="<dtml-var URL><dtml-var sequence-query
>query_start=<dtml-var
next-sequence-start-number>">
(Next <dtml-var next-sequence-size> results)
</a>
</dtml-if>
</dtml-if>
</dtml-in>
<dtml-var standard_html_footer>
% Saman - Nov. 17, 2002 8:17 am:
this must be a DTNL document in order to function,If you shoose to implemented as Method it will not
function?
Why is That????