Hi,
I would like to combine lightbox and imageblock. How do I do that?
I got my imageblock running, simply by:
{g->block type="imageblock.ImageBlock" blocks="recentImage" exactSize=320}
and I can have a lightbox running by adding the rel to a link as in:
<a href="" rel="lightbox[photos]">
But how do i combine those two?
Thank you!
Posts: 8339
You can either edit gallery2/modules/imageblock/templates/blocks/ImageBlock.tpl
Or use mediaBlock with which others have done the same.
Also you can have jQuery add the class to your selector before the lightbox script executes.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 5
Hi, thanks for the swift reply.
I dont know if I'm asking you too much but:
if I add the rel="lightbox" to the ImageBlock.tpl the lightbox keeps on loading without showing the image (meaning it can't find the image, the actual goal, as it is not cleary specified I guess).
right now the link is:
<a href="{$linkHref}"{if !empty($ImageBlockData.linkTarget)} target="{$ImageBlockData.linkTarget}"{/if} rel="lightbox">
should I change the href statement? to what?
thanks again!
Posts: 8339
The problem is that gallery links the image to the image's page in gallery, not simply the image.
try editing gallery2/modules/imageblock/templates/ImageBlock.tpl line 13-14:
to:
don't forget to clear your template cache
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 5
Yes yes master! It did the trick. Got to resize the shown item now, but for now I'll try to find out how myself. Its a learning process anyway!
Thanks mate!