[TYPO3] Menus - at the end of my string!

Matthew Runo matthew at somethingbig.org
Tue Mar 7 22:57:34 CET 2006


Hi everyone,

I've really reached the end of my line working with menus in Typo3. It 
seems that menus are very easy - if you want something simple. What I 
want is simple - I think. I want an automatically generated menu that 
displays all the subpages of a page - and if there are none, it should 
display all the pages at the same level as the page.

I have rigged up a menu which shows all the subpages for the parent of 
the page - except that this does not work when the pages are "secton 
headers". In this case, the menu shows a list of all the sections - and 
not the contents of the current section like it should.

I have also rigged up a menu which shows all the subpages to the current 
page. This works fine, except when there are no subpages - it shows 
nothing then.

Please point me in the right direction to where I can find out how to 
make this menu system work. Here is the code I have now..

page.11 = HMENU
page.11 {
	if {
		value = 1
		equals.field = uid
		negate = 1
		}
	1 = TMENU
	1.NO.linkWrap = <li>|</li>
	1.wrap = <ul id="side-menu">|</ul>

	

}

[treeLevel = 1]
	page.11.entryLevel=1
	page.11.2 = TMENU
	page.11.2.NO.linkWrap = <li>|</li>
[global]
[treeLevel = 2]
	page.11.entryLevel=1
	if {
		value = 7
		equals = field:uid
		negate = 1
		}
	page.11.entryLevel=2
[global]
[treeLevel = 3]
	page.11.entryLevel=2
[global]
[treeLevel = 4]
	page.11.entryLevel=3
[global]
[treeLevel = 5]
	page.11.entryLevel=4
[global]
[treeLevel = 6]
	page.11.entryLevel=5
[global]

It works fine, expect that on level 2 pages with NO subpages nothing is 
printed out. The only level 2 page that should have subpages is 7, so I 
tried to filter for that (as you can see) - it didn't work.

-Matthew



More information about the TYPO3-english mailing list