- Posts: 2
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Problems w. modal class (purity III template) despite commonly known workaround
Problems w. modal class (purity III template) despite commonly known workaround
- Christoph Meyer
-
Topic Author
- Offline
- New Member
Less
More
5 years 11 months ago #172264
by Christoph Meyer
Problems w. modal class (purity III template) despite commonly known workaround was created 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
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.
- JoomlaWorks
-
- Offline
- Admin
Less
More
- Posts: 6227
5 years 11 months ago #172274
by JoomlaWorks
Replied by JoomlaWorks on 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"
The attribute is: data-k2-modal="image"
Please Log in or Create an account to join the conversation.
- Christoph Meyer
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 2
5 years 11 months ago #172281
by Christoph Meyer
Replied by Christoph Meyer on topic Problems w. modal class (purity III template) despite commonly known workaround
Okay - now it works...
Thank you very much!
Thank you very much!
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
Less
More
- Posts: 6227
5 years 11 months ago #172285
by JoomlaWorks
Replied by JoomlaWorks on topic Problems w. modal class (purity III template) despite commonly known workaround
You're welcome.
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- Problems w. modal class (purity III template) despite commonly known workaround