Keyword

K2 Modal Window

  • Milan Sadil
  • Milan Sadil's Avatar Topic Author
  • Offline
  • New Member
More
5 years 2 weeks ago #171704 by Milan Sadil
K2 Modal Window was created by Milan Sadil
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.

More
5 years 1 week ago #171751 by JoomlaWorks
Replied by JoomlaWorks on 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).

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

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

  • Milan Sadil
  • Milan Sadil's Avatar Topic Author
  • Offline
  • New Member
More
4 years 8 months ago #172721 by Milan Sadil
Replied by Milan Sadil on 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.

More
4 years 8 months ago #172730 by JoomlaWorks
Replied by JoomlaWorks on 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/.

Fotis / 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