[support] Menu question

sander-martijn sander at sander-martijn.com
Fri Aug 17 16:05:08 UTC 2007


one more note - the navigation i'm working on at the moment will not 
change for the site (and i'm not worried about reusability at the 
moment), so i'm perfectly fine with putting in a series of calls such as 
this if it works (purposely not written in code):
* give me menu from node 2 and children
* give me menu from node 5 and children

etc.  totally unreusable but will work for this case and when I have 
more time to get a deeper understanding of how all this is working i'd 
learn to do it right. 
so whether i can get a nested array of the primary links and their 
children as i was trying to get below or simply get a series of arrays 
of the children of photo gallery, the children of floor plans etc 
doesn't matter to me at the moment - i can work with either.



sander-martijn wrote:
> yeah, tried that too but i'm still not understanding something.  No 
> matter what I put in that (tried a variety of options in case i was 
> misunderstanding what the args do) I either get just the top level or I 
> get nothing:
>
>
> menu_primary_links()
> Array
> (
>     [menu-1-1-2] => Array
>         (
>             [title] => Photo Gallery
>             [href] => node/2
>             [attributes] => Array
>                 (
>                 )
>
>         )
>
>     [menu-1-2-2] => Array
>         (
>             [title] => Floor Plans
>             [href] => node/5
>             [attributes] => Array
>                 (
>                 )
>
>         )
>
> )
> menu_primary_links(1)
> Array
> (
>     [menu-1-1-2] => Array
>         (
>             [title] => Photo Gallery
>             [href] => node/2
>             [attributes] => Array
>                 (
>                 )
>
>         )
>
>     [menu-1-2-2] => Array
>         (
>             [title] => Floor Plans
>             [href] => node/5
>             [attributes] => Array
>                 (
>                 )
>
>         )
>
> )
> menu_primary_links(2)
> menu_primary_links(1,2)
> Array
> (
>     [menu-1-1-2] => Array
>         (
>             [title] => Photo Gallery
>             [href] => node/2
>             [attributes] => Array
>                 (
>                 )
>
>         )
>
>     [menu-1-2-2] => Array
>         (
>             [title] => Floor Plans
>             [href] => node/5
>             [attributes] => Array
>                 (
>                 )
>
>         )
>
> )
> menu_primary_links(2,1)
> Array
> (
> )
>
>
>
> Eric Mckenna wrote:
>   
>> Heh.. sorry about that.  I didn't read you email close enough.  One 
>> thing that might help is that you can use menu_primary_links() , 
>> http://api.drupal.org/api/function/menu_primary_links/5,
>> to get the children.
>>
>>   
>>     
> trimming thread, it's getting long
>   

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

sander-martijn <mailto:sander at sander-martijn.com>
interface developer | architect
sander at sander-martijn.com <mailto:sander at sander-martijn.com>
www.sander-martijn.com <http://www.sander-martijn.com>

------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20070817/dccfeb28/attachment.htm 


More information about the support mailing list