Last active
January 2, 2016 15:19
-
-
Save paulrohrbeck/8322797 to your computer and use it in GitHub Desktop.
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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