[TYPO3-core] RFC: #10118: Make pi_wrapInBaseClass wraps configurable
Jigal van Hemert
jigal at xs4all.nl
Sat Aug 28 13:31:21 CEST 2010
On 27-8-2010 16:44, Ingo Renner wrote:
> - use an easy name for the configuration option
> - the option name is not negated / is positive
> - allows to disable wrapping globally / globally if empty
> - allows to disable wrapping per plugin instance / if empty
I like this approach!
> The implementation first
>
> - checks whether wrapping is enabled for the current plugin instance, then
> - builds the wrap, and finally
> - applies the wrap if wrapping is enabled
This is where you've lost me. The disabling part I understand, but how
to enable it?
config.pluginWrap = 1
config.pluginWrap.wrap = <li>|</li>
(whitespace reduced for line width)
// global wrap overriding default wrap
if (!empty($GLOBALS['TSFE']->config['config']['pluginWrap'])) {
$pluginWrap = $this->cObj->stdWrap(
$GLOBALS['TSFE']->config['config']['pluginWrap'],
$GLOBALS['TSFE']->config['config']['pluginWrap.']
);
}
(Also ['config'] should be ['config.'], right?)
This will turn my setting into:
$pluginWrap = <li>1</li>
At the end this is applied as wrap, so to make it work I must set
config.pluginWrap = |
which is quite odd.
Why not have pluginWrap = 1 to activate and override and use the entire
['config']['pluginWrap.'] as stdWrap configuration?
In that case the default must be like
$pluginWrap = array( 'wrap' => '<div class=........|</div>');
and the prefixComment can be applied separatedly at the end of the function.
--
Kind regards / met vriendelijke groet,
Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh
More information about the TYPO3-team-core
mailing list