Author Topic: adding class to breadcrumbs for category page  (Read 4416 times)

yonghan

  • Guest
adding class to breadcrumbs for category page
« 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.
« Last Edit: June 01, 2014, 09:32:18 PM by yonghan »

Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1602
  • Karma: +93/-1
    • View Profile
Re: adding class to breadcrumbs for category page
« Reply #1 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;
}
}
“If you’re in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent.”
― Warren Buffett

yonghan

  • Guest
Re: adding class to breadcrumbs for category page
« Reply #2 on: June 23, 2014, 09:49:21 AM »
Thanks a lot,i'll try it.

 

Powered by SMFPacks Social Login Mod