[Typo3-dev] TS: Using values returned by a userFunction

Thorsten Kahler thorsten.kahler at dkd.de
Thu Oct 27 18:58:59 CEST 2005


Hi Nicolas,

IMHO your current solution conflicts with TYPO3s caching mechanisms.

plugin.tt_news is an USER object (at least for the more current versions of
tt_content) so it's "executed" before the whole page is cached. USER_INT
objects, like your temp.catuid aren't cached and instead executed just
before delivering the HTML. So your "< temp.catuid" doesn't work on an USER
object. (see details on [1])

As I don't know what your userFunc does I suggest two possible solutions.
The first one is a little bit faster but it might cause other cache
problems. So you might use the second suggestion if you get wrong content.

1)
make temp.catuid an USER object:
change
temp.catuid = USER_INT
to
temp.catuid = USER

2)
make seccion.newsLatest an USER_INT object:
seccion.newsLatest < plugin.tt_news
seccion.newsLatest = USER_INT
seccion.newsLatest {
...
}

Good luck
Thorsten

[1] http://typo3.org/documentation/document-library/doc_core_tsref/

Nicolas Cohen wrote:
> Ries van Twisk wrote:
>> try this but I am not sure if categorySelection iis a stdWrap:
>>
>> You need to change = to <
>>
>> categorySelection < lib.categorySelection
>>
>>
> Thanks Ries, i tried that but it didnt work, maybe i am making some
> other mistake here?
> 
> # Portadas de seccion
> 
> includeLibs.something = fileadmin/scripts/seccion_category.php
> 
> temp.catuid  = USER_INT
> temp.catuid {
>         userFunc = user_seccion_category
>    }
> 
> 
> seccion.newsLatest < plugin.tt_news
> seccion.newsLatest {
>   [...]
> }
> 
> 
> 
> Any solution here would be fantastic, we are considering editing php or
> adding an extension, but need to be sure that there's no "fair" way to
> do this.
> 
> Thanks,
> Nicolas





More information about the TYPO3-dev mailing list