Keyword

K2 Breadcrumbs Linking Problem

  • Brian Smith
  • Brian Smith's Avatar Topic Author
  • Offline
  • New Member
More
12 years 6 months ago - 12 years 6 months ago #63671 by Brian Smith
K2 Breadcrumbs Linking Problem was created by Brian Smith
I'm having a problem with K2 breadcrumbs linking back correctly to the page it should. When clicking the link it pulls all items in that particular category into one a page and removes the formatting on the page.

I'd like to change the URL the breadcrumb entry is pointing to is this possible?

Site can be viewed here: 173.199.153.102/index.php?option=com_k2&view=item&layout=item&id=40&Itemid=35

Click the >programs breadcrumb at the top and can see an example. Thanks in advance for the help!!

Brian

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

More
12 years 5 months ago #63672 by Jordan
Replied by Jordan on topic Re: K2 Breadcrumbs Linking Problem
Hey, I was wondering if anyone ever responded to your question, as I too, have the same problem of failing to correctly link k2 items in breadcrumbs. If you did get a response or simply figured it out yourself, I would greatly appreciate it if you shared the solution.

Thanks in advance!

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

More
12 years 1 month ago #63673 by Tadeo
Replied by Tadeo on topic Re: K2 Breadcrumbs Linking Problem
There´s an extension but is expensive (well depends...). It´s quite complete
extensions.joomla.org/extensions/structure-a-navigation/site-navigation/12148
you can modify the structure of the breadcrumbs and include -for example- menu items and not categories.

I had a similar problem, but in this case I resolved to remove the links from breadcrumbs and depend only on main navigation.

To remove the links to the categories (i left the <a> tag just to looks like a link but it doesn´t work)

On the
modules/mod_k2_tools/helper.php (this file controls all the functions of the K2 Tools)
line 689
----
foreach ($rows as $row) {
array_push($array, '<a href="'.urldecode(JRoute::_(K2HelperRoute::getCategoryRoute($row->id.':'.urlencode($row->alias)))).'">'.$row->name.'</a>');
modK2ToolsHelper::getCategoryPath($row->parent);
}

just remove the whole href attribute and left the <a> For my purposes it works.
However this modify a whole function that it´s used by other options of K2 Tools... maybe it should be better to duplicate the code and define another array to use with breadcrumbs.php

Any way here you can modify the <a> link. If you know how to handle it, you can include the link you want.

I hope this help a little

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


Powered by Kunena Forum