[TYPO3-dev] Moving the topic of the discussion a littlebit--Based of thread "Change roadmap..."

JoH info at cybercraft.de
Thu Apr 13 02:15:21 CEST 2006


>> I think we are talking about different things. HTML/CSS is just a
>> part of presentation layer, and a very small at that. To give you a
>> real-life example, let's take calendar extension.
>>
>> Russians are somewhat weird people and their week starts on Monday.
>> Does this fact change any _LOGICS_ as far as the calendar should
>> work? No, it just changes the way it should be rendered when we are
>> viewing a month at a time (we should put Monday at the beginning of
>> the line, all other things being equal). Therefore, only a change in
>> _PRESENTATION_LAYER_ is needed, while all the code that handles
>> recurring events and so on still makes sense.
>>
>> Can you implement this change that in TS+Marker _templates_? No, you
>> have to modify displayWeek() function in class.tx_calendar_pi1.php by
>> XCLASSing it, while in reality all you need is just a different look.
>
>
> I'm not following the logic here--this is _exactly_ the sort of
> thing--configuration--that TS is purpose-built to do. It doesn't
> reflect well or poorly on either Smarty or TS if the design of the
> displayWeek() function in the main calendar class is not well-adapted
> to the framework it runs in (i.e. if the class has not been made
> TS-aware for such a commonplace calendar operations)...
>
> Whether TS or Smarty are part of the presentation layer or not, I
> think that one of TYPO3's _strong_ points is an almost total
> separation of any kind of control structures from the markup. It's a
> feature, not an omission.

Exactly this is the point - and it seems it is the point Dimitri is still
missing.
In fact it's even better and the extension author could implement a
TypoScript parameter for this purpose.
Together with a condition you would not have to even touch the PHP code or
any template to make the output fit your needs.

weekStartingDay = Default
[globalVar = GP:L = 1]
weekStartingDay = Monday
[globalVar = GP:L = 2]
weekStartingDay = Another weird starting day
[global]

But I have to admit, that this is not the case for many extensions because
their developers don't care about the use of  TypoScript at all.
A good example how TypoScript can be used to make the output of an extension
as flexible as possible is tt_news, that is following the principle "stdWrap
for everybody".
Take a look at it and tell me how you want to do that with a smarty-only
solution.

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.cybercraft.de






More information about the TYPO3-dev mailing list