[TYPO3-dev] hard coded <div> in pi_wrapInBaseClass
Jigal van Hemert
jigal at xs4all.nl
Fri Aug 13 08:16:37 CEST 2010
On 12-8-2010 23:33, Lina Wolf wrote:
> Almost all extensions that come with a non-fluid plugin have this
> TypoScript at the last line:
>
> return $this->pi_wrapInBaseClass($content);
>
> I usually prefere
>
> return $this->cObj->stdWrap($content, $conf['stdWrap.']);
>
> to be more flexible, but that breaks the prefix comments
I personally use
if (!$this->conf['disableBaseWrap']) {
$content = $this->pi_wrapInBaseClass($content);
}
If there is no div with the prefixId wanted around the output a prefix
comment is often also undesirable. E.g. inside lists, part of URL in
link, etc.
The wrap in base class construction was probably added to make it
possible to style the contents of a particular extension without
influencing the rest.
With multiple instances of a plugin on the same page you may need
something completely different: a wrap with a unique ID to differentiate
between each instance. This would need a different solution (flexform
setting to overwrite the TS?).
Demands for web pages have changed a bit over time, so I think it's up
to the extension author to come with a solution that works well for
typical usages of his/her extension.
--
Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh
More information about the TYPO3-dev
mailing list