Skip to content

Instantly share code, notes, and snippets.

@markhowellsmead
Created May 21, 2014 11:49
Show Gist options
  • Save markhowellsmead/4b6bb6d72370a0b0fcce to your computer and use it in GitHub Desktop.
Save markhowellsmead/4b6bb6d72370a0b0fcce to your computer and use it in GitHub Desktop.
Next/previous navigation using TypoScript in TYPO3
# Next / previous
# Generates links to the previous and next pages in the same level as the current page
# Define the terms for "next page" and "previous page" in the TS constants, or amend
# the following code to use Locallang files.
# 17.12.2013 mhm.li | m@mhm.li
lib.nextprevious = COA
lib.nextprevious {
wrap = <div class="turn">|</div>
# prev
1 = HMENU
1.special = browse
1.special{
items = prev |
prev.fields.title = {$config.terms.previousPage}
}
1.1 = TMENU
1.1.NO {
linkWrap = <span class="prev">|</span>
}
# next
2 < .1
2.special {
items = | next
next.fields.title = {$config.terms.nextPage}
}
2.1.NO {
linkWrap = <span class="next">|</span>
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment