[TYPO3-mvc] TypoScript manipulation per object property

Franz Koch typo3.RemoveForMessage at elements-net.de
Fri Jul 23 00:06:07 CEST 2010


Hi,

> Thanks for your explanations. Unfortunately this seems
> quite more complicated than just using the cObject viewhelper.

it would be less writing in your templates and make templates less 
complicated to read.

> But it brings up an idea.
>
> What if I instantiate the ProxyModel inside the controller and
> assign it to the view then? For properties which hold model objects,
> the ProxyModel would also return a new ProxyModel or a ObjectStorage
> which again holds ProxyModels.

In my eyes it's clearly related to the view and not part of the 
controller logic - nor part of a models domain. It's about rendering 
content in the view - thus should be configured/done in the view.

> Furthermore it may makes sense to have a custom getter "getProxy"
> inside the ModelObject which could be called in the view:
>
> <h1>{object.proxy.title}</h1>

The downside of this is, that you have to implement that getter in every 
model you like to use a proxy for - doesn't sound much flexible to me.

> Then it's possible to decide in the view/template which
> property to use.

this is also possible with my suggestion.

> Not sure if this fits the DDD manner, and I'm also not that sure
> where to really implement the proxy mechanism.

As I wrote above - it would only make sense in a viewHelper in my eyes 
and would not be harder to implement as inside a controller like you 
suggested.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list