[TYPO3] Repeat Breadcrumb menu twice
Xavier Perseguers
typo3 at perseguers.ch
Sun Aug 24 11:39:27 CEST 2008
Hi,
> But that doesn't make any sense. You get rid of a single class but then
> use two id's?! It'd be better to just use a single class and control the
> layout with it.
This *does* make sense as you definitively should use IDs to map an
element to TemplaVoilà. Not using ID leads to boring and "useless"
additional work when you change your template and have to remap it as
mapped elements cannot be found again easily (or at all).
Explanation of TV:
When you have following extract:
<html>
<div class="wrapper">
<div id="content">CONTENT GOES HERE</div>
</div>
</html>
and map it with TV, the mapping is done on #content. Without any id,
that is with
<html>
<div class="wrapper">
<div>CONTENT GOES HERE</div>
</div>
</html>
Mapping will be saved with the XPath to the element, that is with
/div/div
Now suppose you change your model to have an additional zone before the
content:
<html>
<div class="wrapper">
<p>
Something to say:
<div>CONTENT GOES HERE</div>
</p>
</div>
</html>
Then the mapping does not work anymore as /div/div does not exist!
Whereas with an id:
<html>
<div class="wrapper">
<p>
Something to say:
<div id="content">CONTENT GOES HERE</div>
</p>
</div>
</html>
The mapping stays as #content!
--
Xavier Perseguers
http://xavier.perseguers.ch/en
More information about the TYPO3-english
mailing list