Bug #72070
closedViewHelper f:widget.paginate - insertBelow /insertAbove doesn't work
Added by Johannes C. Laxander almost 9 years ago. Updated about 8 years ago.
0%
Description
<f:widget.paginate objects="{objects}" as="paginatedObjects"
configuration="{itemsPerPage: 5, insertAbove: 0, insertBelow: 1}">
...records output...
</f:widget.paginate>
The code above dosn't work. Page browser will only place on the top, also if I set both (above and below) to '0'.
Updated by Georg Ringer almost 9 years ago
- Status changed from New to Needs Feedback
sorry I can not reproduce that. can you retest on a clean installation and are you sure no extension or css is hiding the view above?
Updated by Claus Due almost 9 years ago
Confirming Georg's report, cannot reproduce this. In addition to Georg's suggestions, look for 1) improperly overridden widget template files - your change may be made in a template that is overridden or the override is not working, 2) watch out that you don't use both parameters, or set the one you don't want, to FALSE.
Updated by Johannes C. Laxander almost 9 years ago
If I set both, 'insertAbove:1' and 'insertBelow:1' (this is what I will get) then both pagninator are placed on the top like this:
Seite 1 Seite 2 Seite 3 nächste » Seite 1 Seite 2 Seite 3 nächste »
The path to template index.html is set in my setup for my Extension as follow:
plugin.tx_myext.view.widget.TYPO3\CMS\Fluid\ViewHelpers\Widget\PaginateViewHelper.templateRootPath = EXT:myext/Resources/Private/Templates/
This template is using, because I have change "Page" to "Seite".
This ist the pagniation code in template index.html :
<f:if condition="{configuration.insertAbove}">
<f:render section="paginator" arguments="{pagination: pagination, configuration: configuration}" />
</f:if>
<f:renderChildren arguments="{contentArguments}" />
<f:if condition="{configuration.insertBelow}">
<f:render section="paginator" arguments="{pagination: pagination, configuration: configuration}" />
</f:if>
Updated by Georg Ringer almost 9 years ago
- Subject changed from ViewHleper f:widget.paginate - insertBelow /insertAbove doesn't work to ViewHelper f:widget.paginate - insertBelow /insertAbove doesn't work
Updated by Georg Ringer almost 9 years ago
i still can't reproduce. still no css issue?
does this also happen with the default template, even though the code is the same in that regard?
Updated by Johannes C. Laxander almost 9 years ago
Only this css:
ul.f3-widget-paginator { float: left; display: inline; margin-left: 0; } ul.f3-widget-paginator li { float: left; list-style: none; }
This is my full template code:
<div itemprop="events" itemscope itemtype="http://schema.org/Event"> <table> <tr> <th class="th-0"><f:translate key="..." /></th> ...more <th>...</th> </tr> <f:widget.paginate objects="{cruises}" as="paginatedCruises" configuration="{itemsPerPage:5,insertAbove:1,insertBelow:1}"> <f:for each="{paginatedCruises}" as="cruiseItem" iteration="cruiseIterator"> <f:cycle values="{0: 'even', 1: 'odd'}" as="class"> <f:render partial="..." arguments="{...}"/> </f:cycle> </f:for> </f:widget.paginate> <tr> <td class="legend" colspan="6"> <f:render partial="..." arguments="{...}"/> </td> </tr> </table> </div>
And here is the html output:
<div itemscope="" itemtype="http://schema.org/Organization"> <meta itemprop="name" content=""> <meta itemprop="url" content=""> <meta itemprop="logo" content=""> <div itemprop="address" itemscope="" itemtype="http://schema.org/PostalAddress"> <meta itemprop="name" content=""> <meta itemprop="streetAddress" content=""> <meta itemprop="postalCode" content=""> <meta itemprop="addressLocality" content=""> <meta itemprop="addressCountry" content=""> <meta itemprop="email" content=""> <meta itemprop="telephone" content="+49-711-6749600"> </div> <div itemprop="events" itemscope="" itemtype="http://schema.org/Event"> <ul class="f3-widget-paginator"> <li class="current">1</li> <li><a href="...">2</a></li> <li><a href="...">3</a></li> <li class="next"><a href="...">nächste</a></li> </ul> <ul class="f3-widget-paginator"> <li class="current">1</li> <li><a href="...">2</a></li> <li><a href="...">3</a></li> <li class="next"><a href="...">nächste</a></li> </ul> <table> ...output of <f:for each="{paginatedCruises}" look above... </table> </div> </div>
I can send you an url via email to have a look on the frontend.
Updated by Georg Ringer almost 9 years ago
hm FE alone would be not enough. ssh or ftp would be great to debug that!
Updated by Johannes C. Laxander almost 9 years ago
I will give you data to connect via ssh. Please give me the email to jochla@web.de.
Updated by Johannes C. Laxander over 8 years ago
I will give you access via ssh or ftp. Who ca I send the login data?
Updated by Dirk Sch. over 8 years ago
I can reproduce the issue. still present in 7.6
If you have a <table> outside the widget like:
<table> <f:widget.paginate objects="{articles}" as="pagedArticle" configuration="{itemsPerPage: 20, insertAbove: 0, insertBelow: 1}"> <f:for each="{pagedArticle}" as="article"> <tr> <td><f:link.action action="show" arguments="{articles : article}"> {article.title}</f:link.action></td> <td>{article.date -> f:format.date()}</td> </tr> </f:for> </f:widget.paginate> </table>
the table is rendered below all page browsers!
move the <table> tag INSIDE the widget and its OK:
<f:widget.paginate objects="{articles}" as="pagedArticle" configuration="{itemsPerPage: 20, insertAbove: 0, insertBelow: 1}"> <table> <f:for each="{pagedArticle}" as="article"> <tr> <td><f:link.action action="show" arguments="{articles : article}"> {article.title}</f:link.action></td> <td>{article.date -> f:format.date()}</td> </tr> </f:for> </table> </f:widget.paginate>
So i'm not sure if its a bug. If you use nested <div>'s everything renders fine. Only <table> seems to be a problem.
Updated by Claus Due about 8 years ago
- Status changed from Needs Feedback to Closed
Closing; not a bug but caused by the nature of HTML elements returned and the nesting used around it. To make such a thing work you would need to override the widget template file with one that renders tbody/tfoot/tr as is appropriate when you use a table around the widget.