[Zope] list zope catalog queries starting at item #3

Sean Kelley sean at horse101.com
Tue Jun 8 19:13:23 EDT 2004


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>



More information about the Zope mailing list