[TYPO3] Unable to get the correct register: value!
Surer Dink
surerlistmail at gmail.com
Sat Feb 25 21:55:53 CET 2006
Peter,
Thank you for trying to help. I have moved the lib.menus.35 to
page.headerData.10 , however the header continues to show ERROR:
divide by zero instead of the correct value. Do you have any other
suggestions for me to try? What mechanisms exist of debugging such
problems?
(what I am trying to do - I have a menu styled as horizontal tabs, I
want to resize them depending on the number of tabs present to take up
100% of the design's width, so if there are 2 tabs, each would be 50%
wide, if there are 4, 25%, and so on)
On 2/25/06, Peter Klein <peter at umloud.dk> wrote:
> Hi Surer. Im not quite sure I know what it is you want to do, but I shuffled
> your code areound a bit, in order to get it to create the CSS header stuff
> you need..
> Here's the updated code:
>
> -- cut --
> temp.amenu = TMENU
> temp.amenu {
> noBlur = 1
> NO {
> allWrap = <li>|</li>
> stdWrap.htmlSpecialChars = 1
> ATagParams = class="lb" |*| class="im"
> }
> ACT < .NO
> ACT=1
> ACT.ATagParams = class="lb active" |*| class="im active"
> }
> }
> }
>
> lib.menus = COA
> lib.menus {
> 10 = HMENU
> 10 {
> entryLevel = 1
> 1 < temp.amenu
> 1.wrap = <ul id="nav">|</ul>
> }
> 20 = LOAD_REGISTER
> 20.myCounter.data = register:count_menuItems
>
> 30 = HMENU
> 30 {
> entryLevel = 2
> 1 < temp.amenu
> 1.wrap = <ul id="tree">|</ul>
> 2 < temp.amenu
> 2.wrap = <ul>|</ul>
> }
> }
>
> # Default PAGE object:
> page = PAGE
> page.10 < lib.menus
> page.headerData.10 = TEXT
> page.headerData.10 {
> cObject = TEXT
> cObject.dataWrap = 100/{register:myCounter}
> prioriCalc = 1
> wrap = <style type="text/css">/*<![CDATA[*/ ul#nav li { width: |
> %; }/*]]>*/</style>
> }
> -- cut --
>
> "Surer Dink" <surerlistmail at gmail.com> wrote in message
> news:mailman.4380.1140894231.3122.typo3-english at lists.netfielders.de...
> Peter,
> Per your recommendation, I have made the following changes (please
> confirm this is all I should have done):
> 1) made an extra object under lib = COA
> 2) changed string names of nav, tree, and friends to integers
> 3) added LOAD_REGISTER intermediate
>
> My code now looks like this:
>
> lib.menus = COA
> lib.menus {
> 10 = HMENU
> 10 {
> entryLevel = 1
> 1 < temp.amenu
> 1.wrap = <ul id="nav">|</ul>
> }
> 20 = LOAD_REGISTER
> 20.myCounter.data = register:count_menuItems
> 35 = TEXT
> 35 {
> cObject = TEXT
> cObject.dataWrap = 100/{register:myCounter}
> prioriCalc = 1
> wrap = <style type="text/css">/*<![CDATA[*/ ul#nav li { width: |
> %; }/*]]>*/</style>
> }
> 30 = HMENU
> 30 {
> entryLevel = 2
> 1 < temp.amenu
> 1.wrap = <ul id="tree">|</ul>
> 2 < temp.amenu
> 2.wrap = <ul>|</ul>
> }
> }
> ...
> page.headerData.1 < lib.menus.35
>
> As a result, the page header now contains:
>
> <style type="text/css">/*<![CDATA[*/ ul#nav li { width:ERROR: dividing
> by zero%; }/*]]>*/</style>
>
> Please advise.
>
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
More information about the TYPO3-english
mailing list