support

adding class to breadcrumbs for category page

Started by yonghan, June 01, 2014, 09:29:40 PM

Previous topic - Next topic

yonghan

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 :



$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.

eCommerce Core

Yes, you should be able to do this. See below what this class does.


public function addBreadcrumb($breadcrumb_item = array()) {
if ($breadcrumb_item[ "href" ]) {
$this->breadcrumbs[ ] = $breadcrumb_item;
}
}

yonghan


Forum Rules Code of conduct
AbanteCart.com 2010 -