summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEarl Miles2011-12-02 19:12:33 (GMT)
committer Earl Miles2011-12-02 19:12:33 (GMT)
commit198bd03a2b4c603ca0df8f41b019ac21085fedfd (patch)
tree918c2c157dae841f5a3bff8f685c7cef362fdb67
parent2e6370ce36b82e3019a7dd73e65eb6b09deecc08 (diff)
Issue #1318142 by Steven Merrill: Add pane prefix/suffix to panels to facilitate ESI caching.
-rw-r--r--panels.module3
-rw-r--r--templates/panels-pane.tpl.php6
2 files changed, 9 insertions, 0 deletions
diff --git a/panels.module b/panels.module
index 486d243..b136b64 100644
--- a/panels.module
+++ b/panels.module
@@ -1236,6 +1236,9 @@ function template_preprocess_panels_pane(&$vars) {
}
}
+ $vars['pane_prefix'] = !empty($content->pane_prefix) ? $content->pane_prefix : '';
+ $vars['pane_suffix'] = !empty($content->pane_suffix) ? $content->pane_suffix : '';
+
$vars['title'] = !empty($content->title) ? $content->title : '';
$vars['feeds'] = !empty($content->feeds) ? implode(' ', $content->feeds) : '';
diff --git a/templates/panels-pane.tpl.php b/templates/panels-pane.tpl.php
index d7c93ab..e909cfa 100644
--- a/templates/panels-pane.tpl.php
+++ b/templates/panels-pane.tpl.php
@@ -17,6 +17,9 @@
* data including the contexts and all of the other panes being displayed.
*/
?>
+<?php if ($pane_prefix): ?>
+ <?php print $pane_prefix; ?>
+<?php endif; ?>
<div class="<?php print $classes; ?>" <?php print $id; ?>>
<?php if ($admin_links): ?>
<?php print $admin_links; ?>
@@ -48,3 +51,6 @@
</div>
<?php endif; ?>
</div>
+<?php if ($pane_suffix): ?>
+ <?php print $pane_suffix; ?>
+<?php endif; ?>