Need Direction on Menu items

I will try to explain what I am trying to accomplish. I want very little, if any, drop down menu off of the Main navigation menu. I hid the page blocks that are listed under the main menu block in the Navigation Menu under Builder by unchecking member and guest. This accomplished the removal of the drop down menus from sys_main_menu, but also removed them off the sys_sub_menu. I still want the sys_sub_menu links. Example: If I click the Group main menu tab, it will take me to the Group Home Page, which will have the page icon with "Groups" as the title next to it in the sub menu. Normally, Group home, Featured, Popular, Recent, Tags, Categories, Search  would be listed horizontal to the title and icon. Any suggestions or directions to have them in the sub_menu but not the main_menu.

Vunderba..... Challenge Yourself to be the Best...... Hosting from Zarconia.net
Quote · 6 Sep 2013

I am not sure I followed what you did.  If you go to the builders and go to Navigation Menu, if you click the top level menu item, and remove both Guest and Members from the view; does that hide the top menu?  You also have the Pink system menu to the right, I thought that was what generated the sub menus.

Geeks, making the world a better place
Quote · 6 Sep 2013

You can do this.

Open templates/base/BxBaseMenu.php

Look for the following code.

$this->sCode .= <<<EOF
<td class="top" {$sActiveStyle} {$sImgTabStyle}>
<a href="{$sLink}" {$sOnclick} {$sTarget} class="top_link"><span class="down" {$sBoldStyle}>{$sPictureRep}{$sText}</span>
<!--[if gte IE 7]><!--></a><!--<![endif]-->
<div style="position:relative;display:block;">{$sMainSubs}</div>
</td>
EOF;


Modify it to add the part i marked in red below.

$this->sCode .= <<<EOF
<td class="top top_item_{$iItemID}" {$sActiveStyle} {$sImgTabStyle}>
<a href="{$sLink}" {$sOnclick} {$sTarget} class="top_link"><span class="down" {$sBoldStyle}>{$sPictureRep}{$sText}</span>
<!--[if gte IE 7]><!--></a><!--<![endif]-->
<div style="position:relative;display:block;">{$sMainSubs}</div>
</td>
EOF;


Now what is does is add an additional CSS selector of top_item_### where ### is the ID of the top level menu item.

To hide a menu item you add css to hide it in your templates top_menu.css file. Like so.

.top_item_4 {
display:none;
}

That will then hide the top level item with the ID of 4.

You need to find ID of the menu item you want to hide which can be looked up in the database in sys_menu_top

This will not work on the last 4 items that may or may not appear on the top menu.

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 6 Sep 2013

If you want to hide the entire menu bar; you can also go into the template and add style="display:none;" to the division that holds the top navigation menu bar.  Result is the whole navigation bar is not shown but the sub menu items will show up in the sub menu block.

Geeks, making the world a better place
Quote · 6 Sep 2013

I will try to explain better. I still want the top navigation menu bar with just the top page item, ex. Group Home just that one link. I have the top page link (Group Home) still checked, so it can be viewed by the guests and members.  I find the drop downs links, Featured Groups, Popular Groups, Recent Groups, Group Tags, Group Calendar, and Search Groups as repetitive and want them removed from the top menu bar. So, I uncheck the guest and member boxes of those drop down links in the main menu, they disappear from the top menu bar. BUT, They also disappeared from the sub menu of the top level page (Group Home Page). I want those links (Featured Group Etc.) to be still available for view on the Groups Home Page on the sys_sub_ menu. 

   The Group Home Page,  has the top main menu bar, then under that is the sub menu bar. The sub menu bar is the one with the Add Group and My Group buttons to far right, to the far left is a icon and Page Title, next to that would be Featured etc. links if I left them checked on the navigation menu.  I still want them to show there on that main page, but not as a drop down on the main menu.

Maybe this will be clearer, I will eventually get the lingo that makes it easier for others to understand. Thanks for your patience.

Vunderba..... Challenge Yourself to be the Best...... Hosting from Zarconia.net
Quote · 6 Sep 2013

What I have provided above will only show top level pages (main pages) and hide sub-pages from main navigation ... BUT if you click the main page (example 'groups') you will still have all the related sub-pages on that main module page (not visible in main site navigation).

 

I will try to explain better. I still want the top navigation menu bar with just the top page item, ex. Group Home just that one link. I have the top page link (Group Home) still checked, so it can be viewed by the guests and members.  I find the drop downs links, Featured Groups, Popular Groups, Recent Groups, Group Tags, Group Calendar, and Search Groups as repetitive and want them removed from the top menu bar. So, I uncheck the guest and member boxes of those drop down links in the main menu, they disappear from the top menu bar. BUT, They also disappeared from the sub menu of the top level page (Group Home Page). I want those links (Featured Group Etc.) to be still available for view on the Groups Home Page on the sys_sub_ menu. 

   The Group Home Page,  has the top main menu bar, then under that is the sub menu bar. The sub menu bar is the one with the Add Group and My Group buttons to far right, to the far left is a icon and Page Title, next to that would be Featured etc. links if I left them checked on the navigation menu.  I still want them to show there on that main page, but not as a drop down on the main menu.

Maybe this will be clearer, I will eventually get the lingo that makes it easier for others to understand. Thanks for your patience.

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 6 Sep 2013

Thank you

