- Posts: 66
COMMUNITY FORUM
Wrong breadcrumb on tag-sites
- burnyourears
-
Topic Author
- Offline
- Senior Member
I noticed something strange concerning the breadcrumbs on my tag-sites. The category / origin of the crumb is sometimes right, often wrong … it seems like random. But the thing ist – I don't want to show the category anyway.
On tag-sites I just want to show a breadcrumb category "Tags" instead. Like this: Home > Tags > ...
How could I do that? (I mean I cannot build a new category site for every tag in a hidden menue ... ;-) )
Or ... a good alternative would be to switch off breadcrumbs on tag-sites completely. But how could I do that? (I cannot address something like a "tag-site" in the modul-settings to switch it off there because there simply isn't any ...)
Thank you for any help :-)
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Clean your site's cache and check again.
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- burnyourears
-
Topic Author
- Offline
- Senior Member
- Posts: 66
Why is it the category "news"? Why can't it be the category "tags"? (Or no breadcrumb at all ...?)
> Adding another point: There is no headline on these sites. And the title tag is not "Tags for Metallica" or something that would make sense here, but "Rock and Metal News" = the (wrong) category from the breadcrumb.
Strange... ;-)
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
The path you see there is basically the path you followed to get to that page. That's one of the visual/structural bugs that K2 has solved ages ago over standard Joomla content (in Joomla, if you navigate e.g. from the frontpage to an article which has no direct menu item, the menu item ID remains the same - that of the frontpage).
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- burnyourears
-
Topic Author
- Offline
- Senior Member
- Posts: 66
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
What K2 version are you using?
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- burnyourears
-
Topic Author
- Offline
- Senior Member
- Posts: 66
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- burnyourears
-
Topic Author
- Offline
- Senior Member
- Posts: 66
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- burnyourears
-
Topic Author
- Offline
- Senior Member
- Posts: 66
<?php
$safe = array("'");
$nonsafe = array("'");
$safemeta = str_replace( $nonsafe, $safe, $this->item->title);
$newtitle = ($safemeta . 'Artikelübersicht');
$document = JFactory::getDocument();
$document->setTitle($newtitle);
?>
Which code do I need to readout the related tag?
It should look like this:
$newtitle = ($safemeta . 'Artikelübersicht zu TAG');
And I want to modify the headline also:
<h1>Artikelübersicht zu TAG</h1>
Thanks for help :-)
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
The file you want to edit is "tag.php".
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- burnyourears
-
Topic Author
- Offline
- Senior Member
- Posts: 66
I just want to know how to get the "tag" into the site, for example into the h1. Something like
<?php if($this->params->get('show_tag')): ?>
???
Please Log in or Create an account to join the conversation.
- burnyourears
-
Topic Author
- Offline
- Senior Member
- Posts: 66
I want to display the name of the active tag (on this site -> tag.php) but couldn't do that, i was trying to fetch it with:
<?php echo $this->escape($this->params->get('page_title')); ?>
This didn't work, it just shows the name of the site ... and not the name of the tag.
How can I display the active tag as part of my h1?
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
<?php echo $this->params->get('page_title_clean'); ?>
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
<?php echo JRequest::getString('tag'); ?>
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- burnyourears
-
Topic Author
- Offline
- Senior Member
- Posts: 66
Can I place it as the title-tag, too? Can you tell me what to do here with it?
$newtitle = ($safemeta . 'Artikelübersicht');
(The complete code I use to set the title tag:)
<?php
$safe = array("'");
$nonsafe = array("'");
$safemeta = str_replace( $nonsafe, $safe, $this->item->title);
$newtitle = ($safemeta . 'Artikelübersicht');
$document = JFactory::getDocument();
$document->setTitle($newtitle);
?>
Please Log in or Create an account to join the conversation.
- burnyourears
-
Topic Author
- Offline
- Senior Member
- Posts: 66
<?php
$safe = array("'");
$nonsafe = array("'");
$safemeta = str_replace( $nonsafe, $safe, $this->item->title);
$newtitle = ($this->params->get('page_title_clean') . ' | My Site Name');
$document = JFactory::getDocument();
$document->setTitle($newtitle);
?>
Please correct me if I am wrong, but it works on my site.
Thank you for your kind help!
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Other than that, it looks fine.
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- burnyourears
-
Topic Author
- Offline
- Senior Member
- Posts: 66
Please Log in or Create an account to join the conversation.