Keyword

[SOLVED] Image lightboxes in text

  • Todd Williams
  • Todd Williams's Avatar Topic Author
  • Offline
  • New Member
More
9 years 10 months ago #133616 by Todd Williams
[SOLVED] Image lightboxes in text was created by Todd Williams
A K2 article image (the one that is placed on the image tab) will automatically have a function added so that when you click on it and it will show up full-size in a lightbox. Is there a way to do that to other images that are placed in the text?

Cheers,
Todd Williams

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #133617 by Lefteris
Replied by Lefteris on topic Re: Image lightboxes in text
Hi. Yes. Just add the modal class to your markup. Example:
<a class="modal" rel="{handler: 'image'}" href="YOUR_IMAGE">
	<img src="YOUR_THUMBNAIL" alt="Alt text here"/>
</a>
As you can see you need to have two images, one for using in the modal and one to be used as a thumbnail in the text.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Todd Williams
  • Todd Williams's Avatar Topic Author
  • Offline
  • New Member
More
9 years 10 months ago #133618 by Todd Williams
Replied by Todd Williams on topic Re: Image lightboxes in text
Excellent! Thank you!

Cheers,
Todd Williams

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #133619 by Lefteris
Replied by Lefteris on topic Re: Image lightboxes in text
You are welcome.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Todd Williams
  • Todd Williams's Avatar Topic Author
  • Offline
  • New Member
More
9 years 10 months ago #133620 by Todd Williams
Replied by Todd Williams on topic Re: Image lightboxes in text
As I am moving forward with the lightboxes I see that they do not work on my entire site. Here is an example:
This page:
joom33.ecaminc.com/index.php/presentationslist/presentations has an article item titled "Tales of an Expert Witness: Death in Discovery (Keynote)" In the category listing the lightbox on the gavel does not work. However, when you look a the complete article the light box works. I have spent a couple hours trying to figure this out and am totally stumped.

I think this must be some category setting. I just cannot figure out which setting. I do not think it is CSS since the same problem exists on multiple templates. (I have tried it on the Beez template and see the same behavior.)

Have you seen this before?

Cheers,
Todd

Cheers,
Todd Williams

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 10 months ago #133621 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Image lightboxes in text
In some views the modal is not initialised.
You need to add this to your template or in K2's category.php file.
<?php JHTML::_('behavior.modal'); ?>

Another option would be to use another lightbox engine like Swipebox which requires a custom setup or looking for an extension (possibly a plugin for your editor) that offers this functionality out of the box.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum