Jump to content
ccbangler

Change top level of superfish horizontal menu

Recommended Posts

I'm trying to edit the superfish horizontal menu so that the top level are:

Products | some link | some other link | etc

 

I just want the Products to be filled with categories.

 

I just cant get the menu to write out properly to work with the menu, and I know I can't be the first one to want to use it this way! I tried searching with no luck in the forums.

 

Any help would be great thanks!

Share this post


Link to post
Share on other sites

There is a Superfish menu in the Header Footer Contents Addon. I also have some modules for that addon that do the same thing. I'll give you the modules if you want to go that route. Either way should give you a working horizontal menu.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

I assume you are using this contribution: http://addons.oscommerce.com/info/7541

 

if so find this:

// Close off nested lists
   for ($nest = 0; $nest <= $GLOBALS['this_level']; $nest++) {
    $output .= '</ul>'; 
 }

 

change to this:

// Close off nested lists
   for ($nest = 1; $nest <= $GLOBALS['this_level']; $nest++) {

    //close subcategory
    $output .= '</ul></li>';

    //extra links
    $output .='	 
	  <li><a href=" '.tep_href_link('reviews.php', '', 'NONSSL').'" >Reviews</a></li>
	  <li><a href=" '.tep_href_link('articles.php/acne-t-2', '', 'NONSSL').'" >Learn More</a></li>
	  <li><a href=" '.tep_href_link('faq.php', '', 'NONSSL').'" >Faqs</a></li>	 
	  ';

    // close list
    $output .='</ul>'; 
 }

 

you can see this example live at www dot niora dot com


Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Share this post


Link to post
Share on other sites

That worked, I could of sworn I tried that previously because I think it was in another post and it didn't work!

 

Thanks, much appreciated!

Share this post


Link to post
Share on other sites

Thank you, this helped a lot, I would never have caught you have to change to $nest = 1 instead of $nest = 0

 

Slight change I had to make adding the class name to make it display the same as the others and not off to the side

 

    for ($nest = 1; $nest <= $GLOBALS['this_level']; $nest++) {
 
//if you need extra links uncomment out the lines below
$output .= '</ul></li>';
$output .=' 
<li class="current_0"><a href="products_new.php" class="current sf-with-ul">NEW</a></li>
<li class="current_0"><a href="specials.php" class="current sf-with-ul">Sale</a></li>
';
 
        $output .= '</ul>';
Edited by homewetbar

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×