[TYPO3] Problems positioning the Tmenu

Jaume Presas jaume at dascabinet.com
Sat Apr 15 12:51:13 CEST 2006


Axel Jindra wrote:
> Hi,
>> Note the <div id="mymainDiv">. If I use:
>> page.bodyTag = <body><div id="mydiv">
>> in the setup of this template, what I get is:
>> -------------------
>> <body><div id="mymainDiv" onload="T3_onloadWrapper();"><div 
>> id="Menu6f55831" style="z-index:9999; z-index: 9999; position: absolute; 
>> visibility: hidden; border: 1px solid #ff9900; background: #ffffff; 
>> font-weight: bold; padding: 1px;">
>> -------------------
>> Typo3 takes the last > as the end of the body tag, which is obviously 
>> wrong.
> it's not. A bodyTag is a body tag, not a body tag and a div tag.
> You should use a wrap declaration to put the div around your HMENU, your 
> COA or whatever.
> 
> Axel.

I didn't explain myself very well, I didn't mean that Typo3 does it 
wrong. What is wrong is the result that I get, obviously because I'm 
doing it wrong, not Typo3. You are right, to add a div after the bodyTag 
is a poor, and failed, trick.

I don't find the way to wrap the code that Typo3 inserts immediately 
after the body, what I could get is only to wrap each item of the 
diferent menu levels, but not the whole menu. I paste below the TS I'm 
using, maybe it helps (sorry, it's a bit long).

					Jaume

-----------------------------------------------------------------------

page.10 = TEMPLATE
page.10 {
   template = FILE
   template.file = fileadmin/user_upload/templates/cap.html
   workOnSubpart = DOCUMENT_BODY
}

# menu

page.includeLibs.tmenu_layers = media/scripts/tmenu_layers.php

temp.tmenulayers = HMENU
temp.tmenulayers.special = directory
temp.tmenulayers.special.value = 83
temp.tmenulayers {
   1 = TMENU_LAYERS
   1 {
     wrap = <table width="100%"><tr>|</tr></table>
     layerStyle = z-index: 9998; position: absolute; visibility: hidden; 
border: 1px solid #ff9900; background: #ffffff; font-weight: bold; 
padding: 1px;
     hideMenuWhenNotOver = 1
     hideMenuTimer = 250
     expAll = 1
     lockPosition = x
     relativeToParentLayer = 1
     relativeToTriggerItem = 1
     leftOffset = 0
     topOffset = 113
     #relativeToTriggerItem.addWidth = 1
     relativeToTriggerItem.addHeight = 1
     NO = 1
     NO {
       allWrap = <td class="tdmenu">|</td><td class="tdmenuseparador"></td>
     }
   }
   2 = TMENU_LAYERS
   2 {
     wrap = <table border="0" cellpadding="0" cellspacing="0">|</table>
     layerStyle = z-index: 9999; position: absolute; visibility: hidden; 
border: 1px solid #ff9900; background: #ffffff; font-weight: bold; 
padding: 1px;
     useLargestItemX = 1
     hideMenuWhenNotOver = 1
     hideMenuTimer = 250
     lockPosition = y
     expAll = 1
     leftOffset = -5
     topOffset = -1
     relativeToParentLayer = 1
     relativeToTriggerItem = 1
     relativeToTriggerItem.addWidth = 1
     NO {
       allWrap = <tr><td class="opcio_off" 
onmouseover="this.className='opcio_on';" 
onmouseout="this.className='opcio_off';">|</td></tr>
     }
   }
   3 = TMENU_LAYERS
   3 {
     wrap = <table border="0" cellpadding="0" cellspacing="0">|</table>
     layerStyle = z-index: 9999; position: absolute; visibility: hidden; 
border: 1px solid #ff9900; background: #ffffff; font-weight: bold; 
padding: 1px;
     useLargestItemX = 1
     hideMenuWhenNotOver = 1
     hideMenuTimer = 250
     lockPosition = y
     expAll = 1
     leftOffset = -5
     topOffset = -1
     relativeToParentLayer = 1
     relativeToTriggerItem = 1
     relativeToTriggerItem.addWidth = 1
     NO {
       allWrap = <tr><td class="opcio_off" 
onmouseover="this.className='opcio_on';" 
onmouseout="this.className='opcio_off';">|</td></tr>
     }
   }
}

page.10.subparts.MENU < temp.tmenulayers



More information about the TYPO3-english mailing list