[TYPO3-dev] hook for overwrite or for new markers in substituteMarkerArray

Krystian Szymukowicz t33k.RE.MO.VE at RE.MO.VE.prolabium.com
Mon Sep 13 23:33:42 CEST 2010


On 2010-09-13 23:00, Jigal van Hemert wrote:
> Hi,
>
> On 13-9-2010 22:26, Krystian Szymukowicz wrote:
>> Maybe we should change the core function substituteMarkerArray and place
>> a hook there which allow to modify the $marker array.
>
> Are you sure this will work correctly when the extension calls the
> substituteMarkerArray function (or comparable functions) multiple times
> in various stages of building the output (e.g. nested subtemplates)?
>

I can not see reason it would not work well.

If the hook in the substituteMarkerArray adds 
###MY_MARKERS_AREA__MARKER1### then if this will not be found in the 
replaced $content it will not be substituted - no harm should be done.

Overwriting markers values that are changing in nested subtemplates its 
rather useless because we do not have the proper information to fill it.

But I can miss something because I mostly use Smarty for templating in 
TYPO3.




>> What do you think ?
>> How much can this decrease performance ?
>
> Any hook will decrease performance a little.
>
> Extension authors need to be encouraged to make their extensions more
> flexible in this area.
>
> It's quite easy to supply stdWrap support for each field in the db
> records inside the Typoscript configuration:
>
> listView {
> field1_stdWrap {
> ....
> }
> }
>
> And it's also quite easy to support extra markers in the Typoscript
> configuration:
>
> listView {
> markers {
> marker1 {
> ....
> }
> }
> }
>
> The extension only needs to use a few extra lines of code to add this
> flexibility.
>

This is true - I know it. And all the good extension like tt_news, cal, 
etc. have this possibility but there are always:
a) some orphan ext that are not more developed
b) developed but not very well - see sysext felogin where you have no 
way to add your own markers


--
grtz
Krystian Szymukowicz





More information about the TYPO3-dev mailing list