How to add custom class to sub menu item in Show_menu(0

sajiddesigner

Quote from: DarkViper on December 31, 2013, 06:15:37 PM

change your show_menu() into show_menu2() please. There are lot more possibilities available. See README.en.txt in the module.

Thanks for your reply. i tried using show_menu2 but it is not working fine.
i am using
  <?php show_menu2(   
   1,
   SM2_ROOT,
   SM2_ALL,
   SM2_ALL,
   '<li class="dropdown"><a href="[url]" class="[class] dropdown-toggle group.$menucount" data-toggle="dropdown">[menu_title]',
   "</li>",
   '<ul class="dropdown-menu">',
   "</ul>",
   true,
   '<ul id="header_menu" class="nav navbar-nav floatright">'
);
?>

and displays following in front end

    <ul id="header_menu" class="nav navbar-nav floatright"><li class="dropdown"><a href="http://localhost:8080/hosting/" class="menu-current menu-first dropdown-toggle group.$menucount" data-toggle="dropdown">Home</a></li>
      <li class="dropdown"><a href="http://localhost:8080/hosting/web-hosting.php" class="menu-expand menu-sibling dropdown-toggle group.$menucount" data-toggle="dropdown">TOP</a>
          <ul class="dropdown-menu"><a href="http://localhost:8080/hosting/web-hosting.php" class="menu-expand menu-sibling dropdown-toggle group.$menucount" data-toggle="dropdown"></a>
        <li class="dropdown"><a href="http://localhost:8080/hosting/web-hosting.php" class="menu-expand menu-sibling dropdown-toggle group.$menucount" data-toggle="dropdown"></a><a href="http://localhost:8080/hosting/web-hosting/shared-linux-hosting.php" class="menu-first dropdown-toggle group.$menucount" data-toggle="dropdown">Sub menu1</a></li>
          <li class="dropdown"><a href="http://localhost:8080/hosting/web-hosting/linux-reseller-hosting.php" class=" dropdown-toggle group.$menucount" data-toggle="dropdown">Sub Menu 2</a></li>
          <li class="dropdown"><a href="http://localhost:8080/hosting/web-hosting/windows-hosting.php" class=" dropdown-toggle group.$menucount" data-toggle="dropdown">Sub Menu </a></li></ul></li><li class="dropdown"><a href="http://localhost:8080/hosting/contact.php" class="menu-sibling dropdown-toggle group.$menucount" data-toggle="dropdown">Contact</a></li></ul>

where as i want to show     <ul id="header_menu" class="nav navbar-nav floatright"><li class="dropdown"><a href="http://localhost:8080/hosting/">Home</a></li>
      <li class="dropdown"><a href="http://localhost:8080/hosting/web-hosting.php" class="menu-expand menu-sibling dropdown-toggle" data-toggle="dropdown">TOP</a>
          <ul class="dropdown-menu">
        <li class="dropdown"><a href="http://localhost:8080/hosting/web-hosting.php" class="menu-expand menu-sibling dropdown-toggle" data-toggle="dropdown"></a><a href="http://localhost:8080/hosting/web-hosting/shared-linux-hosting.php">Sub menu1</a></li>
          <li class="dropdown"><a href="http://localhost:8080/hosting/web-hosting/linux-reseller-hosting.php">Sub Menu 2</a></li>
          <li class="dropdown"><a href="http://localhost:8080/hosting/web-hosting/windows-hosting.php">Sub Menu </a></li></ul></li><li class="dropdown"><a href="http://localhost:8080/hosting/contact.php">Contact</a></li></ul>

i dont want to show class="menu-expand menu-sibling dropdown-toggle" data-toggle="dropdown" with sub/child itesm. i just want to show it with Parent items
Sajid M.
www.sajiddesigner.com | [url="//www.optimumcreative.com"]www.optimumcreative.com[/url]

DarkViper

Quote from: sajiddesigner on December 31, 2013, 05:22:40 PM
hello
i want to add class to Sub menu UL in show_menu(); i am using

<?php show_menu(1,0,-1,false,'<li>[a][menu_title] [/a]','</li>','<ul class="nav navbar-nav floatright">','</ul>',' class="menu_default"',' class="active"',0); ?>

change your show_menu() into show_menu2() please. There are lot more possibilities available. See README.en.txt in the module.
[url=http://www.youtube.com/watch?v=tmzDAz6ZvFQ]Der blaue Planet[/url] - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen[br]
[i]"You have to take the men as they are... but you can not leave them like that !" :-P [/i]
[i]Das tägliche Stoßgebet: [b]Oh Herr, wirf Hirn vom Himmel ![/b][/i]

sajiddesigner

hello
i want to add class to Sub menu UL in show_menu(); i am using

<?php show_menu(1,0,-1,false,'<li>[a][menu_title] [/a]','</li>','<ul class="nav navbar-nav floatright">','</ul>',' class="menu_default"',' class="active"',0); ?>


and it shows following HTML at front end

<ul class="nav navbar-nav floatright">
<li><a href="http://localhost:8080/hosting" target="_top" class="active">Home </a>
</li>
<li><a href="http://localhost:8080/hosting/web-hosting.php" target="_top" class="menu_default">Parent item</a>
<ul class="nav navbar-nav floatright">
<li><a href="http://localhost:8080/hosting/web-hosting/shared-linux-hosting.php" target="_top" class="menu_default">Sub item 1</a>
</li>
<li><a href="http://localhost:8080/hosting/web-hosting/linux-reseller-hosting.php" target="_top" class="menu_default">Sub item 2 </a>
</li>
</ul>
</li>
<li><a href="http://localhost:8080/hosting/contact.php" target="_top" class="menu_default">Contact </a>
</li>
</ul>

i want to show it like

<ul class="nav navbar-nav floatright">
<li><a href="http://localhost:8080/hosting" target="_top" class="active">Home </a>
</li>
<li><a href="http://localhost:8080/hosting/web-hosting.php" target="_top" class="menu_default">Parent item</a>
<ul class="SUB_MENU_CLASS_HERE">
<li><a href="http://localhost:8080/hosting/web-hosting/shared-linux-hosting.php" target="_top" class="menu_default">Sub item 1</a>
</li>
<li><a href="http://localhost:8080/hosting/web-hosting/linux-reseller-hosting.php" target="_top" class="menu_default">Sub item 2 </a>
</li>
</ul>
</li>
<li><a href="http://localhost:8080/hosting/contact.php" target="_top" class="menu_default">Contact </a>
</li>
</ul>
Sajid M.
www.sajiddesigner.com | [url="//www.optimumcreative.com"]www.optimumcreative.com[/url]