[TYPO3-dev] Resultlist & Details View USER_(INT)

Ernesto Baschny [cron IT] ernst at cron-it.de
Wed Jan 18 13:36:48 CET 2006


Martin Kutschker schrieb am 18.01.2006 13:04:

>> [globalVar = GP:whatever > 0]
>> plugin.tx_myplugin.pi1 = USER_INT
>> [else]
>>
>> plugin.tx_myplugin.pi1 = USER
>> [global]
>>
>> Will give you i.e. a cached list but a non cached single view.
>> I don't think it's a good idea to introduce a mixed object since this
>> will
>> lead to a lot of confusion.

> Why? The TS is fine but doesn't look easy to set up. I don't like the
> idea of adding too much conditions to my TS (same reason as Dmitry)
> 
> The new object solves the problem and all the burden is on the shoulders
> of the development author.
> 
> A new type meakes it quite clear in the object browser that caching may
> or may not occur. Which is an improvent in comparison to USER that
> disable caching for the complete page.

Dmitry Dulepov schrieb am 18.01.2006 12:56:

> "List" and "details" are not the only cases when you may want to
> convert USER to USER_INT.

If the USER_CINT plugin will decide based on piVars whether it will be
cached or not (since once it is cached as USER, there's no way to change
that, since TYPO3-core won't ever call it again), the plugin can have a
static/setup.txt which does exactly this already, just as JoH already
mentioned. No need for +ext-Templates or other stuff. The
plugin-developer can already place this stuff in the static/setup.txt,
which the user is expected to include anyway on installation of the plugin.

Peter Niederlag wrote:

> Well it is a *good idea* to let the Extension-code itself decide about
> wether it wants to behave a USER or USER_INT. Its stupid to have to
> rely on TS-Coding from "outside". ;(

This don't need to come from "outside", the plugin-developer just has to
add the condition into its static.txt. And even doing that, the
admin/user is still able to change this behaviour (e.g. "ah, I want the
list view also to be cached!") just by setting TypoScript accordingly,
no need to dig the PHP-code.

So I also see no reason for a new object type, unless I am not seeing
any potential other benefit of it. :)

Cheers,
Ernesto




More information about the TYPO3-dev mailing list