I am displaying some node content in a LightBox. The output needs to be customized so that the output is entirely bare with the exception of the actual views results. I want every surrounding div, menu, styling etc gone.

To achieve this, I created a custom views page called views-view--Facilities-FloorPlans--page.tpl.php. The out put is printed from a single line of php print code. I deleted everything except that line but I still get all the clutter I am trying to get rid of.

If you visit http://test2omniforce.co.uk/node/9 and click on the enlarge floormap link at the top right of either floormap please. You should see the enlarged floormap partly showing but surrounded by the website styling. How do I get rid of the excess markup?

Also, if anyone can advise on how to expand the lightbox iFrame I would be grateful

Thanks for your time.

  • Was it showing the header & footer region in the lightbox ? Sep 11 '15 at 18:04

The LightBox2 module might help you:

The Lightbox2 module is a simple, unobtrusive script used to overlay images on the current page. It's a snap to setup and works on most modern browsers.

The module places images above your current page, not within. This frees you from the constraints of the layout, particularly column widths. It keeps users on the same page. Clicking to view an image and then having to click the back button to return to your site is bad for continuity (and no fun!).

Alternatively, you can place this in node page (after setting your input filter to php) this code:

  echo theme('galleria_lightbox_link', arg(1), 800, 600,  "linktext");
  • 1
    Can you please tell me how to use this PHP code and what it does?
    – sisko
    Jul 13 '11 at 15:40
  • The alternative PHP solution here requires you to have the PHP input filter enabled for your content type. This might be a quick & dirty solution to the problem, but is generally considered bad practice (i.e. mixing code & content) and won't work in D8 core.
    – Shawn Conn
    Sep 11 '15 at 17:50

you need bypasses the theming system, one way can be use:

<?php die(); ?>

after output your content.

  • Extreme but I will try it. However, if there is output before my desired content then that will not solve the problem.
    – sisko
    Jul 14 '11 at 5:07
  • no, there isn't any output before that, try it. Jul 14 '11 at 5:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.