[TYPO3-english] HMENU typoscript ACTIFSUB renders an empty li in one rootline

Man Math man at web-essentials.asia
Thu Sep 20 03:26:26 CEST 2012


Hi,

I used to work with this. You can try:

lib.menu = HMENU
lib.menu {
	wrap = <div class="navigationWrap"><nav><ul 
id="menuMain">|</ul></nav></div>
	entryLevel = 0

	1 = TMENU
	1 {
		noBlur = 1
		expAll = 1

		NO {
			wrapItemAndSub = <li class="normal">|</li>
			stdWrap.htmlSpecialChars = 1
			accessKey = 1
			ATagTitle.field = nav_title // title
		}

		IFSUB < .NO
		IFSUB = 1
		IFSUB {
			wrapItemAndSub = <li class="sub">|</li>
		}

		ACTIFSUB < .IFSUB
		ACTIFSUB {
			wrapItemAndSub = <li class="active sub">|</li>
		}

		ACT < .NO
		ACT = 1
		ACT {
			wrapItemAndSub = <li class="active">|</li>
		}
		
		CURIFSUB < .IFSUB
		CURIFSUB = 1
		CURIFSUB {
			wrapItemAndSub = <li class="current sub">|</li>
		}

	}

	2 < .1
	2.wrap = <div class="subNav"><ul>|</ul></div>
}

On 09/20/2012 01:36 AM, Domi wrote:
> Hello,
>
> I am stuck with a weird menu rendering problem in TYPO3 4.7.4.
>
> The ACTIFSUB renders an empty <li></li> in the rootline of subpages with
> directory = 9. In all other subpages it works as expected.
>
> How can I track down what happens here? This is the menu:
>
> menu.mainNavigation = COA
> menu.mainNavigation.wrap = <div class="navigationWrap"><nav>|</nav></div>
> menu.mainNavigation.10 = HMENU
> menu.mainNavigation.10 {
>    entryLevel = 0
>    wrap  = <ul id="menuMain">|</ul>
>    1 = TMENU
>    1 {
>      expAll = 0
>      noBlur = 1
>
>      NO = 1
>      NO.allWrap = <li class="normal">|</li>
>
>      ACT < .NO
>      ACT.allWrap =  <li class="active">|</li>
>
>      IFSUB < .NO
>      IFSUB.allWrap = <li class="sub">|</li>
>
>      ACTIFSUB < .NO
>      ACTIFSUB.allWrap = <li class="active sub">|<li>
>
>      CUR < .NO
>      CUR.allWrap = <li class="current">|</li>
>
>      CURIFSUB < .NO
>      CURIFSUB.allWrap = <li class="current sub">|</li>
>
>    }
> }
>
> menu.mainNavigation.20 = COA
> menu.mainNavigation.20.wrap = <div class="subNav">|</div>
> menu.mainNavigation.20.10 = HMENU
> menu.mainNavigation.20.10 {
>    special = directory
>    special.value = 9
>    wrap = <ul>|</ul>
>    1 = TMENU
>    1 {
>      expAll = 0
>      noBlur = 1
>      NO = 1
>      NO {
>        linkWrap = <li>|</li>
>      }
>    }
> }
> menu.mainNavigation.20.20 < menu.mainNavigation.20.10
> menu.mainNavigation.20.20.special.value = 10
> menu.mainNavigation.20.30 < menu.mainNavigation.20.10
> menu.mainNavigation.20.30.special.value = 11
>
>
> Here the output:
> <ul id="menuMain">
> <li class="active sub"><a href="index.php?id=9">Link 1</a></li>
> <li></li>
> <li class="sub"><a href="index.php?id=10">Link 2</a></li>
> <li class="sub"><a href="index.php?id=11">ZLink 3</a></li>
> <li class="normal"><a href="index.php?id=15">Link 4</a></li>
> <li class="normal"><a href="index.php?id=16">Link 5</a></li>
> <li class="normal"><a href="index.php?id=1">Link 6</a></li>
> </ul>
>
> Thanks for any hint,
>
> Cheers,
>
> Dominic
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

-- 
Web Essentials
Redefining Web Development

Man Math
Web Developer Intern

T: +855 23 996 604
M: +855 97 847 0 847
E: man at web-essentials.asia
W: www.web-essentials.asia/man/


More information about the TYPO3-english mailing list