- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
Joomla. How to remove lightbox, rollover effects and link for gallery items
September 28, 2012
In this tutorial you will learn the way to remove lightbox, rollover and link options in your portfolio page
-
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.
-
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> -
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> -
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; ?>
-
The final step – to remove roll over effect and prevent lightbox scripting remove class:
class="touch"
-
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