Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum
Welcome, Guest

Image of the k2 element with a link to this element
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Image of the k2 element with a link to this element

Image of the k2 element with a link to this element 1 year, 7 months ago #41891

Image of the k2 element with a link to this element. How to do it in this module? Just like in the demo: demo.smartaddons.com/extensions/joomla3/sj-k2-slick-slider. Thank you for your help.

Re: Image of the k2 element with a link to this element 1 year, 7 months ago #41892

Yes, you can link the image of an article to the article itself. /templates/[YOUR-THEME]/html/mod_sj_k2_slickslider/default.php
<?php 
					$img = K2SlickSliderHelper::getK2Image($item, $params);					
					$img = ImageHelper::init($img)->src();
					
					if(!file_exists($img)){
						$img = 'modules/'.$module->module.'/assets/images/nophoto.jpg';
					}
					
					$img = (strpos($img,'http://') !== false || strpos($img,'https://') !== false)?$img:(JURI::root().$img);
					
    		if ($img): ?>
    		<div class="item-image">
    			<div class="item-image-inner">
					<a href="<?php echo $item->link; ?>" title="<?php echo $item->displaytitle; ?>" <?php echo K2SlickSliderHelper::parseTarget($params->get('item_link_target')); ?> >					
		            	<img alt="<?php echo $item->displaytitle;?>" src="<?php echo $img;?>"/>					
					</a>
				</div>
			</div>
			<?php endif; ?>
The following user(s) said Thank You: andrzejgajewski

Re: Image of the k2 element with a link to this element 1 year, 7 months ago #41894


It works! Thank you very much!

Re: Image of the k2 element with a link to this element 1 year, 7 months ago #41908

That's great.
  • Page:
  • 1
Time to create page: 0.41 seconds

Notification

Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Suggested Posts

(/)
Result not found!

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Home Pricing
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
SearchSupport
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes