[TYPO3-dev] Best practice: Fluid and split object property?
Gerhard Mehsel
sparking at gmx.net
Sun Jul 18 21:19:40 CEST 2010
Hello,
I'm just coding my first extbase/fluid extension and have a question how
to achieve the following at a good/extbase way.
A user creates a database record in BE where he has to select a date.
Afterwards in FE this date is used to categorize the database records.
An example:
The user creates three database records with the three dates:
2010-07-12, 2010-06-11 and 2011-01-12.
Now in FE view I want to render two main tabs named "2010" and "2011",
first with two subtabs named "07" and "06" and the second with one
subtab named "01".
In my fluid template I iterate over the DB record objects. And these
objects have one property "date" but I need to split that dates into
year and month to be able to render some nice tabs and subtabs.
Where do I do that? Do I do that in controller and assign it to
different view variables? Or do I do that within the fluid template, if
possible? Or should my model supply the date splitted into year, month
and days?
Thank you for tips,
Gerd
More information about the TYPO3-dev
mailing list