I want to change the way the categories menu behaves in the left colum but i am not sure of the correct way to achieve what i want. I have hacked together a solution but it is a bit messy for my liking. I use this code in the colum_left.tpl to modify the $this->data['category'] variable to achieve what i want. What is the best way to achieve this?
Code: Select all
<?php
$printThis = $this->data['category'];
$printThis = str_replace("<div class=\"top\"><img src=\"catalog/view/theme/default/image/category.png\" alt=\"\" />Categories</div>", "", $printThis);
$printThis = str_replace("<div class=\"bottom\"> </div>", "", $printThis);
$printThis = str_replace("<div id=\"category\" class=\"middle\"><ul>", "", $printThis);
$printThis = str_replace("</ul></div>", "", $printThis);
$printThis = str_replace("</div>", "", $printThis);
$printThis = str_replace("<div class=\"box\">", "", $printThis);
$printThis = str_replace("</li></ul></li><li>", "</li></ul><li>", $printThis);
//$printThis = str_replace("</li></ul>", "", $printThis);
//$printThis = str_replace("<ul><li>", "<br> ", $printThis);
print_r($printThis);
?>
Thanks in advance for any help you might give.
Nooblet