[TYPO3-dev] comments: show header only if comments allowed
Peter Russ
"peter,russ" at 4many.net
Mon Jan 12 18:31:23 CET 2009
--- Original Nachricht ---
Absender: Steffen Müller
Datum: 12.01.2009 16:24:
> On 12.01.2009 11:31 Peter Russ wrote:
>> Good idea, but would require to touch every extension :-(
>> So best place to do the check and do the wrapping would be in
>> pi_wrapInBaseClass. And you could just configure it in TS as this->conf
>> should be available in most extensions.
>>
>
> You're right.
>
> What about the precedence?
> Should baseWrap overrule the empty content?
>
> baseWrap > empty $content > <div class="tx_extension_pi1">|<div>
> or
> empty $content > baseWrap > <div class="tx_extension_pi1">|<div>
>
>
>
jm2c:
2 new general install:
$TYPO3_CONF_VARS['FE']['disableWrapEmptyContent']
$TYPO3_CONF_VARS['FE']['disableWrapInDefaultBaseClass']
For compatibility reason I would check the 'disabled' version of these
parameters, i.e. if they are not set behaviour should work as without
the patch.
would move pi_wrapInBaseClass to _pi_wrapInBaseClass
new pi_wrapInBaseClass:
disableWrapEmptyContent && $content=='' ? -> return '';
disableWrapInDefaultBaseClass ? {
$conf['baseWrap.'] = $this->$conf['baseWrap.'];
#T.B.D: comments as in _pi_wrapInBaseClass to identiy element?
return $this->cObj->stdWrap($content,$conf['baseWrap.'])
} else {
#... "normal" pi_wrapInBaseClass behavoir
return $this->_pi_wrapInBaseClass($content)
}
Could work. Not tested.
Peter.
--
Fiat lux!
Docendo discimus.
http://www.gidf.de
_____________________________
4Many� Services
XING: https://www.xing.com/go/invita/360052
http://www.xing.com/go/privatemessage/Peter_Russ
More information about the TYPO3-dev
mailing list