Keyword

Disable link on category title

  • Ivan Biolley
  • Ivan Biolley's Avatar Topic Author
  • Offline
  • New Member
More
9 years 2 months ago #140148 by Ivan Biolley
Disable link on category title was created by Ivan Biolley
Hi friends!

How can I disable the link on category's title?? I have a category named "Blog" and if you click on its title, it will open the same "Blog" category, so it has no sense and I don't like links on categories titles...

Please help!

Thank you a lot!

Ivan

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 2 months ago #140160 by Krikor Boghossian
Replied by Krikor Boghossian on topic Disable link on category title
You could either the category entirely from your category's settings or you could override the category_item.php file and remove the link element.
More on overriding can be found here: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

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

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

  • Ivan Biolley
  • Ivan Biolley's Avatar Topic Author
  • Offline
  • New Member
More
9 years 2 months ago #140173 by Ivan Biolley
Replied by Ivan Biolley on topic Disable link on category title
Thank you Krikor!

Is there any way to remove it from the K2 settings without overriding??? I mean if you select catalog mode there is not link on category title, so maybe it can be changed on settings...

Overriding:

And wich code do I have to remove/edit??? I don't know a lot of PHP or CSS, (just to make little changes on a given code) so I really appreciate your help to find the right code...

Thank you a lot for your nice help!

Ivan

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 2 months ago #140187 by Krikor Boghossian
Replied by Krikor Boghossian on topic Disable link on category title
Not unless you want to lose your changes when you update.
There are two links, the subcategory's links is not linkable, while the item's category in the list is linkable.

IN your category_item.php for a code similar to this.
a href="<?php echo $this->item->category->link; ?>"><?php echo $this->item->category->name; ?></a>

and only keep this line
<?php echo $this->item->category->name; ?>

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