[TYPO3] Typo3 validation

Erik Svendsen erik at linnearad.no
Tue Mar 7 09:17:36 CET 2006


Hello Andreas,

> Hi list.
> 
> Please apologize if I’m wrong.  I’m just a rookie trying to learn
> Typo3. Obviously one month is not enough to know everything inside T3.
> 
> I guess I did find the problem.  It is not my template/css because I
> developed my template, and style script on Typo3 3.8.1 on my local
> machine and tested everything thoroughly.  All my test pages
> validated.  Then I installed Typo3 4.0 beta3 on my server and just
> uploaded my Typoscript code, template and css scripts.  Everything
> worked fine until I decided to validate again.
> 
> As told the menu/sitemap links causes invalid pages. What I have found
> is
> that 3.8.1 generates a "div class=" for the menu and beta3 an "ul
> class=".
> Hence, the p tag that follows is faulty (no p tags allowed within ul
> tags.)
> Please someone check that behavior and let me know results.   If I’m
> wrong I wish to amend my code.

You should check your wrapping of menues, probably you have some flaws there. 
Following TS gives a clean ul/li menu. Textbased.

----code----
## Menu [Begin]
lib.mainMenu = HMENU
lib.mainMenu.entryLevel = 0
lib.mainMenu.wrap = <ul>|</ul>
lib.mainMenu.1 = TMENU
lib.mainMenu.1.NO {
	allWrap = <li>|</li>
}
	
lib.mainMenu.1.ACT = 1
lib.mainMenu.1.ACT {
	allWrap = <li class="act">|</li>
}
---code end---

I'm using TV to map the template, and the menu is mapped to a div-tag.

The output look like this.
<div id="main-nav">
  <ul>
     <li class="act"><a href="index.php?id=home" onfocus="blurLink(this);">Home</a></li>
     <li><a href="index.php?id=60" onfocus="blurLink(this);">Something</a></li>
     <li><a href="index.php?id=59" onfocus="blurLink(this);">Another page</a></li>
     <li><a href="index.php?id=58" onfocus="blurLink(this);">Support</a></li>
     <li><a href="index.php?id=57" onfocus="blurLink(this);">Help us</a></li>
     <li><a href="index.php?id=56" onfocus="blurLink(this);">A last page</a></li>
  </ul>
</div>

You should also use following in your TS.

config.xmlprologue = none  /no xmlprologue at top 
config.doctype = xhtml_trans  /define the dtd
config.xhtml_cleaning = all  /cleans code

I'm always using either XHTML 1.0 Trans or Strict. And the example was orginally 
made on ver 3.8.1 and are also tested on 4.0beta3.


WBR,
Erik Svendsen
www.linnearad.no





More information about the TYPO3-english mailing list