Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
TYPO3, TypoScript: navigation using 'Foundation' classes. In the register we calculate which column class the div should get. (@see http://lists.typo3.org/pipermail/typo3-english/2010-December/072420.html)
lib.navigation.secondary = HMENU
lib.navigation.secondary {
entryLevel = 1
stdWrap.dataWrap = <div class="row large-10 small-centered large-centered columns">|</div>
1 = TMENU
1 {
NO {
before.cObject = LOAD_REGISTER
before.cObject {
menuItems.cObject = TEXT
menuItems.cObject {
current = 1
setCurrent.data = register:count_menuItems
setCurrent.wrap = 12/|
prioriCalc = intval
}
}
allWrap = <div class="large-{register:menuItems} small-12 columns first">|</div> |*| <div class="large-{register:menuItems} small-12 columns">|</div> |*| <div class="large-{register:menuItems} small-12 columns last">|</div>
allWrap.insertData = 1
stdWrap.cObject = COA
stdWrap.cObject {
# getting the navigation title with fallback to the title
10 = TEXT
10.field = nav_title // title
10.wrap = <h4>|</h4>
# getting the subtitle of the page
20 = TEXT
20.field = subtitle
20.wrap = <p>|</p>
}
}
ACT < .NO
ACT = 1
ACT {
allWrap = <div class="large-{register:menuItems} small-12 columns first active">|</div> |*| <div class="large-{register:menuItems} small-12 columns active">|</div> |*| <div class="large-{register:menuItems} small-12 columns last active">|</div>
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.