]> gitweb.fluxo.info Git - drupal/muambeiro.git/commitdiff
Adding colorbox ajax support
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 27 Sep 2011 01:48:11 +0000 (22:48 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 27 Sep 2011 01:48:11 +0000 (22:48 -0300)
template.php
templates/page--colorbox.tpl.php [new file with mode: 0644]

index b23a61aa119d2a6012394e65a205570620d844ce..1353aa95b6d9b17549b3fca8a93bbf348b665f0b 100644 (file)
@@ -38,6 +38,11 @@ function muambeiro_preprocess_page(&$vars) {
   if (isset($vars['node']) && $vars['node']->status == 0) {
     $vars['title'] =  drupal_get_title() . ' <span class="marker">(' . t('Unpublished') . ')</span>';
   }
+
+  // See https://drupal.org/node/836160#comment-5026414
+  if (isset($_GET['template']) && $_GET['template'] == 'colorbox') {
+    $vars['theme_hook_suggestions'][] = 'page__colorbox';
+  }
 }
 
 /**
diff --git a/templates/page--colorbox.tpl.php b/templates/page--colorbox.tpl.php
new file mode 100644 (file)
index 0000000..5e88480
--- /dev/null
@@ -0,0 +1 @@
+<?php print render($page['content']); ?>