[TYPO3-dev] stdWrap for all TLO's

Ernesto Baschny [cron IT] ernst at cron-it.de
Wed Feb 27 23:10:51 CET 2008


Steffen Kamper wrote: on 14.02.2008 09:40:

>> JoH asenau wrote:
>>> But the problem remains: If you are using a plugin _and_ the author 
>>> didn't
>>> implement $this->cObj->stdWrap, you simply can't use it.
>>> So I would prefer a default stdWrap for all USER or USER_INT elements to
>>> provide stdWrap properties regardless of the extension itself.
>> I have an idea but it only applies to newly generated extensions.
>>
>> Currently kickstarter generates empty TS. May be it should generate 
>> default TS like this:
>>
>> plugin.tx_extkey_pi1 = USER
>> plugin.tx_extkey_pi1 {
>> userFunc = tx_extkey_pi1->main
>> stdWrap.wrap = <div class="tx-extkey-pi1">|</div>
>> }
>>
>> And class tx_extkey_pi1 has this main():
>>
>> function main(....) {
>> ...
>>
>> return $this->cObj->stdWrap($content, $this->conf['stdWrap.']);
>> }
>>
>> This way we still preserve pi_wrapInBaseClass functionality but provide 
>> stdWrap for any [new] extension.
>>
>> -- 
> 
> the idea is good but then it depends on authors using it. If it would be 
> generally applied to USER/_INT the author must not care about and even older 
> extensions would work this way.

But TYPO3 cannot know if the plugin itself already applied the "stdWrap" 
on its own, because the cObject's rendering is like a "black box". And 
applying a stdWrap twice can make damages. So it is not possible (now) 
to have a "fallback stdWrap" being done by TYPO3 in USER/USER_INT cObjects.

Cheers,
Ernesto




More information about the TYPO3-dev mailing list