- Posts: 5
COMMUNITY FORUM
K2 - where's Linked Titles can be disabled?
- Head
- Topic Author
- Offline
- New Member
Less
More
5 years 4 months ago #172570
by Head
K2 - where's Linked Titles can be disabled? was created by Head
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?
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?
Please Log in or Create an account to join the conversation.
- Head
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
5 years 4 months ago #172590
by Head
Replied by Head on 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.
- JoomlaWorks
- Away
- Admin
Less
More
- Posts: 6218
5 years 4 months ago #172626
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on 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.
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.
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Head
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
5 years 4 months ago #172628
by Head
Replied by Head on 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.
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.
- JoomlaWorks
- Away
- Admin
Less
More
- Posts: 6218
5 years 4 months ago - 5 years 4 months ago #172629
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on 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)
Edit: why would the page title be linked either way... (doesn't make sense)
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Last edit: 5 years 4 months ago by JoomlaWorks.
Please Log in or Create an account to join the conversation.
- Head
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
5 years 4 months ago - 5 years 4 months ago #172633
by Head
Replied by Head on 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...
UPD. Actually i'll also check ALL template files, maybe template developer made it wrong way...
Last edit: 5 years 4 months ago by Head. Reason: Update
Please Log in or Create an account to join the conversation.
- Head
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
5 years 4 months ago #172634
by Head
Replied by Head on 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.
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.
- JoomlaWorks
- Away
- Admin
Less
More
- Posts: 6218
5 years 4 months ago #172639
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on 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.
As you said, perhaps some HTML ended up in the wrong place by your template developer.
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.