[Typo3] HMENU / TMENU wrap problem
Christopher
bedlamhotel at gmail.com
Fri May 27 21:17:11 CEST 2005
Hi,
On 5/27/05, John Greene <john at grumpet.net> wrote:
> Hello,
>
> I am trying to implement a site with a specific horizontal menu, and I am
> failing to fully understand the HMENU/TMENU concepts. Based on the MBR
> Part 2 exercise, as well as other examples I have found, I have made this:
>
> temp.menu_3 = HMENU
> temp.menu_3.1 = TMENU
> temp.menu_3.1.expAll = 1
> temp.menu_3.1.NO {
> doNotLinkIt = 1
> stdWrap.field = field:uid
> before.data = field:uid
> allWrap = <div id=" | "> | </div>
> after = Menu
> }
> ACT=1
>
> temp.menu_3.2 = TMENU
> temp.menu_3.2.noBlur = 1
> temp.menu_3.2.NO {
> before.wrap = <img
> src="/fileadmin/template/main/images/green_sq_bullet.gif"
> class="menu_bullet" />
> after.wrap = <br />
> }
> ACT=1
>
>
> Which works... sort of. What doesn't work as I expect is:
> allWrap = <div id=" | "> | </div>
<snip>
No, I wouldn't expect that to work. First of all, the wrap is
expecting only a single pipe character ("|"). But in any case the code
above still would not do what you expect (i.e. even if it were
'allWrap = <div>|</div>').
If I read your 'wanted' code right, you'd like to wrap the *entire*
menu, but what you have above will wrap only items in the top menu.
Probably what you want is something like:
temp.menu_3 = HMENU
temp.menu_3.stdWrap.dataWrap = <div id="{field:uid}">|</div>
...which wraps the whole HMENU item. Your code above tries to wrap
only temp.menu_3.1 - which , as mentioned, is only one item of the
menu. If that *was* what you wanted to do, you'll need to alter your
code to read something like:
temp.menu_3.1.wrap.dataWrap = <div id="{field:uid}">|</div>
...though this would, or course be invalid CSS (multiple ids not
allowed). The 'allWrap' property you used is a property of TMENUITEM
[1], so it you can't simply move it up to temp.menu_3.1 or temp.menu_3
to fix the problem
See http://typo3.org/documentation/document-library/doc_core_tsref/stdWrap/
and http://typo3.org/documentation/document-library/doc_core_tsref/Datatype_reference/
for more stdWrap and datatype fun :)
-Christopher
More information about the TYPO3-english
mailing list