[TYPO3] Unable to get the correct register: value!
Surer Dink
surerlistmail at gmail.com
Sat Feb 25 08:46:59 CET 2006
All,
For about 2 days I've been trying to figure out how to get a register
value into PAGE.headerData - to no avail. The problem is that there are
multiple menus on the page, and I want to get the count_menuItems from a
particular one. Everything I have tried with LOAD_REGISTER has failed. The
code bellow works - however retrieves the incorrect menu's count (I want to
get the count for nav.1, it appears to get the count for tree.1 - I have no
idea why) [if there is a better way to do what I am trying, by all means
please enlighten me] Thank you.
temp {
amenu = TMENU
amenu {
noBlur = 1
ACT=1
NO {
allWrap = <li>|</li>
stdWrap.htmlSpecialChars = 1
ATagParams = class="lb" |*| class="im"
}
ACT {
wrapItemAndSub = <li>|</li>
stdWrap.htmlSpecialChars = 1
ATagParams = class="lb active" |*| class="im active"
}
}
}
lib {
nav = HMENU
nav {
entryLevel = 1
1 < temp.amenu
1.wrap = <ul id="nav">|</ul>
}
nav_width = TEXT
nav_width {
cObject = TEXT
cObject.dataWrap = 100/{register:count_menuItems}
prioriCalc = 1
wrap = <style type="text/css">/*<![CDATA[*/ ul#nav li { width: | %;
}/*]]>*/</style>
}
tree = HMENU
tree {
entryLevel = 2
1 < temp.amenu
1.wrap = <ul id="tree">|</ul>
2 < temp.amenu
2.wrap = <ul>|</ul>
}
}
page = PAGE
page.headerData.1 < lib.nav_width
page.10 = USER
page.10.userFunc = tx_templavoila_pi1->main_page
More information about the TYPO3-english
mailing list