SMOLNET PORTAL home about changes

Display HTML on Lightbox v2

I’m trying drupal x from some weeks ago. On Drupal x, I’ve used Greybox Redux module to display HTML content on a Javascript popup window. On x, where Greybox isn’t available, I try successfully Lightbox v2. I use this module for images on many sites: syntax to display HTML on a popup IFRAME changes slightly:

Greybox Redux (http://drupal.org)
Lightbox v2 (http://drupal.org)


<a rel="lightframe" href="http://example.com" title="Lightframe label">Link Text</a>

And this is the l() equivalent:

l() (http://api.drupal.org)


l('Link text', '``http://example.com``', array('attributes' => array('rel'=>'lightframe', 'title'=>'``"Lightframe label``')))

You can also use the grouping feature to browse prev/next elements:

'rel'=>'lightframe[mygroup]'

customize display style:

'rel'=>'lightframe[|width: 800px; height: 600px;]'

both:

'rel'=>'lightframe[``mygroup``|width: 800px; height: 600px;]'

Complete example:

l('Link text', '``http://example.com``', array('attributes' => array('rel'=>'lightframe[``mygroup``|width: 800px; height: 600px;]', 'title'=>'``"Lightframe label``')))

See also:


*
*

https://web.archive.org/web/20080726000000*/http://drupal.org/project/greybox (https://web.archive.org)
https://web.archive.org/web/20080726000000*/http://drupal.org/project/lightbox2 (https://web.archive.org)
https://web.archive.org/web/20080726000000*/http://example.com (https://web.archive.org)
https://web.archive.org/web/20080726000000*/http://api.drupal.org/api/function/l/6 (https://web.archive.org)
array('attributes' =&gt; array('rel'=&gt;'lightframe', 'title'=&gt;'</code><code> (https://web.archive.org)
array('attributes' =&gt; array('rel'=&gt;'lightframe[</code><code>mygroup</code><code>|width: 800px; height: 600px;]', 'title'=&gt;'</code><code> (https://web.archive.org)
https://web.archive.org/web/20080726000000*/http://drupal.org/node/279758#comment-912194 (https://web.archive.org)
https://web.archive.org/web/20080726000000*/http://drupal.org/node/266126 (https://web.archive.org)
Response: 20 (Success), text/gemini
Original URLgemini://chirale.org/2008-07-26_143.gmi
Status Code20 (Success)
Content-Typetext/gemini; charset=utf-8