Guest
05 Nov 2013 05:50

When I navigate through my categories in cobalt 7 the breadcrumb trail (standard Joomla breadcrumb module) is shown correctly. When I get to a record and view the record, the breadcrumb changes to just show the category the record is in rather than the full trail. The URL now points to the component rather than the path used for categories. For example, When I am viewing all the records in the Mentoring category, my URL is this:

/ka/category-items/1-ka/3-mentoring

The breadcrumb trail is KA -> Applications -> Petrel (configured to not show last item)

When I click the record in the Mentoring category, the breadcrumb trail is just "Mentoring" and the URL is:

/component/cobalt/item/3-mentoring/22-jesse-ventura?Itemid=1420

Is there a setting I can change to show the full category path to the record?

Last Modified: 02 Mar 2014


Sergey
Total posts: 13,748
05 Nov 2013 22:55

For URL there is parameter to show full category path in Cobalt configuration SEO tab.

For breadcrumbs there is no parameters. This is planned for Cobalt 9 as SEO improvements.


Guest
06 Nov 2013 05:51

If there is no way to get the breadcrumbs working properly right now, is there a way you can recommend to indicate to my users where they are in the category hierarchy when viewing a record?


Sergey
Total posts: 13,748
06 Nov 2013 06:27

Only indicate current category. The one this record is in.


Guest
11 Nov 2013 18:38

I browsed through various templates and came up with the following to display something like a breadcrumb trail at the top of my articles. I'm not sure if it's the most efficient way to do it but it works. The only thing I haven't figured out is how to get the root url for the section. Just add the following to your article template:

<?php   

        $this->models['categories'] = JModel::getInstance('Categories', 'CobaltModel');

        $categories = $this->models['categories']->getParentsObjectsByChild($this->category->parent_id);

        foreach ($categories as $cat) { 

                echo '<a href="'.Url::records($this->section, $cat).'">'.$cat->title.'</a>&nbsp;&nbsp;&gt;&nbsp;&nbsp;';

        }       

        echo '<a href="'.$this->category->link.'">'.$this->category->title.'</a>';

?>  

Sergey
Total posts: 13,748
12 Nov 2013 01:31

The only thing I haven't figured out is how to get the root url for the section

Url::records($this->section)


Guest
12 Nov 2013 03:34

So simple :) Thanks Sergey. I think this will do exactly what I needed.

Powered by Cobalt