Keyword

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

  • Christoph Meyer
  • Christoph Meyer's Avatar Topic Author
  • Offline
  • New Member
More
3 weeks 5 days ago #172264 by Christoph Meyer
Christoph Meyer created the topic: Problems w. modal class (purity III template) despite commonly known workaround
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.

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
3 weeks 4 days ago #172274 by Fotis
Fotis replied the topic: Problems w. modal class (purity III template) despite commonly known workaround
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"

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.

  • Christoph Meyer
  • Christoph Meyer's Avatar Topic Author
  • Offline
  • New Member
More
3 weeks 3 days ago #172281 by Christoph Meyer
Christoph Meyer replied the topic: Problems w. modal class (purity III template) despite commonly known workaround
Okay - now it works...

Thank you very much!

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
3 weeks 3 days ago #172285 by Fotis
Fotis replied the topic: Problems w. modal class (purity III template) despite commonly known workaround
You're welcome.

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.

Moderators: william white

Powered by Kunena Forum