In catalog/controller/common/header.php
before the line that says
add this code
Code: Select all
$this->data['text_information'] = $this->language->get('text_information');
$this->load->model('catalog/information');
$this->data['informations'] = array();
foreach ($this->model_catalog_information->getInformations() as $result) {
$this->data['informations'][] = array(
'title' => $result['title'],
'href' => $this->url->link('information/information', 'information_id=' . $result['information_id'])
);
}
In catalog/view/theme/bleen(or grebleen2)/template/common/header.tpl
find the code:
<?php if ($categories) { ?>
<div id="menu">
<ul>
<?php foreach ($categories as $category) { ?>
<li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
<?php if ($category['children']) { ?>
<div>
<?php for ($i = 0; $i < count($category['children']);) { ?>
<ul>
<?php $j = $i + ceil(count($category['children']) / $category['column']); ?>
<?php for (; $i < $j; $i++) { ?>
<?php if (isset($category['children'][$i])) { ?>
<li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
<?php } ?>
</div>
<?php } ?>
</li>
<?php } ?>
</ul>
</div>
<?php } ?>
And replace it with:
Code: Select all
<?php if ($categories) { ?>
<div id="menu">
<ul>
<li><span>Categories</span>
<div>
<?php for ($i = 0; $i < count($categories);) { ?>
<ul>
<?php $j = $i + ceil(count($categories) / 4); ?>
<?php for (; $i < $j; $i++) { ?>
<?php if (isset($categories[$i])) { ?>
<li><a class="galben" href="<?php echo $categories[$i]['href']; ?>"><?php echo $categories[$i]['name']; ?></a>
<?php if ($categories[$i]['children']) { ?>
<div>
<ul>
<?php foreach ($categories[$i]['children'] as $copil) { ?>
<li><a class="copil" href="<?php echo $copil['href']; ?>"><?php echo $copil['name']; ?></a></li>
<?php } ?>
</ul>
</div>
<?php } ?>
</li>
<?php } ?>
<?php } ?>
</ul>
<?php } ?>
</div>
</li>
<li><span><?php echo $text_information; ?></span>
<div>
<ul>
<?php foreach ($informations as $information) { ?>
<li><a href="<?php echo $information['href']; ?>"><?php echo $information['title']; ?></a></li>
<?php } ?>
</ul>
</div>
</li>
<li><a href="sample link">Sample link</a></li>
</ul>
</div>
<?php } ?>
Then edit the stylesheet of the bleen template (catalog/view/theme/bleen/stylesheet/stylesheet.css)
At the end of it add:
Code: Select all
#menu > ul > li > div > ul > li > a.galben {
color: #fff;
font-weight: bold;
padding-left: 12px;
background: url('../image/parent.png') left center no-repeat;
}
#menu > ul > li > div > ul > li:hover > a.galben {
background: #92cb5b url('../image/parent.png') left center no-repeat;
}
#menu > ul > li > div > ul > li > div > ul > li > a.copil {
color: #92cb5b;
padding-left: 20px;
background: url('../image/child.png') left center no-repeat;
}
#menu > ul > li > div > ul > li > div > ul > li:hover > a.copil {
background: #999 url('../image/child.png') left center no-repeat;
}
The 2 atached images , upload them in the image folder of the bleen template.
Also , for the code that needs to be added to the header.tpl , notice this line:
Code: Select all
<li><a href="sample link">Sample link</a></li>
That is an example on where and how you can add other links to the menu.
One more thing , check for all categories to display on top.