gpt4 book ai didi

通过 Plone 中的页面模板进行分页

转载 作者:行者123 更新时间:2023-12-04 01:51:13 24 4
gpt4 key购买 nike

我正在寻找有关如何使用 Batch TAL 宏对文件夹内容进行分页的示例。据了解,没有找到任何解释该做什么的内容。有谁知道这样的例子?

提前致谢。

问候,
太阳神

最佳答案

类似的东西?

<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>

关于通过 Plone 中的页面模板进行分页,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8975535/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com