Post by riwakawebsitedesigns » Mon Feb 24, 2014 5:11 pm

Hi I would like to know what I need to do to be able to add breadcrumbs to the controller of the home controller.


Posts

Joined
Fri Dec 20, 2013 11:05 am

Post by ocaddons » Fri Feb 28, 2014 10:26 pm

Hi,

It's easy to achieve as follows:

Step 1. Go to catalog > controller > common > home.php.

-- Find the following line:

Code: Select all

$this->data['heading_title'] = $this->config->get('config_title');
-- Add following code snippet after the line:

Code: Select all

$this->data['breadcrumbs'] = array();
		
		$this->data['breadcrumbs'][] = array(
				'text'      => $this->language->get('text_home'),
				'href'      => $this->url->link('common/home'),
				'separator' => false
		);

Step 2. Go to catalog/view/theme/default/template/common/home.tpl.

-- Find following line:

<div id="content"><?php echo $content_top; ?>

-- Add following code snippet after it:

Code: Select all

 <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
Please try it. If you need my assistance, please contact me via ocaddons@gmail.com. I could solve any issue in ecommerce store.

Image
Image

EMail: support@ocaddons.com


User avatar
New member

Posts

Joined
Fri Dec 27, 2013 10:21 am

Who is online

Users browsing this forum: No registered users and 3 guests