[TYPO3-dev] Fixing the last 20% and TypoScript annoyance

JoH asenau info at cybercraft.de
Tue Feb 9 15:38:50 CET 2010


>> So IMHO we should streamline all of the TypoScript elements to stick
>> to the same syntax and to remove inconsistencies as well as
>> redundancies.
>
> I'd love to have stdWrap for everything on the top level (without
> extra 'stdWrap' property). This is similar to OBTS approach and it
> would be really flexible. On the other hand it means extra checks in
> the code because we do not want to call tslib_cObj::stdWrap() with an
> empty array due to performance reasons.

This is what I first thought too, but then we will run into problems with
any top level parameter which is NOT available as stdWrap function - unless
you have an idea how to solve that.

Example RECORDS:

10 = RECORDS
10 {
    source = blah #non-stdWrap
    tables = blah #non-stdWrap
    conf {
        #non-stdWrap
    }
    wrap = blah
    dontCheckPid = 1 #non-stdWrap
    stdWrap {
        if.isTrue = blah
    }
}

What I would like to get is:

10 = RECORDS
10 {
    source = blah
    source.stdWrap.field = blah
    tables = blah
    tables.stdWrap.field = blah
    conf {

    }
    dontCheckPid = 1 #non-stdWrap
    dontCheckPid.stdWrap.field = blah
    stdWrap {
        if.isTrue = blah
    }
}

Means: stdWrap as a default top level parameter AND a default parameter of
ALL top level parameters.

Of course this means extra checks, but if we do it properly, we won't run
into too many performance issues, because stdWrap will only be called on
demand.
In any case I would prefer to use stdWrap as a kind of a trigger - if
there's a key ['stdWrap.'] do something, else do nothing.
The top level approach without stdWrap as a trigger will make checking more
difficult, because we would have to check each and every top level parameter
to decide if it is a stdWrap function or not.

But maybe there is an easy solution?

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com






More information about the TYPO3-dev mailing list