[TYPO3-project-formidable] Pager don't show on renderlet:LISTER with a template

Gary Wong gary.wong at spingroup.com
Tue Dec 2 00:43:57 CET 2008


Rego,

I ran into the same problem.  It's probably a bug, but I found that if 
you defined a template for the pager, then it will show up:

Put this into your lister...

<pager>
    <template>
        <path>/fileadmin/my_template.html</path>
        <subpart>###LIST_PAGER###</subpart>
    </template>
    <rows perpage="5"/>
    <sort column="crdate" direction="DESC" />
</pager>

In your lister template, create a new section for the pager template. In 
your case, like this:

<!-- ###LIST### begin-->

<ul>
   <!-- ###ROWS### begin-->
      <!-- ###ROW### begin-->
         <li>
             <h1>{title}</h1>
             <p>{short}</p>
         </li>
      <!-- ###ROW### end-->
   <!-- ###ROWS### end-->
</ul>                           
                                
{PAGER}    

<!-- ###LIST### end-->

<!-- ###LIST_PAGER### begin-->
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td style="width: 40%;" align="left">
                <!-- ###LINKFIRST### begin-->
                    <a
title="First" href="{link}">First</a>
                <!-- ###LINKFIRST### end-->
                 <!-- ###LINKPREV### begin-->
                    <a
title="Previous" href="{link}">Previous</a>
                <!-- ###LINKPREV### end-->
            </td>
            <td align="center">Page {page} of {pagemax}</td>
            <td style="width: 40%;" align="right">
                <!-- ###LINKNEXT### begin-->
                    <a
title="Next" href="{link}">Next</a>
                <!-- ###LINKNEXT### end-->
                 <!-- ###LINKLAST### begin-->
                    <a
title="Last" href="{link}">Last</a>
                <!-- ###LINKLAST### end-->
            </td>
        </tr>
    </table>

<!-- ###LIST_PAGER### end-->

Give that a try.

-Gary

Manuel Rego Casasnovas wrote:
> Hello,
>
> I've the next renderlet:LISTER:
>     <renderlet:LISTER name="news_list">
>       <datasource use="news" />
>       <columns>
>         <column name="title" type="renderlet:TEXT" listHeader="title" />
>         <column name="short" type="renderlet:TEXT"
> listHeader="subtitle" />
>       </columns>
>       <template>
>         <path>fileadmin/my_template.html</path>
>         <subpart>###LIST###</subpart>
>         <alternaterows>###ROW###</alternaterows>
>       </template>
>       <ifempty>No results</ifempty>
>     </renderlet:LISTER>
>
>
> With this template:
> <!-- ###LIST### begin-->
>
> <ul>
>    <!-- ###ROWS### begin-->
>       <!-- ###ROW### begin-->
>          <li>
>              <h1>{title}</h1>
>              <p>{short}</p>
>          </li>
>       <!-- ###ROW### end-->
>    <!-- ###ROWS### end-->
> </ul>                           
>                                 
> {PAGER}    
>
> <!-- ###LIST### end-->
>
>
> And the pager is not showed when the page is rendered and I can't find
> any reason.
>
>
> I've tested more options and nothing works:
> <pager>
>    <rows>
>       <perpage>5</perpage>
>    </rows>
>    <display>true</display>
> </pager>
>
>
> I know that it's quite strange to use a template for the lister and try
> to use a default pager, but I'm doing some tests and for the moment the
> default pager is enough.
>
> However I'm not sure if it's a bug or it's just the expected behaviour.
>
> Best regards,
>    Rego
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> TYPO3-project-formidable mailing list
> TYPO3-project-formidable at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable

-- 
Gary Wong
Spin Group, Inc.
Web, eCommerce, Online Marketing - Over 10 years strong!
http://www.SpinGroup.com




More information about the TYPO3-project-formidable mailing list