[TYPO3] Empty <ul> caused invalid XHTML

Christopher Torgalson bedlamhotel at gmail.com
Tue Feb 5 08:55:21 CET 2008


Hi,

On Feb 5, 2008 8:48 AM, Kesit Barotoardi <barotoardi at yahoo.com.sg> wrote:
> Hi friends,
> kind of need help here.
>
> I had problem on my Typo3 page due to invalid XHTML transitional.
> Failed validation was caused by empty <ul> of my level 2 navigation (there's no subpages under the page which I check for validation).
>
> This is my typoscript for sub navigation:
>
> lib.sub_nav = HMENU
> lib.sub_nav.entryLevel = 1
> lib.sub_nav.1 = TMENU
> lib.sub_nav.1{
>         NO = 1
>         NO.wrapItemAndSub = <li id="top"> | </li> |*| <li> | </li> |*| <li id="bottom"> | </li>
>
>         ACT = 1
>            ACT < .NO
>             ACT.ATagParams = id="sub_current"
> }
>
> Is there anyway to erase the empty <ul>?



Well, it's difficult to say, since the code you've posted does not
include the ul...

However, if you get rid of it from wherever it is now, you can just
add this to your TS--it will not display if the menu is empty:

lib.sub_nav.1 = TMENU.wrap = <ul>|</ul>



-- 
Christopher Torgalson
http://www.typo3apprentice.com/


More information about the TYPO3-english mailing list