gpt4 book ai didi

css - TYPO3 - 配置 tx_news 以使用样式 og Bootstrap Package CSS

转载 作者:太空宇宙 更新时间:2023-11-04 12:02:56 24 4
gpt4 key购买 nike

如何让 tx_news 使用 Bootstrap 包中的分页样式?

最佳答案

在你的 TS 添加配置

plugin.tx_news {
widget.GeorgRinger\News\ViewHelpers\Widget\PaginateViewHelper.templateRootPath = EXT:YOURPATH/Resources/Private/Templates/Ext/tx_news/Templates/
}

并在那里添加

YOURPATH/Resources/Private/Templates/Ext/tx_news/Templates/ViewHelpers/Widget/Paginate/Index.html

然后是一些代码

{namespace n=GeorgRinger\News\ViewHelpers}


<f:renderChildren arguments="{contentArguments}" />


<div class="row">
<div class="col-md-12">
<div class="clearfix"></div>
<div class="hidden-xs hidden-sm">
<f:render section="paginator" arguments="{pagination: pagination, configuration:configuration, class:'pagination-lg'}" />
</div>
</div>
<div class="col-xs-12 visible-xs">
<f:render section="paginator" arguments="{pagination: pagination, configuration:configuration, class:'pagination-sm'}" />
</div>

<div class="col-md-12 visible-sm">
<f:render section="paginator" arguments="{pagination: pagination, configuration:configuration, class:'pagination-lg'}" />
</div>
</div>

<f:section name="paginator">
<f:if condition="{pagination.numberOfPages} > 1">
<f:if condition="{settings.list.paginate}">
<f:if condition="{pagination.current} > 1">
<n:headerData><link rel="prev" href="<f:widget.uri arguments="{currentPage: pagination.previousPage}" />" /></n:headerData>
</f:if>
<f:if condition="{pagination.nextPage}">
<n:headerData><link rel="next" href="<f:widget.uri arguments="{currentPage: pagination.nextPage}" />" /></n:headerData>
</f:if>
</f:if>

<ul class="pagination {class}">
<f:if condition="{pagination.previousPage}">
<f:then>
<li class="previous">
<f:if condition="{pagination.previousPage} > 1">
<f:then>
<f:widget.link arguments="{currentPage: pagination.previousPage}">&#8592;</f:widget.link>
</f:then>
<f:else>
<f:widget.link>&#8592;</f:widget.link>
</f:else>
</f:if>
</li>
</f:then>
<f:else>
<li class="disabled">
<a href="#">&#8592;</a>
</li>
</f:else>
</f:if>
<f:for each="{pagination.pages}" as="page">
<f:if condition="{page.isCurrent}">
<f:then>
<li class="active"><a href="#">{page.number}</a></li>
</f:then>
<f:else>
<li>
<f:if condition="{page.number} > 1">
<f:then>
<f:widget.link arguments="{currentPage: page.number}">{page.number}</f:widget.link>
</f:then>
<f:else>
<f:widget.link>{page.number}</f:widget.link>
</f:else>
</f:if>
</li>
</f:else>
</f:if>
</f:for>
<f:if condition="{pagination.nextPage}">
<li class="last next">
<f:widget.link arguments="{currentPage: pagination.nextPage}">&#8594;</f:widget.link>
</li>
</f:if>
</ul>
</f:if>
</f:section>

请不要忘记编辑文件夹路径

关于css - TYPO3 - 配置 tx_news 以使用样式 og Bootstrap Package CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29614113/

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