Pagination using a page template in Plone

I am looking for an example of using the Batch TAL macro to break down the contents of a folder. I didn’t find out what explains what to do. Does anyone know of such an example?

Thanks in advance.

Regards, Helio

+4
source share
2 answers

Something like that?

<div tal:define="liste python:here.portal_catalog.searchResults({'portal_type' : 'News Item', 'review_state':'published'}); Batch python:modules['Products.CMFPlone'].Batch; b_size python:20; b_start python:0; b_start request/b_start | b_start; batch python:Batch(liste, b_size, int(b_start), orphan=1);" tal:condition="liste"> <ul> <tal:boucle tal:repeat="item batch"> <li tal:define="oddrow repeat/item/odd;" tal:attributes="class python:test(oddrow, 'even', 'odd')"> <!-- stuff --> </li> </tal:boucle> </ul> <div metal:use-macro="here/batch_macros/macros/navigation" /> </div> 
+6
source

Resources found:

http://raw.zniper.net/bits/batching-in-custom-template

he worked very well.

Regards, Helio

+2
source

Source: https://habr.com/ru/post/1392509/


All Articles