[TYPO3] HMENU/TMENU problems (not getting rid of some of the HTML coding on first level/where there are no subpages)

Erik Svendsen erik at linnearad.no
Sun Mar 12 23:14:00 CET 2006


Hi list

Hope there are some who have a helping hand.

I have a menu who are using following code in TS

<--- snip --->
lib.subMenu = COA
lib.subMenu {
	10 = HMENU 
	10 {
		entryLevel = 1
		stdWrap.dataWrap = <div id="submenu"><div id="submenutitle">{leveltitle 
: 1}</div>
	}
	20 = HMENU
	20.entryLevel = 1
	20.wrap = <ul id="level1">|</ul></div>		
	20.1 = TMENU
	20.1.NO {
		allWrap = <li>|</li>
		ATagParams = style="background:none;"|*|style=""
	}
	20.1.ACT = 1
	20.1.ACT {
		allWrap = <li class="act">|</li>
		ATagParams = style="background:none;"|*|style=""
	}
}	

<--- cut --->

On pages with subpages I get the following HTML, who gives title of the current 
page and the menu of the subpages.

<div id="submenu"><div id="submenutitle">Kunder</div><ul id="level1"><li><a 
href="index.php?id=23" onfocus="blurLink(this);" style="background:none;">Internasjonale</a></li><li><a 
href="index.php?id=22" onfocus="blurLink(this);" style="">Norske</a></li><li><a 
href="index.php?id=21" onfocus="blurLink(this);" style="">Presseomtale</a></li></ul></div>

On the homepage or pages without subpages I get following output.

<div id="submenu"><div id="submenutitle">TESTside</div><ul id="level1"></ul></div>

On the homepage and pages without subpages i want no output at all. Because 
some CSS design are connected to div#submenu and div#submenutitle, and don't 
want this where I don't have a submenu.

I suppose I have to use some if function, maybe isTrue.numRows to check for 
subpage, but I haven't any clue how I should use it to have it work on the 
whole submenu. The home page is more easy, because I can use a different 
template for the root (homepage) without any mapping to submenu. But maybe 
there is another solution.

I have read in the list, searced and read in TSref, but I haven't found any 
solution.

WBR,
Erik Svendsen
www.linnearad.no





More information about the TYPO3-english mailing list