We've got some CiviCRM status messages displayed outside of CiviCRM (Drupal pages), but they come as a default browser JS alerts, not as a fancy CiviCRM-styled status messages. We've $manager->addCoreResources(); included via hook_page_build(&$page); guess it's not enough though.

There is a documentation at https://wiki.civicrm.org/confluence/display/CRMDOC/Resource+Reference which says:

If you are working outside of CiviCRM core or extensions (such as a Wordpress plugin), you can still use the Resource Manager but will need to construct the urls yourself

with addScriptFile, addScriptUrl, addStyleFile and addStyleUrl methods available; the question is, which exactly CSS files contains fancy pop-ups formatting?

Also, it's a bit unclear, how exactly css should be loaded? Normally, it should use addStyleFile / addStyleUrl, but an example given at documentation page states:
CRM_Core_Resources::singleton()->addScriptUrl('http://example.com/bar.css' (mean, use addScript to load CSS Style file) which is a bit confusing..

Thanks for any hint!

1 Answer 1


Wrong question was asked; fancy CiviCRM stuff works almost, if properly called via CiviCRM own jQuery methods; pretty strange CRM.alert in Chrome pops up a default JS alert() message though, so it might be better to use CRM.status with appropriate parameters

This page helps a lot: https://wiki.civicrm.org/confluence/display/CRMDOC/Notifications+and+Confirmations

Additional reading:

Your Answer

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

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