VISIT AND LIKE OUR PAGE ON FACEBOOK
TAKE A LOOK AT OUR TWEETS ON TWITTER
SUBSCRIBE TO THE JOOMFREAK RSS FEED
VISIT OUR CHANNEL ON YOUTUBE

Account Details

Change your name, email, password or permanently delete your account. Change settings

We offer several ways you can get support from our experts: Support ForumKnowledgebaseNewsletter

Your Forum Posts

No posts to display.

Welcome, Guest
Username Password: Remember me

How to disable link (click) on K2 image item
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: How to disable link (click) on K2 image item

How to disable link (click) on K2 image item 24 Feb 2019 12:56 #11425

Hi,

I know that this is off topic, but on K2 webste I didn't found a discussion about this, so I decided to ask to this community.

I should disable the click on image item. If you create a photo gallery, if you click on the preview, K2 open a new page with some description and picture. I should disable this behaviour, or change it to allow, on click, to display only a modal with the image.

See the pictures attached, when you click, K2 open a new "product" page.

Thank you
Attachments:
  • Attachment This image is hidden for guests. Please log in or register to see it.
  • Attachment This image is hidden for guests. Please log in or register to see it.
Last Edit: 24 Feb 2019 12:58 by me.

  • Posts:75
  • me
  • Senior Boarder
  • OFFLINE
  • Karma: 0

Re: How to disable link (click) on K2 image item 25 Feb 2019 02:38 #11428

This our template doesn't support to display a modal image. You have change some code, can use FancyBox.

joomfreak
The following user(s) said Thank You: me

  • Posts:2893
  • isupport
  • Moderator
  • OFFLINE
  • Karma: 0

Re: How to disable link (click) on K2 image item 03 Mar 2019 06:10 #11438

you might like to use this code.

CODE: SELECT ALL
<div class="itemImageBlock"> <a class="itemImage" href="<?php echo $this->item->link; ?>" title="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->imagemega premium account_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>"> <img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" /> </a> </div>
Last Edit: 20 Jul 2019 11:57 by Nona.

  • Posts:1
  • Nona
  • Fresh Boarder
  • OFFLINE
  • Karma: 0

Re: How to disable link (click) on K2 image item 03 Mar 2019 20:15 #11439

Thank you for your answer.

In which file can I found this code? and which file I need to edit?

Thank you

  • Posts:75
  • me
  • Senior Boarder
  • OFFLINE
  • Karma: 0

Re: How to disable link (click) on K2 image item 04 Mar 2019 02:55 #11440

If you use module, you can edit file templates/jf_thehub/html/mod_k2_content/Grid/default.php at line 109.

joomfreak

  • Posts:2893
  • isupport
  • Moderator
  • OFFLINE
  • Karma: 0
  • Page:
  • 1
Time to create page: 1.21 seconds
Saturday 19 September 2020

joomfreak is not affiliated with or endorsed by the Joomla Project or Open Source Matters.
The Joomla logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.