[TYPO3] Empty <ul> caused invalid XHTML

Christopher Torgalson bedlamhotel at gmail.com
Tue Feb 5 09:07:40 CET 2008


On Feb 5, 2008 8:55 AM, Christopher Torgalson <bedlamhotel at gmail.com> wrote:
> 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>


I shouldn't answer mailing list posts without having had coffee--as
Mauro has pointed out also in this thread, the code should be:

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

...and not the (insane!) code I posted above :-)

<makes coffee>


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


More information about the TYPO3-english mailing list