5

I have created some drupal views for civicrm. But the views pages are opening inside the drupal set up, where the civicrm toolbar is not showing. Now, how can i show the civi toolbar in the drupal? To avoid the switching between drupal and civicrm.

3 Answers 3

9

To answer your question, I wrote a module:

https://www.drupal.org/project/civimenu

The code snippet I posted below probably wouldn't work because of timing issues (by the time the block was being printed it's too late to add the header). Seemed better to package it up into a module. Enjoy.

1
  • dang you're good
    – pmoz
    Jul 9, 2015 at 1:08
2

I don't think there's an easy way to do what you're describing. However, you CAN add a View to the CiviCRM dashboard, which may give you the same result with less effort: Check it out.

0

The following php code will do it. If you have the php filter enabled in drupal then you could place this in the header of the view, or in a block. Just make sure to only include this code on screens where the nav menu isn't already!

civicrm_initialize();
CRM_Core_Resources::singleton()->addCoreResources();
require_once 'CRM/Core/Smarty/plugins/function.crmNavigationMenu.php';
$params = array();
print smarty_function_crmNavigationMenu($params, $params);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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