If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)

captcha

Featured templates

Joomla. How to remove lightbox, rollover effects and link for gallery items

In this tutorial you will learn the way to remove lightbox, rollover and link options in your portfolio page

  1. Open the following folder in your Joomla root folder:

    templates/your_template_folder/html/com_k2/templates/portfolio

    To alter image options you need to open “category-item.php” file in any text editor.

  2. Scroll until you see block starting with “span class=”catItemImage“:

    <span class="catItemImage">
    <?php if($this->params->get('itemImageXL') !== 0): ?>
    <a class="touch" href="<?php echo $this->item->imageXLarge; ?>" title="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_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); ?>"/> <span class="zoomIcon"></span> </a>
    <?php else: ?>
    <a class="touch" href="<?php echo $this->item->image; ?>" title="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_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); ?>"/> <span class="zoomIcon"></span> </a>
    <?php endif; ?>
    </span>
  3. You need to edit the first block for link:

    					<a class="touch" href="<?php echo $this->item->imageXLarge; ?>" title="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_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); ?>"/>
    <span class="zoomIcon"></span>
    </a>
  4. Remove or replace the following line to change linking – for example to work same as for titles – open category item:

    					<?php echo $this->item->imageXLarge; ?>
    				

    If you need to make it work same as title link place the following script instead:

    					<?php echo $this->item->link; ?>
    				
  5. The final step – to remove roll over effect and prevent lightbox scripting remove class:

    					class="touch"
    				
  6. After you’ve edited page template – save it and test your website. It will work like a charm.

Thank you for paying attention to our video tutorials. Please contact us if you have any issues in editing the template. Good Luck!!!

Feel free to check the detailed video tutorial below:

Joomla. How to remove lightbox, rollover effects and link for gallery items