Hi,

I'd love to create a view that presents a number of image thumbs (created via ImageCache) with Shadowbox-Linking to the full images. This part is working flawlessly - thanks!
But in addition to the images I'd like Shadowbox to present some text (e.g. instead of only showing the full image, show the complete node (w/o menues and stuff) or show the image and additional fields). Is there a way to do this?

Thanks :)

Tirsales

Comments

psynaptic’s picture

Status: Active » Fixed

Sure, you can do this a number of ways. One lightweight way is to use a GET variable to switch the page template:


/**
 * Override or insert variables into the page templates.
 *
 * @param $vars
 *   An array of variables to pass to the theme template.
 * @param $hook
 *   The name of the template being rendered ("page" in this case.)
 */
function phptemplate_preprocess_page(&$vars, $hook) {
  if ($_GET['embed']) {
    $vars['template_file'] = 'page-embed';
  }
}

Then you need to copy your page.tpl.php and remove the header/sidebars/etc.

If you use a link to a node e.g. http://example.com/node/1?embed=true within a shadowbox enabled link you should get the desired effect.

Anonymous’s picture

Thanks! Will try it :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

pipicom’s picture

Thanks psynaptic! Tried that and it works..