Keyword

Module - Image Link

  • François Marcotte
  • François Marcotte's Avatar Topic Author
  • Offline
  • New Member
More
12 years 1 week ago #104055 by François Marcotte
Module - Image Link was created by François Marcotte
Hi everyone !
I will like to delete the link in the image, in the module position

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

  • François Marcotte
  • François Marcotte's Avatar Topic Author
  • Offline
  • New Member
More
12 years 1 week ago #104056 by François Marcotte
Replied by François Marcotte on topic Re: Module - Image Link
the module si K2 Content...

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

More
12 years 1 week ago #104057 by Chris
Replied by Chris on topic Re: Module - Image Link
Hi,

What version of Joomla / K2 are you running off of?

I am not entirely sure if the module K2 Content can have the image link removed simply through the parameter. I never really paid attention to that bit since i've never had the need to remove the link from the image. I think as long as the image is set to "Display" the image automatically takes on the hyperlink. I personally wouldn't be concerned about having the hyperlink on the image removed since the image or title are in most cases the first items a person hovers over and in turn links the user to the destination.

To remove the hyperlink directly from the image via code, you would have to go to

your_root/modules/mod_k2_content/tmpl/yourtemplatename/default.php

/yourtemplatename/ by K2 default would be called /Default/

It all depends on what module template you're using if you're even using an alternative.

You'll have to look for the following code
<a class="moduleItemImage" href="<?php echo $item->link; ?>" title="<?php echo JText::_('K2_CONTINUE_READING'); ?> &quot;<?php echo K2HelperUtilities::cleanHtml($item->title); ?>&quot;">
	      	<img src="<?php echo $item->image; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($item->title); ?>"/>
	      </a>

Good Luck, if you need any help just let me know :)

Chris

Seamuno - Web & Social Media Design and Development
Join us on Facebook Today
Add me on Skype: Seamuno

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

  • François Marcotte
  • François Marcotte's Avatar Topic Author
  • Offline
  • New Member
More
12 years 1 week ago #104058 by François Marcotte
Replied by François Marcotte on topic Re: Module - Image Link
Thanks it works !
I put this :
<a class="moduleItemImage" href="#">
<img src="<?php echo $item->image; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($item->title); ?>"/>
</a>


But when I try to set up pop-up like that, it doesn't work :

<a class="modal" rel="{handler: 'image'}" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>">
<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>

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


Powered by Kunena Forum