CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Removing the CiviCRM navigation Bar
Pages: [1]

Author Topic: Removing the CiviCRM navigation Bar  (Read 3719 times)

midloman

  • I post occasionally
  • **
  • Posts: 62
  • Karma: 1
Removing the CiviCRM navigation Bar
March 11, 2010, 03:23:48 pm
How do you go about removing the CiviCRM navigation bar?  My Drupal site uses suckerfish menus, and IE 7 and 8 has a mental breakdown when I display a CiviCRM page (like register for events).  I'd just as soon be able to navigate CiviCRM the way we used to before the 3.0 release.

Another issue with this toolbar, is that if I grant access to a vendor to be able to see participants in his events (using a view), he gets an automatic menu of all the other things he could possibly do, some of which I don't want him to do, or know about.  An example of that is search of all users and get an extract of my entire database.

I need a solution that will stand up to future releases of the package - a configuration option would be extra sweet!

Updated
Reading through the Docs, I saw that the Navigational Menu is never presented to anonymous users no matter what permissions they have.  Through the administration menu, I found I could alter the permission requirements to access the nav menu choices.  I can hide a choice on the nav menu by requiring some other permission that we never use - like permission to translate CivCRM into other languages.  This takes care of all the menu options except "home".  This is a convoluted work-around for the permissions part of my problem - creating one more civicrm permission, "Access the Navigation Menu" would work super-well.  That just *might* solve the javascript craziness as well.

Thanks,

Jim Robbins
« Last Edit: March 11, 2010, 06:18:15 pm by midloman »

jsherk

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 0
Re: Removing the CiviCRM navigation Bar
May 01, 2010, 06:41:16 am
Yes, would nice if the HOME menu appeared in the list as well!

Thanks for this post ... I did not realize I could 'play' with the menu, and adding an unused permission is an excellent idea!!

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Removing the CiviCRM navigation Bar
May 03, 2010, 06:31:14 pm
Drupal roles which don't have 'access CiviCRM' should not see the navigation bar menu at all. I would think that would handle most cases where you want to hide it completely.

Otherwise you could potentially customize the template that includes it - templates/CRM/common/drupal.tpl

... removing these lines probably removes it completely - not sure if you'll get any errors tho:
{if $buildNavigation }
    {include file="CRM/common/Navigation.tpl" }
{/if}
Protect your investment in CiviCRM by  becoming a Member!

jsherk

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 0
Re: Removing the CiviCRM navigation Bar
May 03, 2010, 06:52:57 pm
In the next few weeks I am going to make some mods so that there will be an actual entry the Drupal permissions table, something like:
Nav Menu Display
which will allow you to specifically pick and choose which roles get to see it! This should be fairly easy.

I also think I will add an option:
Nav Menu Search Display
which will allow you to specifically pick and choose which roles have the search area included in the nav menu assuming they have the permission to see the nav menu. Not sure how easy/difficult this will be yet because I haven't looked at the nav menu code yet.

And the most important one (for me) is the abilty to include that silly little Home item in the customization screen so you can move it, add it or delete as you feel necessary! Probably need to add new column in db table to accomodate the extra onclick="javascript here" stuff , but I don't think it will be that difficult either.

This is all of course secondary to me actually getting a functioning site up and running, but once I get time to play with this, I will submit a patch!

midloman

  • I post occasionally
  • **
  • Posts: 62
  • Karma: 1
Re: Removing the CiviCRM navigation Bar
May 03, 2010, 07:46:48 pm
Quote from: Dave Greenberg on May 03, 2010, 06:31:14 pm
Drupal roles which don't have 'access CiviCRM' should not see the navigation bar menu at all. I would think that would handle most cases where you want to hide it completely.

Otherwise you could potentially customize the template that includes it - templates/CRM/common/drupal.tpl

... removing these lines probably removes it completely - not sure if you'll get any errors tho:
{if $buildNavigation }
    {include file="CRM/common/Navigation.tpl" }
{/if}


No, actually I want to suppress it altogether.  Civicrm javascipt menus do not co-exist with my site drop-down menus.  I had to install a template-switching module to display any civicrm-related page with the the nav bar on it in a different template.  The nav bar would still be an issue for admins (I think).   I'll try your suggestion on removing the nav bar and report the results here.

midloman

  • I post occasionally
  • **
  • Posts: 62
  • Karma: 1
Re: Removing the CiviCRM navigation Bar
May 04, 2010, 09:09:28 pm
This seems to be a case of "be careful what you wish for".

Quote from: Dave Greenberg on May 03, 2010, 06:31:14 pm
Drupal roles which don't have 'access CiviCRM' should not see the navigation bar menu at all. I would think that would handle most cases where you want to hide it completely.

Otherwise you could potentially customize the template that includes it - templates/CRM/common/drupal.tpl

... removing these lines probably removes it completely - not sure if you'll get any errors tho:
{if $buildNavigation }
    {include file="CRM/common/Navigation.tpl" }
{/if}

This did remove the javascript Navigation menu, and I saw no errors related to the removal.  However, I regretted it as soon as I did it, because the admin menu lacked the links I needed to accomplish the functions provided by the Navigation Menu.  And - I'm still unable to use a single theme within my site because of CSS issues that manifest when using CiviCRM pages, - specifically events.  I'm sure I have a flawed theme, but my users like it - and it works fine everywhere else.


robinhood

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 6
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.56
  • PHP version: 5.3.5
Re: Removing the CiviCRM navigation Bar
January 20, 2011, 03:50:09 am
Any progress on this patch? 

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Removing the CiviCRM navigation Bar

This forum was archived on 2017-11-26.