Keyword

K2 - where's Linked Titles can be disabled?

More
1 month 2 days ago #172570 by Head
Head created the topic: K2 - where's Linked Titles can be disabled?
In Joomla menu item options we can disable linking title to current page - see screen. How to disable it for K2?
So far i found this in my template code
<h1><?php echo $this->escape($this->params->get('page_title')); ?></h1>
so it's generated straight with link which is not what I need.
Any suggestions on K2 settings or code alteration?
Attachments:

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

More
4 weeks 1 day ago #172590 by Head
Head replied the topic: K2 - where's Linked Titles can be disabled?
It's weird - i can see reply when logged off, and once i login it's not here. Anyway it's wrong answer - i don't need to hide menu item, i need to disable link on page title.

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
4 weeks 19 hours ago #172626 by Fotis
Fotis replied the topic: K2 - where's Linked Titles can be disabled?
This is an edge case really. It may exist in Joomla Articles, but a whole bunch of other weird stuff do too.

K2 is based on common sense configurations.

If you fall into an edge case, you can just utilize K2 template overriding to modify and remove the link for K2 item titles.

First off, basic K2 templating: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

Then you must edit category_item.php, locate where the title is output (it should be wrapped by an <a> tag), remove the <a> tag and save. Links will now be gone from the category listings.

If you need to do this for select categories, you can create a 2nd sub-template group inside your Joomla template, for K2 overrides (e.g. /templates/YOUR_TEMPLATE/html/com_k2/NoLinksForItems/category_item.php). Then head over to your categories and select the "NoLinksForItems" subtemplate to use. Done.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

More
4 weeks 19 hours ago #172628 by Head
Head replied the topic: K2 - where's Linked Titles can be disabled?
Sorry, i thought i was clear enough - there's no <a> tag in template,
it's core-related, as template uses $this->params->get('page_title') which returns title already wrapped into anchor.

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
4 weeks 19 hours ago - 4 weeks 19 hours ago #172629 by Fotis
Fotis replied the topic: K2 - where's Linked Titles can be disabled?
This is the page title and it's not linked by default. So what's the issue?

Edit: why would the page title be linked either way... (doesn't make sense)

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member
Last edit: 4 weeks 19 hours ago by Fotis.

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

More
4 weeks 18 hours ago - 4 weeks 18 hours ago #172633 by Head
Head replied the topic: K2 - where's Linked Titles can be disabled?
On affected site it comes linked with no <a> templated. Can you please point me to related file in core?

UPD. Actually i'll also check ALL template files, maybe template developer made it wrong way...
Last edit: 4 weeks 18 hours ago by Head. Reason: Update

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

More
4 weeks 17 hours ago #172634 by Head
Head replied the topic: K2 - where's Linked Titles can be disabled?
prntscr.com/ojdzxy

Links to items is ok, but i was required to disable category title as found no other solution so far.

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
4 weeks 16 hours ago #172639 by Fotis
Fotis replied the topic: K2 - where's Linked Titles can be disabled?
Read this to understand K2 templating: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

As you said, perhaps some HTML ended up in the wrong place by your template developer.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

Moderators: william white

Powered by Kunena Forum