From: Coleman Watts Date: Sun, 2 Nov 2014 23:35:29 +0000 (-0500) Subject: CRM-15524 - Add 'ajax-snippet' region X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=88cd8875fd7122b99e112760342a3bdd8758bd3a;p=civicrm-core.git CRM-15524 - Add 'ajax-snippet' region --- diff --git a/CRM/Core/Resources.php b/CRM/Core/Resources.php index 38680eef6f..dd9fdf805d 100644 --- a/CRM/Core/Resources.php +++ b/CRM/Core/Resources.php @@ -226,7 +226,7 @@ class CRM_Core_Resources { public function addSetting($settings) { $this->settings = $this->mergeSettings($this->settings, $settings); if (!$this->addedSettings) { - $region = self::isAjaxMode() ? 'page-body' : 'html-header'; + $region = self::isAjaxMode() ? 'ajax-snippet' : 'html-header'; $resources = $this; CRM_Core_Region::instance($region)->add(array( 'callback' => function(&$snippet, &$html) use ($resources) { diff --git a/templates/CRM/common/snippet.tpl b/templates/CRM/common/snippet.tpl index bb84d5a84a..217335505f 100644 --- a/templates/CRM/common/snippet.tpl +++ b/templates/CRM/common/snippet.tpl @@ -37,8 +37,10 @@ {if $smarty.get.snippet eq 2} {include file="CRM/common/print.tpl"} {else} + {crmRegion name='ajax-snippet'}{/crmRegion} + {crmRegion name='page-header' allowCmsOverride=0}{/crmRegion} - + {crmRegion name='page-body'} {* Add status messages and container-snippet div unless we are outputting json. *}