Hi,
I would like to change the behaviour of an item image when listing items in a category blog view. Instead of a link to the article I would like to open a modal popup when the image thumbnail is clicked.
In my override I replaced the
<a href="<?php echo $this->item->link; ?>" title="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>">
with:
<a class="modal" rel="{handler: 'image'}" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>">
inside <span class="catItemImage"> in category_item.php, but that only resulted in the image opening in a new web browser tag, not in the nice modal popup that appears when you click a thumbnail in article view.
Obviously I miss something, but what?
Best regards
I would like to change the behaviour of an item image when listing items in a category blog view. Instead of a link to the article I would like to open a modal popup when the image thumbnail is clicked.
In my override I replaced the
<a href="<?php echo $this->item->link; ?>" title="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>">
with:
<a class="modal" rel="{handler: 'image'}" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>">
inside <span class="catItemImage"> in category_item.php, but that only resulted in the image opening in a new web browser tag, not in the nice modal popup that appears when you click a thumbnail in article view.
Obviously I miss something, but what?
Best regards