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

Dmitry Dulepov typo3 at fm-world.ru
Thu Apr 6 11:44:51 CEST 2006


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.
-- 
"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)



More information about the TYPO3-project-templavoila mailing list