summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEarl Miles2010-11-01 18:50:44 (GMT)
committer Earl Miles2010-11-01 18:50:44 (GMT)
commitc140c9ad19420edb932eb953c1d0f4b76c52c286 (patch)
tree5742705b7ce063f88f6c9c751426b5b69bf1a4e3
parent8eb0c910800feb28c1614eb3276d76cffc1f296b (diff)
#955070: Update ctools internal page tokens to work properly on content all content.
-rw-r--r--CHANGELOG.txt1
-rw-r--r--ctools.module11
2 files changed, 9 insertions, 3 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index e696bec..bd6bb35 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -22,3 +22,4 @@ Variant titles showing up as blank if more than one variant on a page.
#954492: Redirect not always working in wizard.inc
#955348: Lack of redirect on "Update" button in Page Manager causing data loss sometimes.
#941778: Update and save button should not appear in the "Add variant" path.
+#955070: Update ctools internal page tokens to work properly on content all content.
diff --git a/ctools.module b/ctools.module
index 1642728..5d980bb 100644
--- a/ctools.module
+++ b/ctools.module
@@ -476,12 +476,16 @@ function ctools_preprocess_node(&$vars) {
}
}
+function ctools_page_alter(&$page) {
+ $page['#post_render'][] = 'ctools_page_token_processing';
+}
+
/**
- * A theme preprocess function to allow content type plugins to use page
+ * A theme post_render callback to allow content type plugins to use page
* template variables which are not yet available when the content type is
* rendered.
*/
-function ctools_preprocess_page(&$variables) {
+function ctools_page_token_processing($children, $elements) {
$tokens = ctools_set_page_token();
if (!empty($tokens)) {
foreach ($tokens as $token => $key) {
@@ -502,8 +506,9 @@ function ctools_preprocess_page(&$variables) {
break;
}
}
- $variables['content'] = strtr($variables['content'], $tokens);
+ $children = strtr($children, $tokens);
}
+ return $children;
}
// -----------------------------------------------------------------------