From 88cd8875fd7122b99e112760342a3bdd8758bd3a Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sun, 2 Nov 2014 18:35:29 -0500 Subject: [PATCH] CRM-15524 - Add 'ajax-snippet' region --- CRM/Core/Resources.php | 2 +- templates/CRM/common/snippet.tpl | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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. *} -- 2.25.1