Silverstripe 博客项目和分页

Silverstripe blog items and pagination

我有一个 Silverstripe 3.1 站点设置并使用 silverstripe-blog 模块。我已经使用以下代码更改了我的 BlogHolder.ss 模板以显示 12 个博客项目而不是 10 个:

<% if $BlogEntries(12) %>
   <% loop $BlogEntries(12) %>
      <% include BlogSummary %>
   <% end_loop %>
<% else %>
   <h2><% _t('BlogHolder_ss.NOENTRIES', 'There are no blog entries') %></h2>
<% end_if %>

但是,分页仍然按 10 个项目分页。

我查看了模块,可以看到 BlogTree.php 设置了分页:

$list = new PaginatedList($entries, Controller::curr()->request);
$list->setPageLength($limit);
return $list;

如何在不更改模块代码的情况下更改此限制?

进入后台,点击 BlogHolder 页面。现在转到设置并更新 每页帖子数

的字段