Fluid Pagination Widget 的配置
configuration of Fluid Pagination Widget
我正在使用流畅的分页小部件。您可以在流体模板中配置它。
<f:widget.paginate objects="{files}" as="paginatedfiles" configuration="{itemsPerPage: 3, insertAbove: 1, insertBelow: 1, maximumNumberOfLinks: 10}">
有没有什么方法可以通过常量设置来配置小部件 ({settings.xxxxx})。这样我就不必为不同的配置使用不同的模板了吗?
尝试这个我得到了 - 不足为奇 - 错误:
The argument "configuration" was registered with type "array", but is of type "string" in view helper "TYPO3\CMS\Fluid\ViewHelpers\Widget\PaginateViewHelper"
我会在我的 TypoScript 设置 中这样做:
plugin.tx_myext {
settings
pagebrowser {
itemsPerPage = 3
insertAbove = 1
insertBelow = 1
maximumNumberOfLinks = 10
}
}
}
现在我可以将完整的配置放入 fluid viewhelper 中:
<f:widget.paginate objects="{files}" as="paginatedfiles" configuration="{settings.pagebrowser}">
您还可以将 TS Setup 与 Constants 结合使用,以使用常量编辑器,就像其他扩展一样。随便你。
我正在使用流畅的分页小部件。您可以在流体模板中配置它。
<f:widget.paginate objects="{files}" as="paginatedfiles" configuration="{itemsPerPage: 3, insertAbove: 1, insertBelow: 1, maximumNumberOfLinks: 10}">
有没有什么方法可以通过常量设置来配置小部件 ({settings.xxxxx})。这样我就不必为不同的配置使用不同的模板了吗?
尝试这个我得到了 - 不足为奇 - 错误:
The argument "configuration" was registered with type "array", but is of type "string" in view helper "TYPO3\CMS\Fluid\ViewHelpers\Widget\PaginateViewHelper"
我会在我的 TypoScript 设置 中这样做:
plugin.tx_myext {
settings
pagebrowser {
itemsPerPage = 3
insertAbove = 1
insertBelow = 1
maximumNumberOfLinks = 10
}
}
}
现在我可以将完整的配置放入 fluid viewhelper 中:
<f:widget.paginate objects="{files}" as="paginatedfiles" configuration="{settings.pagebrowser}">
您还可以将 TS Setup 与 Constants 结合使用,以使用常量编辑器,就像其他扩展一样。随便你。