[Typo3] Problem with menus

CJackson at firstambank.com CJackson at firstambank.com
Fri Aug 5 16:37:13 CEST 2005





Ok, my production server is 3.5 and that's where I've been having problems
getting this to work. I upgraded a test server I have to 3.8 to see if that
made a difference, which it did. Now the first level of the menu works
properly (i.e. links to the OVERRIDE_HREF in the array) but none of the
submenus show.

If I have to upgrade to 3.8 to get this to work right, I will, but I want
the whole thing to work before I do that.

What's stranger is that I use a slightly different graphic to show when a
menu has a submenu, and the menu that displays on the page uses that
graphic. So it's like it knows there's a submenu, but refuses to display
it.

Is there something wrong with the syntax of my script? I pulled it directly
from the TSRef page, but maybe there's a typo or something? Anybody else
ever work with userdefined menus/submenus?

Thanks,

Charlie Jackson



                                                                           
             CJackson at firstamb                                             
             ank.com                                                       
             Sent by:                                                   To 
             typo3-english-bou         typo3-english at lists.netfielders.de  
             nces at lists.netfie                                          cc 
             lders.de                                                      
                                                                   Subject 
                                       [Typo3] Problem with menus          
             08/04/2005 09:31                                              
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
               TYPO3 English                                               
             <typo3-english at li                                             
             sts.netfielders.d                                             
                    e>                                                     
                                                                           
                                                                           








I'm trying to create a userdefined menu for a page I'm working on, but I
can't seem to get it to work right. I've looked at the TSRef for HMENUs,
and it looks like I'm doing everything right, but the menu just doesn't
display properly.

Here's the TS I put in my template:
includeLibs.user_menu = fileadmin/user_menu_test.php

page.10 {
   subparts.MENU.special = userfunction
   subparts.MENU.special.userFunc = user_menu_test->makeMenuTest
   ...

And the code for the function:
    function makeMenuTest($content, $conf) {
        return array(
             array(
                 'title' => 'Contact',
                 '_OVERRIDE_HREF' => 'index.php?id=10',
                 '_SUB_MENU' => array(
                     array(
                         'title' => 'Offices',
                         '_OVERRIDE_HREF' => 'index.php?id=11',
                         '_OVERRIDE_TARGET' => '_top',
                         'ITEM_STATE' => 'ACT',
                         '_SUB_MENU' => array(
                             array(
                                 'title' => 'Copenhagen Office',
                                 '_OVERRIDE_HREF' =>
'index.php?id=11&officeId=cph',
                             ),
                             array(
                                 'title' => 'Paris Office',
                                 '_OVERRIDE_HREF' =>
'index.php?id=11&officeId=paris',
                             ),
                             array(
                                 'title' => 'New York Office',
                                 '_OVERRIDE_HREF' =>
'http://www.newyork-office.com',
                                 '_OVERRIDE_TARGET' => '_blank',
                             )
                         )
                     ),
                     array(
                         'title' => 'Form',
                         '_OVERRIDE_HREF' =>
'index.php?id=10&cmd=showform',
                     ),
                     array(
                         'title' => 'Thank you',
                         '_OVERRIDE_HREF' =>
'index.php?id=10&cmd=thankyou',
                     ),
                 ),
             ),
             array(
                 'title' => 'Products',
                 '_OVERRIDE_HREF' => 'index.php?id=14'
             )
         );
    }

When I load the page, two menu items appear: 'Contact' and 'Products'.
However, neither item is actually a link, and the menus won't expand,
either. If I add a uid field to either the 'Contact' or 'Products' array,
that item works correctly. I don't know if it's something with the TS for
my menu system or what. I didn't want to include it right away because
there's a lot of it, but I'll send it if requested.

Thanks,
Charlie Jackson
_______________________________________________
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