[TYPO3-templavoila] Mapping rules in matters of class or id

Christian Vetter Christian.Vetter at dragoner-design.de
Thu Apr 6 13:35:08 CEST 2006


Hi Dmitry,
If you say you don't like mapping rules at all, that's a statement, and as  
it's your opinion I have no inclination to argue it.
But just think about this:
I usually know what I'm doing, and since I know that the only other person  
here working on web related projects also knows what he's doing, I usually  
don't employ any mapping rules at all. Now that we've established a  
working base of proficiency in matters of TemplaVoila and Typo3 in  
general, it's also a plausible option to finely rule the mapping in order  
to quicken the actual mapping process - if there are but one or a few  
(depending on id versus class) tags to choose from one finds the correct  
tag much faster.
Apart from that, I can imagine an environment that's more open because  
there are more people involved - there mapping rules might be even more  
useful in speeding up the mapping. On the other hand I must admit that I  
haven't yet had the opportunity to work in a larger environment and to  
experience the realities of such a situation so that's mostly guesswork.
One word on the term 'know': I hope we agree that a DS can't really know  
anything, but in fact it does put forward requirements to the template  
objects. If we do, I think your argument about the DS knowing about the TO  
is invalid.
All that being said, I think most of this is plainly a matter of opinion,  
and there I do understand your point - and I'm completely ok with it, but  
I also ask you to try to understand Frederic's and my point.

Best regards,
Christian

PS: if my wording is bad, please bear with me, for I have a terrible  
headache today...


Am 06.04.2006, 11:44 Uhr, schrieb Dmitry Dulepov <typo3 at fm-world.ru>:

> Hi!
>
> Christian Vetter wrote:
>> Let's be logical here - I agree with Frederic, because mapping rules are
>> about mapping the DS to the TO, so they would not make any sense to be
>> thought only in conjunction with the DS.
>
> And they are not. But they may not depend on particular details of
> concrete TO. For example, I have one DS on one corporate site with eight
> TOs. It all perfectly works. There are no DS dependencies on template
> file structure. Template files are very different but mapping rules work
> well for all of them because both DS structure and template structure
> was well thought and designed.
>
>> Also, the DS already 'knows'
>> something about the TO in that, e.g. it knows the mapping type and tag -
>> the class and/or id would be the next logical step, wouldn't it ? This
>> would really only allow a finer adjustment, not mess with underlying
>> principle.
>
> If you can put tag to DS, it does not mean that DS know about template.
> Generally, the less specific tag you put - the better. Tags should be
> used in cases like img:attr:src or img:outer or a:attr:href. Having
> div:inner is possible but limits template structure quite a lot. So
> personally I consider it bad.
>
>> Totally agree with Frederic - as written above. I guess the .#-syntax is
>> the natural choice, isn't it ;)
>
> So, all your template must have this #id or you will not be able to map
> that element. Does not sound as a good solution to me.
>
> Dmitry.



More information about the TYPO3-project-templavoila mailing list