[TYPO3-mvc] How to create an archive menu of dates from my objects

Sebastian Schreiber me at schreibersebastian.de
Mon Jul 25 09:13:03 CEST 2011


Hello Henjo,
maybe this url could help you:
http://blog.marit.ag/2010/05/26/extbase-fluid-blog_example_amen/
I think there are plenty of solutions to solve your problem.

Good luck

Am 25.07.2011 08:22, schrieb Henjo Hoeksma:
> On 2011-07-25 06:35:52 +0000, Pankaj Lele said:
>
>> Hello Henjo,
>>
>>> I tried several approaches now on creating a ViewHelper, or 
>>> rendering it
>>> with Fluid as is, but all of them to no avail. I clearly lack some
>>> understanding here and would appreciate it if some of you could 
>>> point me
>>> in the right direction!
>>
>> I think one of the idea would be to add 2 new properties year and month
>> to your Item model. No need to add them to the table actually ( I have a
>> little doubt if this would work but worth trying. ). Then set these 2
>> properties in the __contruct() of the model.
>>
>> public function __contruct() {
>>     $this->setYear($this->getDate()->format('Y'));
>>     $this->setMonth($this->getDate()->format('m'));
>> }
>>
>> Then using the f:groupedFor [1] you can easily group your objects first
>> with the year and then month by nesting f:groupedFor
>>
>> Thanks,
>> Pankaj
>>
>> [1]
>> http://api.typo3.org/typo3v4/current/html/class_tx___fluid___view_helpers___grouped_for_view_helper.html 
>>
>
> Hi
>>
> Pankaj,
>
> thank you for your solution. I have been thinking about this, but 
> didn't want to clutter my model with stuff that's allready there. 
> Since I haven't found another way to do this, I might go for this 
> anyaways.
>
> Thanks again for sharing.
>
> Henjo
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc


-- 
Sebastian Schreiber
(Medieninformatiker)
(TYPO3 Certified Integrator)

Sülzburgstraße 36
D-50937 Köln

T  0221 677 88 541
M  0176 431 05 790

Skype schreibersebastian.de

me at schreibersebastian.de
www.schreibersebastian.de

Steuernummer: 219 / 5302 / 2302



More information about the TYPO3-project-typo3v4mvc mailing list