I want to remove a lot of the items from the top menu, photos, videos, sounds etc. I did this with the "visible to members" option. However, when I'm in a profile and I click on the "photos home" button there is no submenu. This means there's no way to access any of the submenu options unless the item (and all it's submenu items) appear on the top menu.
Here's all the options I cannot access unless I have photos on the topmenu with all sub options visible.
Any thoughts?
|
Have you tried changing the top menu visibility, by unchecking the visibilities boxes for both guest and member in navbuilder? My opinions expressed on this site, in no way represent those of Boonex or Boonex employees. |
Hi houston,
Yes, I did try unchecking both visibilities. it removes from the top menu as desired. However, when you navigate to photos home through the profile menu you then don't get the options to see All, Top, Popular, Featured, Search etc.
Anyway to have my cake and eat it too?
|
Might be a silly question, but if you still want to be able to navigate to photos home, and all that goes with it, what's so bad about just leaving it alone? My opinions expressed on this site, in no way represent those of Boonex or Boonex employees. |
Not a silly question at all.
I want to make using the site a more organic experience so functions are available when you get to a page. There's so much functionality in Dolphin that our users have commented that the menu is overwhelming and just plain busy.
|
So why don't you just remove the drop downs from the top menu? My opinions expressed on this site, in no way represent those of Boonex or Boonex employees. |
The menu system was not designed to do this. So there is not easy way. But there is a hard way. I have a code mod that will add a css selector for each top level menu item allowing the css for each top menu item to be changed. Including hiding it from view but still allow the sub items to show up in the subMenuContainer.
But it's a bit tricky.
You can do this.
Open templates/base/BxBaseMenu.php
Look for the following code at about line 529.
$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_6 { display:none; }
That will then hide the top level item with the ID of 6.
The tricky part is finding the ID of the menu item you want to hide which can be looked up in the database in sys_menu_top or if you have firebug, right click on the menu item, inspect the element and you will see the new selector for that menu item with it's ID.
https://www.deanbassett.com |
Oh, and i should mention that this little trick does not work on the last 4 items that may or may not appear on the top menu. Those are the More icon, the search icon, the template switcher and the language switcher.
https://www.deanbassett.com |
I have such a similar problem!
I would like, if one is in a member's profile, remove the sound link!
Sorry for my English! |
You situation is different.
Your looking for a condition to be applied. And it is to be applied to the submenu which this topic is for a top menu item.
The situations are completely different and unrelated. Start a new topic. Your request will be far more complex to find a solution for.
https://www.deanbassett.com |
Deano, your solution works like a dream. Thank you so much.
As a follow-up, am I creating trouble for myself editing the base template php files? I assume they may be overwritten in an upgrade?
|
They can be.
The only other way to do it is to copy that function into BxTemplMenu.php of each of your templates. https://www.deanbassett.com |
Hello,
I know the topic is a bit old, but I've tried the code and it works great, but not for the language switcher icon in the top menu.. Any ideas how to do that? I'd like to remove it too..
Thanks for your help =)
|
Over a year later and I just stumbled upon this item, and sooooo happy that you posted this Deano! Perfect solution for my needs, and super easy to implement.
Thanks again for posting this solution.
Cheers - Jethro
The menu system was not designed to do this. So there is not easy way. But there is a hard way. I have a code mod that will add a css selector for each top level menu item allowing the css for each top menu item to be changed. Including hiding it from view but still allow the sub items to show up in the subMenuContainer.
But it's a bit tricky.
You can do this.
Open templates/base/BxBaseMenu.php
Look for the following code at about line 529.
$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_6 { display:none; }
That will then hide the top level item with the ID of 6.
The tricky part is finding the ID of the menu item you want to hide which can be looked up in the database in sys_menu_top or if you have firebug, right click on the menu item, inspect the element and you will see the new selector for that menu item with it's ID.
|
I have done this as instructed and it's just not working for me ?!
I changed bxbasemenu .php: <td class="top top_item_{$iItemID}" {$sActiveStyle} {$sImgTabStyle}>
I added this to top_menu.css:
top_item_280 { display:none; }
Cleared caches and still nothing .....
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
lets guess you forgot to add a "."
it should be
.top_item_280 { display:none; }
:P
I have done this as instructed and it's just not working for me ?!
I changed bxbasemenu .php: <td class="top top_item_{$iItemID}" {$sActiveStyle} {$sImgTabStyle}>
I added this to top_menu.css:
top_item_280 { display:none; }
Cleared caches and still nothing .....
so much to do.... |
opps.... I actually have done it right in my files and its not working !!
lets guess you forgot to add a "."
it should be
.top_item_280 { display:none; }
:P
I have done this as instructed and it's just not working for me ?!
I changed bxbasemenu .php: <td class="top top_item_{$iItemID}" {$sActiveStyle} {$sImgTabStyle}>
I added this to top_menu.css:
top_item_280 { display:none; }
Cleared caches and still nothing .....
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
Are you using a custom template? https://www.deanbassett.com |
Yes ....
I basically wish to hide the main videos, sounds, photos and youtube pages from my navigation at SocialMunch.com
I have made a new 'media' tab for these and don't require the mentioned pages in my navigation/menu
Are you using a custom template?
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
give this a try.
Put this in your _header.html before closing </head>
<script> $(document).ready(function(){ $('.top_item_682').find('div').hide(); }); </script>
And clear cache. Done
so much to do.... |
Why don't you just add a custom menu and add in what you want ?? |
this worked !!
OK do I add this again for the remaining tabs I would like hidden ??
Also I noticed the ID you used was different to one I used prior
give this a try.
Put this in your _header.html before closing </head>
<script> $(document).ready(function(){ $('.top_item_682').find('div').hide(); }); </script>
And clear cache. Done
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
I am adding custom navigation for medias only hence why I wish to hide the main navigation for videos, sounds, photos etc
Why don't you just add a custom menu and add in what you want ??
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
I thought this worked but it has not ....
It seems to have hidden the custom media tab and pages rather than the actual videos page from navigation
edit: if I click the videos page in navigation it ONLY the vanishes from navigation ?
give this a try.
Put this in your _header.html before closing </head>
<script> $(document).ready(function(){ $('.top_item_682').find('div').hide(); }); </script>
And clear cache. Done
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
trying to think what you mean...:| so much to do.... |
Please look at my site 'SocialMunch' ... I have left your code in files
If you hover over the 'media tab' you will see that videos,photos and sounds I added there are not showing >>> if you search site navigation >> you will see the main pages for videos,sounds and photos etc
>> click the videos page >>only then will videos page in navigation vanish
trying to think what you mean...:|
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
I think the videos, photos pages etc I added in my new 'media' tab are not showing due to 'videos' and the code in-place
Please look at my site 'SocialMunch' ... I have left your code in files
If you hover over the 'media tab' you will see that videos,photos and sounds I added there are not showing >>> if you search site navigation >> you will see the main pages for videos,sounds and photos etc
>> click the videos page >>only then will videos page in navigation vanish
trying to think what you mean...:|
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
I looked at your site. The css labels are in place in the menu.
There is no reason why this would not work.
.top_item_280 { display:none; }
Except that i do not see a top_item_280 in the menu.
I have a feeling your trying to hide items in the more menu. It will not work for that. They must be top level items. This CSS hack will not work for that.
If thats what your trying to do, then move those items in the menu builder to the front line of the menu. You may need to increase dolphins settings for how many items to put on the menu by the same number of items your hiding.
https://www.deanbassett.com |
AHHH HA !!!
That was indeed the issue ! Thanks a lot Deano ...
Thank you to Prashank to for time and efforts !
Great stuff guys, thank you ;)
I looked at your site. The css labels are in place in the menu.
There is no reason why this would not work.
.top_item_280 { display:none; }
Except that i do not see a top_item_280 in the menu.
I have a feeling your trying to hide items in the more menu. It will not work for that. They must be top level items. This CSS hack will not work for that.
If thats what your trying to do, then move those items in the menu builder to the front line of the menu. You may need to increase dolphins settings for how many items to put on the menu by the same number of items your hiding.
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
I cannot get this to work with 7.1 ?! DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
any good formula that works perfect in the latest version of dolphin, i want to keep only submenu and of course the top menu but without all those links.
Is that possible .
Thanks.
Check the image ( that's what i want to keep )
Proud Hosted by Zarconia.net |
The menu system was not designed to do this. So there is not easy way. But there is a hard way. I have a code mod that will add a css selector for each top level menu item allowing the css for each top menu item to be changed. Including hiding it from view but still allow the sub items to show up in the subMenuContainer.
But it's a bit tricky.
You can do this.
Open templates/base/BxBaseMenu.php
Look for the following code at about line 529.
$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_6 { display:none; }
Hello,
This solution Deano was an optimal solution to hide some items the menu without losing the submenu.
I used the version 7.1.6 but unfortunately does not work in version 7.2 because the code proposed by Deano this different in this new version.
7.1.6
$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;
7.2
return <<<EOF
<td class="top top_item_{$iItemID}">
<a href="javascript: void(0);" onclick="void(0);" class="top_link">
<span class="down bx-def-padding-sec-leftright">{$sMoreMainCaption}</span>
<!--[if gte IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table id="mmm"><tr><td><![endif]-->
<div style="position:relative;display:block;">
<ul class="sub">
EOF;
}
I tried to make the same change but to no avail.
If anyone has a solution would be great, because having it as an option provides a great fexibilitade to build the menu.
Thank you
|