[Typo3-dev] Strange TV mapping part 2

Stefan Holtzhauer holtzhauer at webit.de
Tue Nov 30 12:16:29 CET 2004


Hi Andreas,

Andreas Otto wrote:
> <div id="centerFrameFC">
>  <div id="" class="" style="">
>   <h3 class="fooBar"><span class="fcWrap">Teaser 1 Headline</span></h3>
>   <p>Teaser 1 copy Teaser 1 copy Teaser 1 copy Teaser 1 copy </p>
>  </div>
> </div>

it is definitely possible to map your html structure. You definitely
have some fundamental mistakes in your mapping. I tried it myself. It
works the following way:

CO root                    -> 1st div (outer)
   CO field_cont_bg         -> 2nd div (inner!!!)
     CO field_cont_headline -> h3 (inner!!!)
       EL field_headline    -> span (inner)
     AT field_bg_class      -> h3 (ATTR:class)
     EL field_text          -> p (inner)
   AT field_bg              -> 1st div (ATTR:style)

It's a fact that you can't map an attribute of a tag that itself is
already mapped outer. Why? Well, the tag including its content is
overridden by other COs or ELs. There is no attribute left to map.
Hence you have to map the tag (of which you also want to map one
or more attributes) inner. Thereafter (or even before, I didn't try)
you can map the attributes on the same (!) level in the mapping
hierarchy.

Regards,
Stefan




More information about the TYPO3-dev mailing list