Learn about the top 2016 CMS trends. Read on.

Michael is Axelerant’s Chief Operating Officer, but wasn’t always such. He’s also been a serial entrepreneur that’s often found sharing his experiences.

This TypoScript menu sample is a little different than most. Instead of a showing a menu that list pages, this menu shows your end user Next page, Previous page and Up a level links.

Like most TypoScript menu objects, put this code into your TypoScript template setup section and apply it to your template by calling lib.internalnav.

lib.internalnav = HMENU
lib.internalnav {
	special = browse
	special {
		items = up|prev|next
		items.prevnextToSection = 1
		up.fields.title = Up a level
		prev.fields.title = Previous page
		next.fields.title = Next page
	1 = TMENU
	1.NO {
		linkWrap = | | |*||*||
		stdWrap.htmlSpecialChars = 1

# Change link labels between "section" and "pages" for the top level pages
[treeLevel = 1]
	lib.internalnav.special {
		prev.fields.title = Previous section
		next.fields.title = Next section


Still stuck? Write us.

  • fredy

    thank you for the example. Could you make that with buttons instead of the texts. For example: a button for the previous and a button for the next pages etc. ???

    • Fredy, You’re welcome for the previous/next navigation TypoScript example. Have you thought to style the text as a button via CSS instead? The problem with using buttons is that you’ll need to introduce a form. While not a major issue, it does seem overkill. Ciao!

  • darkstar1

    Hey I am trying to implement this so that it creates a browse menu for parent and subpages instead of pages in the same tree. And would like to use arrow images for the prev and next page(s). So I want to end up with a menu like:
    where are previous and next pages respectively and 2 is the current page. How do I set this up because I can’t think of a way to set up auto numbering.

    • Thank you for writing. I’m not quite getting what kind of navigation structure you’re wanting. Can you please provide a sample sitemap and nav menu demonstrating what you’re trying to accomplish?

  • Luis

    Nice code Michael. Of course good results depend on the tree structure.
    It works for me I only used Subparts cause it its easier to implement.

    subparts.PREVNEXT = HMENU
    subparts.PREVNEXT {


    subparts.PREVNEXT.special {

    Thanks a lot.

    • Michael Cannon

      Thank you Luis for the comment and your solution. What’s the full code to your solution? Or is template calling `subparts.PREVNEXT`, hence your naming such?