Hi All,

First i am converting php site to Drupal and i face a problem in the menu that the old menu of the php site is Spry menu and i dunno how to integrate it with Drupal menu system to be managed from the admin panel here is a link for the Navigation that i want to integrate it with drupal menu system
http://www.we-bis.info/Sprynav/

I Have checked Spry Framework for drupal and it is for Drupal 5.x and am using drupal 6 so i can't use it is there anyway to integrate this menu in my drupal site.

Need Help Urgent.

Thanks & Regards,
Jonathan Hindi.

Comments

jarek foksa’s picture

I don't know much about Spry Framework, but the navigation from your link looks like standard drop-down menu. You can easily recreate it in Drupal:

template.php:

function yourthemename_preprocess_page(&$vars, $hook) {
  // Add $navigation variable for printing drop-down menus
  if ($vars['primary_links']) {
    $pid = variable_get('menu_primary_links_source', 'primary-links');
    $tree = menu_tree($pid);
    $vars['navigation'] = $tree;
  } else {
    $vars['navigation'] = FALSE;
  }

page.tpl.php

  <?php if ($navigation): ?>
      <div id="navigation">
        <?php print $navigation; ?>
      </div> <!-- /#navigation -->
  <?php endif; ?>

Of course you will have to tweak stylesheets a bit, also make sure that you toggle "Show as expanded" option in menu settings.

JonathanHindi’s picture

Thanks for your reply but when i added those lines to template.php and change yourthemename with mine the site stop working and after i removed them again from template.php the site work well between this step i tried to clear the cached data from Home › Administer › Site configuration › Performance
and also it is not working.

Please i need to convert this menu to work well with drupal with the same style and design.

Thanks Please If you can help me tell me.

jarek foksa’s picture

I really have no idea why it doesn't work for you, I was using this snippet successfully in several themes.

But there is alternative solution: create custom "navigation" region and place menu block in it. This will give you almost the same markup.

JonathanHindi’s picture

Yes But it can't be managed by drupal admin it will be just a code when i want to change the menu items i have to edit the code and this is not good for me and the admins with me.

jarek foksa’s picture

Primary links block is rendering menu that you can manage under /admin/build/menu-customize/primary-links, Secondary links block is rendering menu from /admin/build/menu-customize/secondary-links.