Keyword

Remove links on Breadcrumbs

More
12 years 1 month ago #102171 by Tadeo
Remove links on Breadcrumbs was created by Tadeo
I would like to remove the link to the categories showed in the Breadcrumbs (using K2 Tools component). This was available on the ordinary breadcrumbs for J1.5 but in K2 Tools there´s no option. (Now I´m using J2.5 with latest K2 2.5.7)

I look at the breadcrumbs.php on /modules/mod_k2_tools/tmpl/breadcrumbs.php and as I can understand it publishe the links with this code.

(starts at line 33)
if (count($path)) {
foreach ($path as $link) {
$output .= $link.'<span class="bcSeparator">'.$params->get('seperator','&raquo;').'</span>';
}

I guess it have to do with the "$link" but I don´t know how to change it.

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

More
12 years 1 month ago #102172 by Tadeo
Replied by Tadeo on topic Re: Remove links on Breadcrumbs
OK I found it!
I post it just in case it could help somebody...

It´s 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 "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

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


Powered by Kunena Forum