For Drupal7:
Add to your theme template.php
(or add inner of function code to existing function prepropress_page closer to the end) next function:
/**
* Override or insert variables into the page templates.
*/
function YOURTHEME_preprocess_page(&$vars, $hook) {
if (isset($_GET['shadow']) && $_GET['shadow']) {
$vars['theme_hook_suggestions'][] = 'page__empty';
}
}
Add page--empty.tpl.php
to your theme folder - take original copy from page.tpl.php
, but remove printing all header, sidebars, footer regions. E.g.:
<?php
/**
* @file
* Returns the HTML for Drupal page only with content region = empty page.
*/
?>
<?php if ($title): ?>
<h1 class="page__title title" id="page-title"><?php print $title; ?></h1>
<?php endif; ?>
<?php print render($page['content']); ?>
Make shadowbox scripts added to any page (shadowbox ui settings), and you can do next anywhere:
<a href="/node/1?shadow=1" rel="shadowbox" title="About">About</a>
So, any link with url?shadow=1
and rel="shadowbox"
will shown on shadowbox popup window only content without sidebars. Control size of window on rel="shadowbox" as documented.
For shadowbox links that generated automatically (views, fields) you should override it via settings or template.