[TYPO3-dev] hard coded <div> in pi_wrapInBaseClass
Lina Wolf
liste at linawolf.de
Fri Aug 13 08:45:03 CEST 2010
Even if you disable that, it depends on the single author to make the
disabling of the Base Wrap possible. Hard coded HTML-Code is bad style,
even worse if we think at generating something else with TYPO3 (XML,
dynamically created JavaScript, ...)
If we would have a special stdWrap function that is called by
pi_wrapInBaseClass and offers all fields of the plugin (like uid,
pageid, date, title) plus all fields of the flexform then the wrap could
be dynamically rewritten and even the whole plugin be overridden if
nessesary.
Am 13.08.2010 08:16, schrieb Jigal van Hemert:
> 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.
>
More information about the TYPO3-dev
mailing list