Keyword

Problems w. modal class (purity III template) despite commonly known workaround

  • Christoph Meyer
  • Christoph Meyer's Avatar Topic Author
  • Offline
  • New Member
More
4 years 10 months ago #172264 by Christoph Meyer
Hi!

I am webmaster of the page of our fire department and I have a (new) problem with the modal class.
The template I use is purity III (JA).

Times ago the item-image didn't appear, so I searched for a solution and created a override k2.css with the commonly known workaround:

#k2Container a.modal {
border: 0px;
display: inline-block;
overflow:hidden;
margin: 0 10px 0 0;
position: relative;
top: auto;
left: 0px;
width: auto;
z-index: 0;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
-webkit-box-shadow: 0 0 0 0;
-moz-box-shadow: 0 0 0 0;
box-shadow: 0 0 0 0;
}

Everything was fine, but now there is a new problem:
By klicking on the image to enlarge, it doesn't appear in a modal. The site ist just loading the picture, like it was just a link.

I'm sorry - it is hard for me to explain since english is not my native language.

Just have a look on the homepage of my fire department:
www.feuerwehr-nienburg.de/index.php/2019/item/417-ein-etwas-unruhiger-jahreswechsel


I hope you can help me. Thank's

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

More
4 years 10 months ago #172274 by JoomlaWorks
You need to add a special HTML attribute on the link (<a>) that wraps the <img> element as seen here: github.com/getk2/k2/blob/master/components/com_k2/templates/default/item.php#L198

The attribute is: data-k2-modal="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.

  • Christoph Meyer
  • Christoph Meyer's Avatar Topic Author
  • Offline
  • New Member
More
4 years 10 months ago #172281 by Christoph Meyer
Okay - now it works...

Thank you very much!

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

More
4 years 10 months ago #172285 by JoomlaWorks
You're welcome.

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