[TYPO3-mvc] extbase_pager usage.

Braulio J. Solano-Rojas braulio at solsoft.biz
Sat Aug 7 00:26:40 CEST 2010


Hello.

El 06/08/2010 02:05 a.m., Nils Blattner escribió:
>
> Sorry for beeing a bit inactive on the newsgroup lately, had a rather
> busy last few weeks.

It's free therefore from my part I would not dare to put pressure on 
you. :-)

 > [Snip]
 >
> I hope this helped you.

Yes, a lot, thank you very much.

I even got it working with a regular array (not a query result).  :-)

In the controller:

$articlesArchive = array();
/*
...
*/
$pageCount = intval(ceil(count($articlesArchive)/10));
$articlesArchive = array_slice($articlesArchive, ($page-1)*10, 10);
$this->view->assign('page', $page);
$this->view->assign('pageCount', $pageCount);
$this->view->assign('articlesArchive', $articlesArchive);

(Maybe not very efficient since I calculate the entire array).

> As I wrote earlier, once I get some more spare time for it, I will
> certainly update the documentation.

I think this thread is already a good documentation.  Maybe it would be 
good to have a link to this thread on the wiki.

Best regards,

B.


> Am 05.08.10 07:33, schrieb Jonas Dübi:
>> Hi
>>
>> sorry, that we didn't find the time to answer you.
>>
>> Please add questions and issues to
>> http://forge.typo3.org/projects/extension-extbase_pager/issues
>>
>> That's very important for the project!
>>
>> I'll ask Nils if he finds the time to help you.
>>
>> Best regards,
>> Jonas
>>
>> Bastian Waidelich schrieb:
>>> Braulio J. Solano-Rojas wrote:
>>>
>>> Hi Braulio,
>>>
>>>>>> I have installed extbase_pager extension and I have added this in my
>>>>>> layout:
>>>>>>
>>>>>> {namespace m=Tx_ExtbasePager_ViewHelpers}
>>>
>>> You will have to add this namespace declaration in every template file
>>> that uses the namespace. That might seem cumbersome, but it has some
>>> important advantages:
>>> - the template/partial is more explicit and easier to comprehend
>>> - the template/partial is re-usable
>>> - auto completion will (once) work even for custom ViewHelpers
>>>
>>> Only the "f" namespace is pre-defined and can't be overridden.
>>>
>>>
>>>> IMHO, I think I rushed into using extbase. IHMO too, extbase is not
>>>> feature complete despite the version is greater than 1.0.0.
>>>
>>> The version number doesn't say anything about feature completeness
>>> (Windows 3.1 wasn't feature complete and I'm sure it still isn't with
>>> version 7 ;)
>>>
>>>
>>>> I've been having troubles with simple things...
>>>
>>> That's a pity.. But I'm sure, thats mostly the case when you start
>>> working with a new framework. We're trying to lower the barriers and
>>> we know, that we're not there yet. That's why it's so important to get
>>> feedback and constructive criticism from the community.
>>>
>>>
>>>> [...] as a MVC framework it does not follow the convention over
>>>> configuration
>>>> philosophy
>>>
>>> Could you give an example where exactly you're missing this?
>>> If you're talking about the fact, that you have to configure the
>>> extension in so many different ways and places (Annotations, TCA,
>>> TypoScript) I agree with you.. The reason for this is, that we had to
>>> embed this framework in the world of TYPO3 without breaking the
>>> existing conventions too much.
>>>
>>>
>>>> (too much code bureaucracy for my taste).
>>>
>>> An example would be great.
>>> If you're thinking about the need to properly annotate your methods
>>> and properties - I think, this is rather a feature of Extbase & Fluid.
>>>
>>>
>>>> If I get the pager to work I'll send an email.
>>>
>>> I didn't test the pager and I don't want to judge it at all. But be
>>> aware, that this is a community extension thus it might not be in sync
>>> with the current Extbase / Fluid versions.
>>> BTW: We're working on a nice approach for these "extended ViewHelpers"
>>> aka Widgets (see http://forge.typo3.org/issues/8773)
>>>
>>> Best,
>>> Bastian
>



More information about the TYPO3-project-typo3v4mvc mailing list