AbanteCart Community

Shopping Cart Operations => Support => Template Support => Topic started by: yonghan on June 01, 2014, 09:29:40 PM

Title: adding class to breadcrumbs for category page
Post by: yonghan on June 01, 2014, 09:29:40 PM
hi.i have this situation,i want to add class to breadcrumbs by adding field in the addbreadcrumbs function.is it possible to do that?so i can do like this :

Code: [Select]

$this->document->addBreadcrumb( array (
        'href'      => $this->html->getSEOURL('product/category','&path=' . $path, '&encode'),
        'text'      => $category_info['name'],
                                         'class' => 'some string',
        'separator' => $this->language->get('text_separator')
        ));

So i access the class value on the breadcrumbs.tpl.

Thanks a lot.
Title: Re: adding class to breadcrumbs for category page
Post by: eCommerce Core on June 23, 2014, 08:08:56 AM
Yes, you should be able to do this. See below what this class does.

Code: [Select]
public function addBreadcrumb($breadcrumb_item = array()) {
if ($breadcrumb_item[ "href" ]) {
$this->breadcrumbs[ ] = $breadcrumb_item;
}
}
Title: Re: adding class to breadcrumbs for category page
Post by: yonghan on June 23, 2014, 09:49:21 AM
Thanks a lot,i'll try it.