Keyword

Disable image hyperlink

  • Michael Bond
  • Michael Bond's Avatar Topic Author
  • Offline
  • New Member
More
14 years 8 months ago #80488 by Michael Bond
Disable image hyperlink was created by Michael Bond
On my site I have setup a K2 Category page off of the main menu.  In it I am planning to show some items with a title link and a read more link.  Other I items on the same page I would like to show just the image for the item (and no text). 

 

How do I disable the hyperlink on a category page image in an item?

 

Here's my the page I am working on:

 

64.78.31.57/index.php?option=com_k2&view=itemlist&layout=category&task=category&id=14&Itemid=57

 

Scroll down to the bottom.  I would to disable link for the Texas Instruments logo image and others like it because I don't have any text to add to a page.

 

How can I do this?

 

Thanks.

 

Michael 

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

More
14 years 6 months ago #80489 by robbie
Replied by robbie on topic Disable image hyperlink
Hi Michael,

This is what i did to take out the image link in the K2 category section...

- Using eXplorer, find the template that you are using in the templates folder (e.g. "beez"). In this folder create a folder named "html". Then inside the "html" folder create a folder called "com_k2". Then a folder within the "com_K2" thats called "templates". So the "templates" folder should be like this "(you template here)/html/com_k2/templates". (the reason for doing this is to make a copy of the K2 template folder, so that if you upload newer versions of K2 you will not lose it.)

- Still in eXplorer, go to the "components/com_K2/templates/default" folder. Drag the "default" into the "(your template here)/html/com_k2/templates/" folder. It will ask you if you want to copy or replace, say that you want to copy it. There should now be a folder called "default" like this "(your template here)/html/com_k2/templates/default".

- Go into the "(your template here)/html/com_k2/templates/default" folder and open up the "category_item.php" file.

- Scroll down until you see "div class="catItemImageBlock"", this is the start of the image.

- You can see that there is an "a" tag below (i cant paste the full code into here because it doesnt show up)

- If you take out this full "a" tag it will take away the link. Dont forget to take out the "/a" below it.

- So now you should only be left with the code for the image

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

More
14 years 6 months ago #80490 by william white
Replied by william white on topic Disable image hyperlink
That should change the link for all the images.
If you want to disable only the tx image link, carry the above one step further
after making (your template here)/html/com_k2/templates/default", copy the same to another folder just like it and call it (your template here)/html/com_k2/templates/nolinks.
Make the above changes to it
Create a new category for the items you do not want to show links in
Select the subtemplate no links for that category
Assign the item tx to that category
Be sure to add that category in your category listings of the menu link
Now you can have a mixed listing in the category view

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


Powered by Kunena Forum