list zope catalog queries starting at item #3
How does one display a catalog query starting at item 3 instead of item 0 (or 1) ? Can you set a variable for the starting point? <!-- example cmf query --> <div metal:define-macro="newsSlot" tal:define="results python:request.get('news', here.portal_catalog.searchResults( meta_type='News Item' , Subject='Scoop General Updates' , sort_on='Date' , sort_order='reverse' , review_state='published'));" tal:condition="python:test(template.getId()!='news' and results, 1, 0)"> <div class="box"> <h5 i18n:translate="box_news">All General Updates</h5> <div class="body"> <tal:block tal:repeat="obj results"> <div tal:define="oddrow repeat/obj/odd" tal:attributes="class python:test(oddrow, 'content even', 'content odd')"> <a href="" tal:attributes="href obj/getURL"> <img tal:replace="structure here/newsitem_icon.gif" /> <span tal:replace="python:test(obj.Title, obj.Title, obj.id)"> Extended Calendar Product </span> </a> <div tal:replace="python:here.toPortalTime(obj.modified)">July 7, 08:11</div> <br> <font size="-1"> <i tal:content="structure python:test(obj.Description, obj.Description, '(No Description)')"> Description </i></font> </div> </tal:block> </div> </div> </div>
Sean Kelley wrote at 2004-6-8 16:13 -0700:
How does one display a catalog query starting at item 3 instead of item 0 (or 1) ? Can you set a variable for the starting point?
Look at the batching support provided by "ZTUtils". I expect that you can find a description in the Zope Book (2.6 edition, online). -- Dieter
participants (2)
-
Dieter Maurer -
Sean Kelley