Very simple Typo3 navigation

Tagged Typo3

Sometimes I get asked how to build a menu in Typo3. It’s really easy, but TSref isn’t very verbose. So here’s how to build a basic, valid Typo3 navigation:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
foo = HMENU
foo {
	# I use this because I like to have one root page
	# that links to the first content page. All my
	# level 1 Pages are subpages of that page.
	entryLevel = 1
	# define the first level
	1 = TMENU
	1 {
		wrap = <ul>|</ul>
		# Normal Style
		NO = 1
		NO {
			wrapItemAndSub = <li>|</li>
		}
		# Style, if menu page is current page
		CUR = 1
		CUR {
			wrapItemAndSub = <li>|</li>
			ATagParams= class="cur"
		}
	}
	# Define one more level, create a copy of level 1
	2 < .1
	# add as many more levels as you need
	# 3 < .1 etc.
}

Replace foo with whatever marker or position in your TS array you want. If you want to do anything more fancy, you should really read the fine manual.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay

Related posts:

  1. Typo3 and the YAML vertical navigation
  2. Typo3 in 15 minutes
  3. Typo3, mount points and realurl

2 Comments

  • Posted by Oluwaseyi on 28. July 2010 at 14:56.

    Hello Mr Nicolas Kuttler, thanks in advance for being there.
    Please I am a new web developer learning and currently working with TYPO3 to develop a church’s site.
    I have a problem with my page to page links, that is from the frontend; I can not click or link to another page within the same site. Whenever I clicked on any supposed link, it brings me to the actual page but the template will not appear including any image and banner on that page.
    Hope to hear from you soonest.
    Thanks,
    Oluwaseyi.

    • Posted by nicolas on 28. July 2010 at 20:10.

      Hello Oluwaseyi,

      hm, to be honest, I have no idea. It sounds like you didn’t configure your template correctly? It has to be a root template i think. You might have more luck asking on some forum as there are more readers. I’ve never had this problem.
      Good luck!

Leave a Reply

Your email is never shared. Required fields are marked *

*
*