Hi
I want to render my custom menu called sponsors in page.tpl.php. It has to be inline (class is propably: inline-list)
I tried everything but I couldn't get menu to be rendered in page.tpl.php.(array indexes and other stuff is in wrong format or structure)
I tried searching for menu api and looking into menu functions in theme but nothing worked like supposed to.
What function I need to use to get a correct array of menu/items that can be given to bootstrap theme to render?
It can't be that hard? bootstrap-links.func.php has
function theme_bootstrap_links($variables) {...}
which is supposed to render $variables array (make it into HTML)
Is there a function that can provide array/$variables for this function?
Since none of the menu api's functions didn't work.
Some got almost correct structure and naming in array but only almost.
Am I supposed to manually manipulate some array?
Comments
Comment #2
markhalliwellMenus in Drupal can be very tricky indeed. I would recommend looking at how we are doing it for the "primary" and "secondary" menus:
http://drupal-bootstrap.org/api/bootstrap/templates%21system%21page.vars...
http://drupal-bootstrap.org/api/bootstrap/templates%21menu%21menu-tree.f...
That site is a work in progress, but feel free to browse all the different functions related menus, links and page.tpl.php. That should help clarify a bit.
Comment #3
ETENTION commentedI didn't give up and the most simplest solution was to:
1. add a new theme wrapper function for the menu (yep, I'm not using subtheme)
2. add this in page.tpl.php
print drupal_render(menu_tree_output(menu_tree_all_data('menu-sponsors')));Though, all in all the whole "problem" was only to get a navbar-nav class added to that menu.
And yet, this is quite hardcoded solution... but it works so it is enough for now.
Comment #4
muthuraja143 commentedpage.tpl.php
template.php
it's work for me.
Comment #5
auxiliaryjoel commented@muthuraja143 can you tell me in Drupal 7, if I want to render my main navigation menu, how I could that?
I want to separate the parts of the menu and call them individually so I can wrap classes around the burger menu.