Hello,

I would like to display internal pages in lightbox window, without sidebars, etc. So, I copied page-node-lightbox2.tpl.php to my theme (Marinelli) folder and created test and test links. Pages openss lightbox , but ignores page-node-lightbox2.tpl.php formatting, still using page.tpl.php markup.

Probably I missed something easy and important. Please help!

Thank you!

Comments

yurg’s picture

Oh, so sorry. Proper links formatting:


<a href="http://mydomain.tld/node/25" rel="lightframe">test</a> 

and


<a href="node/25" rel="lightmodal">test</a></p>

stella’s picture

Two things:

A) the links need to be like:

<a href="/node/25/lightbox2" rel="lightframe">test</a>

Note, the addition of the /lightbox2 to the node path. This is normally handled by lightbox2 module, if using an automatic image handler that is opening the node content. If these are manually created links, you'll need to add this in. Also note, rel="lightframe" - this is required if you want to open a full html page in a lightbox. If you're just opening a div or similar in a lightbox, then you can use lightmodal.

B) In D6, after making any changes to your theme, either by adding or modifying template files, you will need to rebuild the theme registry. The Devel module has a handy link for this. Failing that you could clear your Drupal cache on the performance settings page.

Cheers,
Stella

yurg’s picture

Marvelous! Thank you, Stella. Combination of /lightbox2 and rel="lightframe" was the nested piece of puzzle. Thank you again!

stella’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

keesje’s picture

I like this feature, but isn't the "/lightbox2" added to the URL introducing yet another duplicate content pitfall?
My suggestion is to parse this as a GET attribute in the plain HTML way like: node/@?lightbox2 = true.