Keyword

Item Category Page Image

More
11 years 4 months ago #114205 by Chris
Item Category Page Image was created by Chris
Currently I have my 'Products' page, with several items in a category. When these items are displayed in the category view, the image attached to the item is shown as well.

When I click on the image, the image simply enlarges. I would like to change this so that instead of simply enlarging, the image links to the Item page.

Please let me know how I can do this. I am running Joomla 2.5.11 and K2 2.6.6

Regards,
Chris

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 4 months ago #114206 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Item Category Page Image
Hello Chris,

This is a template specific issue. You need to override your category_item.php.

Look for the <img /> tag it should have a "modal" class. Remove that, that is the trigger for the lightbox effect.
Then look for the title element (it should be inside an <h2> or <h3> element). Copy it's link href attribute and use it to replace the image's link.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
11 years 4 months ago #114207 by Chris
Replied by Chris on topic Re: Item Category Page Image
Hi,

Thanks for the reply.

I cannot find the 'Modal' class. this is what I have:

<!-- Item Image -->
<?php if($this->item->params->get('catItemImage') && !empty($this->item->image)): ?>
<div class="catItemImageBlock">
<span class="catItemImage">
<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); ?>">
<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>
</span>
<div class="clr"></div>
</div>
<?php endif; ?>

Let me know what you think I should be editing/removing?

Thanks,
Chris

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 4 months ago #114208 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Item Category Page Image
Your code look fine actually,

Everything is where it should be. You should look if there is a 3rd party extension which is causing this or if there is another template for the products category. You can check this under the category settings or the menu item settings.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
11 years 4 months ago #114209 by Chris
Replied by Chris on topic Re: Item Category Page Image
Hi,

I can't see anything which would be doing this. Could I perhaps send you the URL, and you could take a quick look?

Much Appreciated.

Chris

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 4 months ago #114210 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Item Category Page Image
Of course.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
11 years 4 months ago #114211 by Chris
Replied by Chris on topic Re: Item Category Page Image
Great! This is the page: bit.ly/15TNl3d

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 4 months ago #114212 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Item Category Page Image
You must have been looking at the wrong template.

I saw from your source code that you have a "modal" class. go to /templates/yourtemplate/html/com_k2/
and check in all your folders the category_item.php files.

You can also find which K2 template is used from the category settings.

OS. also remove the rel="xxx" attribute.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Attachments:

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

More
11 years 4 months ago #114213 by Chris
Replied by Chris on topic Re: Item Category Page Image
I am editing \templates\theme887\html\com_k2\default\category_item.php

As far as I can see it is using a default theme:




Attachment not found

Attachments:

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 4 months ago #114214 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Item Category Page Image
Then the problem lies with your template the template,
Some plugin or framework is not using the default overriding procedure and hierarchy.

I bet if you alter the component files and not the overrides it will work perfectly.

I am sure the template developer will provide you with info regarding this.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum