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) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Navigation Menu addition not appearing in the top menu bar.
Pages: [1]

Author Topic: Navigation Menu addition not appearing in the top menu bar.  (Read 615 times)

SuperSaiyan

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.3.4
  • CMS version: Drupal
  • MySQL version: 5.1.66
  • PHP version: 5.3.3-7
Navigation Menu addition not appearing in the top menu bar.
June 19, 2013, 04:11:00 pm
Hi gang,

Although my addition to the menu is appearing in the list on ?q=civicrm/admin/menu&reset=1, it's not actually appearing in the top menu bar on any page. I read that if the permissions aren't set correctly it won't appear up there, does the below look to be in order?

I ideally want everyone who can log in to be able to see the system.

My code is as follows:

function mapifyextension_civicrm_navigationMenu( &$params ) {
  // get the maximum key of $params
  $maxKey = ( max( array_keys($params) ) );
  $params[$maxKey+1] = array (
    'attributes' => array (
    'label' => 'mapifyextension',
    'name' => 'CiviCPD',
    'url' => 'linkblocked',
    'permission' => 'administer CiviCRM',
    'operator' => 'AND',
    'separator' => null,
    'parentID' => null,
    'navID' => $maxKey+1,
    'active' => 1
),
     'child' => null );
}


Any responses gratefully received. I'll send you a small digital cookie if you help me out! Is there anything I've missed?

« Last Edit: June 19, 2013, 04:40:54 pm by SuperSaiyan »

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Navigation Menu addition not appearing in the top menu bar.
June 19, 2013, 04:39:24 pm
Did you run /civicrm/menu/rebuild?reset=1

If that's not the issue, might be permissions. Not sure what 'operator' should be if there's only a single permission value as in your case ??
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Navigation Menu addition not appearing in the top menu bar.

This forum was archived on 2017-11-26.