0

I create a simple extension but I want to put it on navigation bar.A simple menu inside a events menu. How can I do that?

3

See the documentation for hook_civicrm_navigationMenu including the civix helper functions.

2
  • I saw that but didn't understand. – Dipak Giri Oct 23 '18 at 10:01
  • If you have a sample code then please share on dipakgiree@gmail.com – Dipak Giri Oct 23 '18 at 10:31
1

Here is an example of an existing navigationMenu hook:

/**
 * Implements hook_civicrm_navigationMenu().
 *
 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_navigationMenu/
 */
function dmciviapi_civicrm_navigationMenu(&$menu) {

  _dmciviapi_civix_insert_navigation_menu($menu, 'Administer', array(
    'label' => E::ts('Domus Medica API Volledige Rechten'),
    'name' => 'dmciviapi_dmapisettings',
    'url' => 'civicrm/dmciviapi/form/dmapisettings',
    'permission' => 'administer CiviCRM',
    'attributes' => [],
    'operator' => 'OR',
    'separator' => 0,
  ));
  _dmciviapi_civix_navigationMenu($menu);
}

In this example the url contains the URL of a form I created with civix generate:form

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.