[TYPO3-dev] comments: show header only if comments allowed
Peter Russ
"peter,russ" at 4many.net
Mon Jan 12 11:31:07 CET 2009
--- Original Nachricht ---
Absender: Steffen Müller
Datum: 12.01.2009 10:54:
> Hi.
>
> On 12.01.2009 09:46 Peter Russ wrote:
>>> This is what I thought, too.
>>> Can't we prevent this output if there's no form and no comments or is
>>> this an essential thing for you that this (and empty pagebrowse tag)
>>> are printed out even when there's no content?
>>>
>>> Steffen
>> +1
>> Provide a patch for pibase and a option to config.
>>
>
> A suggestion:
> For backward compatibility, default is to use pi_wrapInBaseClass.
> Alternatively, use stdWrap as TS configuration option if set:
>
> + function baseWrap($content) {
> + if (!isset($this->conf['baseWrap.'])) {
> + return $this->pi_wrapInBaseClass($content);
> + } else {
> + return $this->cObj->stdWrap($content,$this->conf['baseWrap.']);
> + }
> + }
>
> and use this function in main() function:
> - return $this->pi_wrapInBaseClass($content);
> + return $this->baseWrap($content);
>
> Add to configuration documentation:
>
> plugin.tx_pluginname_pi1 {
> # Remove the baseWrap div container
> baseWrap.wrap = |
> }
>
> Using static pi_wrapInBaseClass is very common in extensions. I don't
> like it because it makes it hard to reuse cObjects in other extensions
> (or eID). Find detailed complains on this topic in my blog:
> http://www.t3node.com/blog/fe-plugins-need-configurable-basewrap-instead-of-static-pi-wrapinbaseclass/
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.
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