I am reading in various places that adding /lightbox2 to the end of the href string in an a tag will open it's node content in a lightbox, which is what I want. But I cannot get this to work in Drupal 7 at all regardless of what settings are given to the a tag. What is the proper way to structure the a tag in Drupal 7 to get this to work?

<a href="node/xx/lightbox2" rel="lightframe">light content</a>

is the rel lightbox? lightframe? lightmodal? does it just not work in Drupal 7?

Thanks

Comments

epawel’s picture

I have the same problem in D7 - please help...

shashi_lo’s picture

Still a problem. Please advise!

narcisgirona’s picture

StatusFileSize
new73.42 KB

make sure you have checked: Load on every page except the listed pages. Under page specific lightbox 2 settings section. then:

"<" a href="node/xxx/lightbox2" rel="lightframe[group|width:500px; height: 500px][caption]">link text

put away "" from "<"

ricovandevin’s picture

The page--node--lightbox2.tpl.php delivered with this module is not usable for Drupal 7. If you want to use a template for node content in the lightbox you better make a copy of your own page.tpl.php and adjust that one to your needs.

trante’s picture

Category: support » bug

On the contrary of documentation's "Opening node content in a lightbox" part, this feature doesn't work for Drupal 7.
http://drupal.org/node/252260

I suppose this is a bug for D7 version.

If this won't fix out of the box, please tell us so we can switch to colorbox.
Thank you

gebiss’s picture

Looking for the same solution. The node displays in the lightbox but all together with other elements (sidebars, etc. ) The 'lightbox2' at the end of the URL doesn't help to get rid of the elements on D7.

Jacek

zrodimel’s picture

Any luck with this?

Kvark’s picture

Status: Active » Fixed

Hello, to be honest this is actualy not a bug
Today I am play a lot around "How to show node in popup window?" and look like I find a brilliant solution for this :)

To do that, you will need to use such modules:
1. http://drupal.org/project/menu_attributes
2. http://drupal.org/project/content_page

1st allow add rel attribute to node - actually not only rel - many of them! (we can write that is needed e.x. lightframe[|width:400px; height:300px; scrolling: no;][FAQ] )
2nd - add nice future - open only content of node, without anything else - setup is simple: into menu you should add link to needed node like this: node/42?ajax_request

Wualia! :)

p.s. to show node without a title use this: http://drupal.org/project/exclude_node_title

Status: Fixed » Closed (fixed)

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

phrequency’s picture

Use colorbox + colorbox_node

Works like a charm.

steeph’s picture

This works just fine after putting page--node--lightbox2.tpl.php in the theme's directory and replacing its content by only the part of page.tpl.php I need in the lightbox.

mvy88’s picture

colorbox node + colorbox worked awsome for me... just donot give the precedding ../ infront of the images to display them... cheers..:)

calebgilbert’s picture

As steeph mentions taking page--node--lightbox2.tpl.php (found inside your lightbox2 directory) placing it in your theme directory and replacing its content with only the parts you need is key to getting this working correctly. Also, it was also very helpful to add a html--node--lightbox2.tpl.php file to my theme directory (you'll need to make this file - it doesn't come with lightbox2). Here is is what my html--node--lightbox2.tpl.php looks like:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
  "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language; ?>" version="XHTML+RDFa 1.0" dir="<?php print $language->dir; ?>"
<head>
</head/>
<body>
  <?php print $page; ?> 
</body>
</html>

The effect is very stark node output - it even leaves out all the css/js for the site. This is what I was going for personally - if you however you want any individual CSS/JS add it to the section, but do not add it using add_drupal_js/css unless you want all of your site's other styles/scripts to come along for the ride.

plato1123’s picture

Issue summary: View changes

Anyone have brilliant ideas for pop out windows in d7 that aren't tied to the window they popped out of? Trying to do a music player that pops out and then lives in the background as the person browses from page to page. Lightboxes are great but they don't quite work for what I'm trying to do.

smurfxx’s picture

Is it possible to open a proportional lightbox? Like width=90% and height=90%?

steeph’s picture

@plato1123 That sounds like you just want to open a page in a new browser window/popup.

@smurfxx Yes, you can style lightboxes to fit your site just like any other HTML.
Please open a new issue next time. This has nothing to do with the issue you posted it in. It should have been a support request.