I will not give the detail but rather I will give you the logic.
So, here it is:
1. The key concept is using replacer, please refer to bredcrumb config file.
2. Another concept is you can put replacer on controller (again, please read config). This mean you can process the replacer with database, i.e:
Code:
$this->config->load('breadcrumb');
$prod_id = $this->uri->segment(3);
$prod_name = $this->model_xxx->get_name($prod_id);
$parent_name = $this->model_xxx->get_parent($prod_id);
if ($parent_name) { // if has parent then add new breadcrumb trail
// add & change breadcrumb (see breadcrumb config)
$this->config->set_item('replacer_embed', array('categories'=>'', 'display_product'=>'', $prod_id=>array('/categories/display/product/'.$prod_id|$parent_name, '/categories/display/product/'.$prod_id|$prod_name));
} else { // don't have parent so just put the product name
$this->config->set_item('replacer_embed', array('categories'=>'', 'display_product'=>'', $prod_id=>array('/categories/display/product/'.$prod_id|$prod_name));
}
Hope that could make you catch the ideas.
Please let me know your progress...