Index: ctools.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ctools/ctools.module,v
retrieving revision 1.24
diff -u -p -r1.24 ctools.module
--- ctools.module	11 Jul 2009 20:00:14 -0000	1.24
+++ ctools.module	17 Aug 2009 02:08:28 -0000
@@ -360,3 +360,42 @@ function ctools_js_load($js) {
   }
   return 0;
 }
+
+/**
+ * A theme preprocess function 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) {
+  $tokens = ctools_set_page_token();
+  if (!empty($tokens)) {
+    foreach ($tokens as $token => $key) {
+      $tokens[$token] = isset($variables[$key]) ? $variables[$key] : '';
+    }
+    $variables['content'] = strtr($variables['content'], $tokens);
+  }
+}
+
+/**
+ * Set a token/value pair to be replaced later in the request, specifically in
+ * ctools_preprocess_page().
+ *
+ * @param $token
+ *   The token to be replaced later.  This should ideally be a string inside of
+ *   an HTML comment, so that if there is no replacement, the token will not
+ *   render on the page.
+ * @param $key
+ *   The key from the $variables array in preprocess page.
+ *
+ * @return
+ *   A array of token/variable names to be replaced.
+ */
+function ctools_set_page_token($token = NULL, $key = NULL) {
+  static $tokens = array();
+
+  if (isset($token) && isset($key)) {
+    $tokens[$token] = $key;
+  }
+
+  return $tokens;
+}
\ No newline at end of file
Index: page_breadcrumb.inc
===================================================================
RCS file: plugins/content_types/page/page_breadcrumb.inc
diff -N plugins/content_types/page/page_breadcrumb.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ plugins/content_types/page/page_breadcrumb.inc	17 Aug 2009 02:08:28 -0000
@@ -0,0 +1,37 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ * Plugin to handle the 'page_breadcrumb' content type which allows the 
+ * breadcrumb trail of the current page to be embedded into a panel.
+ */
+
+/**
+ * Implementation of hook_ctools_content_types()
+ */
+function ctools_page_breadcrumb_ctools_content_types() {
+  return array(
+    'title' => t('Breadcrumb'),
+    'single' => TRUE,
+    'icon' => 'icon_page.png',
+    'description' => t('Add the breadcrumb trail as content.'),
+    'category' => t('Page'),
+  );
+}
+
+/**
+ * Output function for the 'page_breadcrumb' content type.
+ *
+ * Outputs the breadcrumb for the current page.
+ */
+function ctools_page_breadcrumb_content_type_render($subtype, $conf, $panel_args) {
+  $token = '<!-- ctools-page-breadcrumb -->';
+  ctools_set_page_token($token, 'breadcrumb');
+
+  $block = new stdClass();
+  $block->content = $token;
+
+  return $block;
+}
+
Index: page_help.inc
===================================================================
RCS file: plugins/content_types/page/page_help.inc
diff -N plugins/content_types/page/page_help.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ plugins/content_types/page/page_help.inc	17 Aug 2009 02:08:28 -0000
@@ -0,0 +1,37 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ * Plugin to handle the 'page_help' content type which allows the 
+ * help text of the current page to be embedded into a panel.
+ */
+
+/**
+ * Implementation of hook_ctools_content_types()
+ */
+function ctools_page_help_ctools_content_types() {
+  return array(
+    'title' => t('Help'),
+    'single' => TRUE,
+    'icon' => 'icon_page.png',
+    'description' => t('Add the help text of the current page as content.'),
+    'category' => t('Page'),
+  );
+}
+
+/**
+ * Output function for the 'page_help' content type.
+ *
+ * Outputs the breadcrumb for the current page.
+ */
+function ctools_page_help_content_type_render($subtype, $conf, $panel_args) {
+  $token = '<!-- ctools-page-help -->';
+  ctools_set_page_token($token, 'help');
+
+  $block = new stdClass();
+  $block->content = $token;
+
+  return $block;
+}
+
Index: page_messages.inc
===================================================================
RCS file: plugins/content_types/page/page_messages.inc
diff -N plugins/content_types/page/page_messages.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ plugins/content_types/page/page_messages.inc	17 Aug 2009 02:08:28 -0000
@@ -0,0 +1,37 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ * Plugin to handle the 'page_messages' content type which allows the 
+ * status messages of the current page to be embedded into a panel.
+ */
+
+/**
+ * Implementation of hook_ctools_content_types()
+ */
+function ctools_page_messages_ctools_content_types() {
+  return array(
+    'title' => t('Status messages'),
+    'single' => TRUE,
+    'icon' => 'icon_page.png',
+    'description' => t('Add the status messages of the current page as content.'),
+    'category' => t('Page'),
+  );
+}
+
+/**
+ * Output function for the 'page_messages' content type.
+ *
+ * Outputs the breadcrumb for the current page.
+ */
+function ctools_page_messages_content_type_render($subtype, $conf, $panel_args) {
+  $token = '<!-- ctools-page-messages -->';
+  ctools_set_page_token($token, 'messages');
+
+  $block = new stdClass();
+  $block->content = $token;
+
+  return $block;
+}
+
Index: page_tabs.inc
===================================================================
RCS file: plugins/content_types/page/page_tabs.inc
diff -N plugins/content_types/page/page_tabs.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ plugins/content_types/page/page_tabs.inc	17 Aug 2009 02:08:28 -0000
@@ -0,0 +1,37 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ * Plugin to handle the 'page' content type which allows the standard page 
+ * template variables to be embedded into a panel.
+ */
+
+/**
+ * Implementation of hook_ctools_content_types()
+ */
+function ctools_page_tabs_ctools_content_types() {
+  return array(
+    'title' => t('Tabs'),
+    'single' => TRUE,
+    'icon' => 'icon_page.png',
+    'description' => t('Add the tabs (local tasks) as content.'),
+    'category' => t('Page'),
+  );
+}
+
+/**
+ * Output function for the 'page_tabs' content type.
+ *
+ * Outputs the tabs (local tasks) of the current page.
+ */
+function ctools_page_tabs_content_type_render($subtype, $conf, $panel_args) {
+  $token = '<!-- ctools-page-tabs -->';
+  ctools_set_page_token($token, 'tabs');
+
+  $block = new stdClass();
+  $block->content = $token;
+
+  return $block;
+}
+
Index: page_title.inc
===================================================================
RCS file: plugins/content_types/page/page_title.inc
diff -N plugins/content_types/page/page_title.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ plugins/content_types/page/page_title.inc	17 Aug 2009 02:08:28 -0000
@@ -0,0 +1,36 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ * Plugin to handle the 'page' content type which allows the standard page 
+ * template variables to be embedded into a panel.
+ */
+
+/**
+ * Implementation of hook_ctools_content_types()
+ */
+function ctools_page_title_ctools_content_types() {
+  return array(
+    'single' => TRUE,
+    'title' => t('Page title'),
+    'icon' => 'icon_page.png',
+    'description' => t('Add the page title as content.'),
+    'category' => t('Page'),
+  );
+}
+
+/**
+ * Output function for the 'page_title' content type.
+ *
+ * Outputs the page title of the current page.
+ */
+function ctools_page_title_content_type_render($subtype, $conf, $panel_args) {
+  $token = '<!-- ctools-page-title -->';
+  ctools_set_page_token($token, 'title');
+
+  $block = new stdClass();
+  $block->content = '<h1>'. $token .'</h1>';
+
+  return $block;
+}
\ No newline at end of file
