Post by Nooblet » Mon Jan 17, 2011 7:06 am

Hi I am still new to this sorry if this question seems stupid.

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\">&nbsp;</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>&nbsp;&nbsp;", $printThis);
    	print_r($printThis); 
    ?>
The link to my site is http://shop.mybabyography.com.au/. If you push the "products" button you can see the result i am looking for.

Thanks in advance for any help you might give.
Nooblet

Newbie

Posts

Joined
Mon Jan 17, 2011 6:48 am
Who is online

Users browsing this forum: No registered users and 6 guests