Does anyone know of a way to directly print the menu tree of a custom menu? I thought there would be a simple function to accomplish this but for some reason I can't seem to get it. Searching the web reveals several other people asking the same question, or answers to do something similar (like printing $primary_links or just the first level links of a custom menu.)
Any thoughts? This should be easy, right?
- John
************************************************** John Callahan Geospatial Application Developer Delaware Geological Survey, University of Delaware 227 Academy St, Newark DE 19716-7501 Tel: (302) 831-3584 Email: john.callahan@udel.edu http://www.dgs.udel.edu **************************************************
Did you already try menu_load ( http://api.drupal.org/api/function/menu_load/6) and menu_tree ( http://api.drupal.org/api/function/menu_tree/6)?
On Tue, Mar 10, 2009 at 1:49 PM, John Callahan john.callahan@udel.eduwrote:
Does anyone know of a way to directly print the menu tree of a custom menu? I thought there would be a simple function to accomplish this but for some reason I can't seem to get it. Searching the web reveals several other people asking the same question, or answers to do something similar (like printing $primary_links or just the first level links of a custom menu.)
Any thoughts? This should be easy, right?
- John
John Callahan Geospatial Application Developer Delaware Geological Survey, University of Delaware 227 Academy St, Newark DE 19716-7501 Tel: (302) 831-3584 Email: john.callahan@udel.edu http://www.dgs.udel.edu
-- [ Drupal support list | http://lists.drupal.org/ ]
Well, menu_tree did the trick this time. Thanks. Can't get much easier than that. That was one of the methods I tried yesterday. Fresh eyes and a new day always seem to help. :-)
- John
William Smith wrote:
Did you already try menu_load (http://api.drupal.org/api/function/menu_load/6) and menu_tree (http://api.drupal.org/api/function/menu_tree/6)?
On Tue, Mar 10, 2009 at 1:49 PM, John Callahan <john.callahan@udel.edu mailto:john.callahan@udel.edu> wrote:
Does anyone know of a way to directly print the menu tree of a custom menu? I thought there would be a simple function to accomplish this but for some reason I can't seem to get it. Searching the web reveals several other people asking the same question, or answers to do something similar (like printing $primary_links or just the first level links of a custom menu.) Any thoughts? This should be easy, right? - John ************************************************** John Callahan Geospatial Application Developer Delaware Geological Survey, University of Delaware 227 Academy St, Newark DE 19716-7501 Tel: (302) 831-3584 Email: john.callahan@udel.edu <mailto:john.callahan@udel.edu> http://www.dgs.udel.edu ************************************************** -- [ Drupal support list | http://lists.drupal.org/ ]
Do you mean a full tree, something like this:
http://drupal.org/project/menutree
On Tuesday 10 March 2009 1:49:30 pm John Callahan wrote:
Does anyone know of a way to directly print the menu tree of a custom menu? I thought there would be a simple function to accomplish this but for some reason I can't seem to get it. Searching the web reveals several other people asking the same question, or answers to do something similar (like printing $primary_links or just the first level links of a custom menu.)
Any thoughts? This should be easy, right?
- John
Yes, but I needed to do it programmatically to include in my template.php and tpl files. Thanks.
- John
Larry Garfield wrote:
Do you mean a full tree, something like this:
http://drupal.org/project/menutree
On Tuesday 10 March 2009 1:49:30 pm John Callahan wrote:
Does anyone know of a way to directly print the menu tree of a custom menu? I thought there would be a simple function to accomplish this but for some reason I can't seem to get it. Searching the web reveals several other people asking the same question, or answers to do something similar (like printing $primary_links or just the first level links of a custom menu.)
Any thoughts? This should be easy, right?
- John