Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bolt cms 我可以在contenttype配置中允许分页吗_Bolt Cms - Fatal编程技术网

Bolt cms 我可以在contenttype配置中允许分页吗

Bolt cms 我可以在contenttype配置中允许分页吗,bolt-cms,Bolt Cms,我一直在玩Bolt CMS中的分页功能,它很容易使用 现在我需要知道是否有办法在contenttype yaml中实现分页 我想,有可能是这样的吗 entries: name: Entries singular_name: Entry fields: ... taxonomy: [ categories ] allowpaging: true 我只发现,当您通过setcontent获取内容时,您需要明确地写入allowpaging标志: {% setcontent

我一直在玩Bolt CMS中的分页功能,它很容易使用

现在我需要知道是否有办法在contenttype yaml中实现分页

我想,有可能是这样的吗

entries:
  name: Entries
  singular_name: Entry
  fields:
    ...
  taxonomy: [ categories ]
  allowpaging: true
我只发现,当您通过setcontent获取内容时,您需要明确地写入allowpaging标志:

{% setcontent entries = "entries/latest/4" allowpaging %}
但是,如果您想使用相同的模板来显示相关的分类记录,该怎么办?问题是,不管分类法如何,您总是获取最后4个条目


如果没有办法做到这一点,有办法实现吗?

如果使用列表记录设置,也会自动设置分页

listing_records: 10
但您的模板仍然需要使用此设置的寻呼机-theme/base-2014中的列表模板将起作用,可以用作示例


文档在config.ymlset
listing\u records:xx
或要显示的记录数中有更多信息

然后在.twix模板
{%setcontent entries=“entries/latest/xx”allowpage%}
中设置相同的数字

并在.twix文件末尾添加此代码
{{pager('pages')}
以显示页面

您可以查看官方螺栓文档以了解更多信息