[TYPO3-mvc] Accessing Typoscript values from a fluid template

Franz Koch typo3.RemoveForMessage at elements-net.de
Tue Apr 19 20:07:54 CEST 2011


Hey,

> In the fluid template :
> {settings.limit} does work
> {persistence.storagePid} does NOT work (no access to 'persistence' rootline)
>
> In a controller :
> $this->settings['limit'] does work
> $this->persistence['storagePid'] does NOT work
>
> In a viewHelper :
> $this->settings['limit'] does work
> $this->persistence['storagePid'] does NOT work

I'm sorry, but WHY do you need the storagePid inside a viewHelper? If 
you like to do queries, inject the according repository and use it - no 
need for the PIDs then as the repositories already know about them.
Also VHs should in most cases get the configuration options passed as 
arguments and not try to fetch them hidden from the editor or whoever is 
using that VH. It's a bit different for widgets, but widgets do have 
their own controller which is "allowed" to mess with some global/shared 
configuration if needed.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list