Keyword

K2 Modal Window

  • Milan Sadil
  • Milan Sadil's Avatar Topic Author
  • Offline
  • New Member
More
8 months 2 hours ago #171704 by Milan Sadil
Milan Sadil created the topic: K2 Modal Window
item.php override contains the following code:

<script type="text/javascript">
window.addEvent('domready', function(){
SqueezeBox.assign($$('a.k2Modal'), {
parse: 'rel'
});
});
</script>

When a page containing the code is opened in a browser the following error is generated:

Uncaught TypeError: window.addEvent is not a function

Perhaps it is a matter of using an obsolete MooTools function (I just upgraded to K2 2.9.0 and Joomla 3.9.5), but I have no idea what to use instead of this. Can you direct me the right way?

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

  • Fotis
  • Fotis's Avatar
  • Away
  • Administrator
  • JoomlaWorks Support Team
More
7 months 3 weeks ago #171751 by Fotis
Fotis replied the topic: K2 Modal Window
Just remove that part and make sure you add data-k2-modal="image" to the <a> element wrapping your main K2 item image (so you still have a working lightbox/modal to the XL image).

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Milan Sadil
  • Milan Sadil's Avatar Topic Author
  • Offline
  • New Member
More
4 months 1 week ago #172721 by Milan Sadil
Milan Sadil replied the topic: K2 Modal Window
Can you please advice where I can 'add data-k2-modal="image" to the <a> element wrapping your main K2 item image' - so it is applied to every article (K2 item)?

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

  • Fotis
  • Fotis's Avatar
  • Away
  • Administrator
  • JoomlaWorks Support Team
More
4 months 1 week ago #172730 by Fotis
Fotis replied the topic: K2 Modal Window
This line: github.com/getk2/k2/blob/master/components/com_k2/templates/default/item.php#L198

In any case, always compare your template overrides with the source overrides in /components/com_k2/templates/.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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


Powered by Kunena Forum