Vunderba..... Challenge Yourself to be the Best...... Hosting from Zarconia.net
Quote · 7 Sep 2013

This is the original post where this code was provided. http://www.boonex.com/forums/topic/Remove-item-from-top-menu-without-deleting-submenu.htm

There is a error in the original post and was carried over to here when it was re-posted.

The path to the file you need to change is incorrect.

Posted as Open templates/base/BxBaseMenu.php

Should be Open templates/base/scripts/BxBaseMenu.php

Just in case you have problems finding the file to edit.


https://www.deanbassett.com
Quote · 7 Sep 2013

Is there a special placement of the code in CSS. I have changed bxbasemenu.php in the proper location. I did a test and placed the CSS like this

.top_item_209 {
display:none;
}
.top_item_210 {
display:none;
}
.top_item_213 {
display:none;
}

at the end of the top_menu.css file in both the base template and custom template

I cleared caches, one in Admin and two others in Cpanel and my browser cache. Also F5 browser.

Items still show in the Main menu and the Sub menu.

Vunderba..... Challenge Yourself to be the Best...... Hosting from Zarconia.net
Quote · 7 Sep 2013

there is an another way to do that, if i understand it correctly.

http://www.boonex.com/forums/topic/How-to-display-Sys-Sub-Menu-on-page-.htm#218239

so much to do....
Quote · 7 Sep 2013

 

Is there a special placement of the code in CSS. I have changed bxbasemenu.php in the proper location. I did a test and placed the CSS like this

.top_item_209 {
display:none;
}
.top_item_210 {
display:none;
}
.top_item_213 {
display:none;
}

at the end of the top_menu.css file in both the base template and custom template

I cleared caches, one in Admin and two others in Cpanel and my browser cache. Also F5 browser.

Items still show in the Main menu and the Sub menu.

Those numbers seem quite high. Are these normally apearing in the Main menu within the visible top row, or in the more menu item? This will not hide items that are appearing in the more menu.


https://www.deanbassett.com
Quote · 7 Sep 2013

I have a mod under development that will allow this to be done without requiring any source changes to dolphin at all.

It will be a few days before i am finished with it.

https://www.deanbassett.com
Quote · 7 Sep 2013

I always look forward to your mods Deano. I am in no rush. It is just the right thing to do. I was watching someone navigate my site for the first time and they were confused with all the drop down menus. They spent a considerable amount of time or seemed overwhelmed with all the submenu items on the Main Navigation bar, instead of reading content. With one click they could have been on the Home page looking at content instead of trying to flip through all the links getting the same results.

   I am not so much concerned with the more tab items as long as I can hid the submenus on those links under More.

I don't mind doing what Pranshank25 recommended, but if you are going through the trouble of making a mod, I will be your first customer for it.

Vunderba..... Challenge Yourself to be the Best...... Hosting from Zarconia.net
Quote · 7 Sep 2013

Yes, those numbers were correct, if it is the ID number located in the sys_menu_top database that is to be used. I sorted the column, and within two pages of 30 items my ID number was over 200. Many numerals were skipped. Those were my numbers for Bx Blog, All Blogs, Blog Calendar and Search Blogs.

Vunderba..... Challenge Yourself to be the Best...... Hosting from Zarconia.net
Quote · 7 Sep 2013

 

Yes, those numbers were correct, if it is the ID number located in the sys_menu_top database that is to be used. I sorted the column, and within two pages of 30 items my ID number was over 200. Many numerals were skipped. Those were my numbers for Bx Blog, All Blogs, Blog Calendar and Search Blogs.

Ok. That's where the confusion is. The methods people are showing you here is to hide a main top level item and all of the sub menu items within it. What your trying to do is hide a sub-menu item under the top menu item. Not one of the top level items itself. So none of these methods will work for that.

I need you to be more accurate on exactly what your trying to hide by using a picture. Take a screen shot pointing out what your trying to hide. The photo will eliminate the confusion.




https://www.deanbassett.com
Quote · 7 Sep 2013

Ahh, there that post is ... I was looking for this for ages!  At this time you provided this Deano it was a huge help so I kept it noted in my own personal notes ;)

 

This is the original post where this code was provided. http://www.boonex.com/forums/topic/Remove-item-from-top-menu-without-deleting-submenu.htm

 

DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price!
Quote · 7 Sep 2013

My solution for this was to hide the normal navigation menu completely from view.  It is still there of course to generate the submenus.  I then coded in a menu for the top menu items I wanted to keep in place; I created a custom main menu bar.  It did not take me long to create the custom menu and it is in the normal template for the menu.  I mentioned this above; I simply edited the template to hide the menu structure from view and then wrote a custom menu to get to the top menu items.  We both wanted the same goal, to try and reduce the clutter of the Dolphin menu system to make it less confusing to our members.

Geeks, making the world a better place
Quote · 7 Sep 2013

The module i am working on for this i was hoping i was going to be able to do without any source code changes to dolphin. Unfortunately i can't. Initial tests looked good, but during more advanced testing hiding multiple items, it failed miserably.

So the module will require source changes to add identifiers to every menu item which dolphin should have anyway.

I also ran into a issue during testing that if enough items are hidden that normally would prevent the more menu from appearing, it still appeared with nothing in it, so i have to deal with that issue also.

Module should be released sometime tomorrow.

https://www.deanbassett.com
Quote · 7 Sep 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.