how to display breadcrumb in between left and right column?
Posted: Mon Dec 28, 2009 11:47 am
Can I know what file o edit in order to get the breadcrumb display between left and right column(above the page content and not in the header file)?
I tried to cut and paste the breadcrumb script from the header.tpl to a new breadcrumb.tpl file.
Then I create a new breadcrumb.php in controller/common
Finally I testing it in the product page by adding <?php echo $breadcrumbs; ?> somewhere in the product.tpl
However, it shows:
I tried to cut and paste the breadcrumb script from the header.tpl to a new breadcrumb.tpl file.
Code: Select all
<div id="breadcrumb">
<?php foreach ($breadcrumbs as $breadcrumb) { ?>
<?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
<?php } ?>
</div>
Code: Select all
<?php
class ControllerCommonBreadcrumb extends Controller {
protected function index() {
$this->language->load('common/header');
$this->data['breadcrumbs'] = $this->document->breadcrumbs;
$this->id = 'breadcrumb';
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/breadcrumb.tpl')) {
$this->template = $this->config->get('config_template') . '/template/common/breadcrumb.tpl';
} else {
$this->template = 'default/template/common/breadcrumb.tpl';
}
$this->render();
}
}
?>
However, it shows:
May I know anything wrong with my code? Thank you!Notice: Undefined variable: breadcrumbs in /home/mysite/public_html/catalog/view/theme/default/template/product/product.tpl on line 8