Zen Follower
- Join Date:
- Sep 2008
- Posts:
- 106
- Plugin Contributions:
- 0
Images In Place of Category Titles Without Using Featured, New or Special Boxes!
For those, like myself, faced with the hopeless task of trying to replace category **titles with images on the main page of your store and without having to use new, featured, or special boxes **this can be done through Tools -> Define Pages Editor -> define_main_page.php
As far as I can tell this is the only way to make this work. - Plenty of people have requested help over and over on this subject, but nothing's fortcoming on the subject save some very comprehensive contributions from the likes of gjh42, which unfortunately will not work with my cart and which will not help you at all where this particular problem is concerned.
Anyway, once you have define_main_page.php ready to be edited you need to input your code like so (adjusting it according to your particular store configuration):
<div class="categoryListBoxContents" style="width:33%;"><a href="http://abc.co.uk/index.php?main_page=index&cPath=3"><img src="images/pixel_trans.gif" alt="Something" title=" Something " width="1" height="1" /><br />Something</a></div>
<div class="categoryListBoxContents" style="width:33%;"><a href="http://abc.co.uk/index.php?main_page=index&cPath=2"><img src="images/pixel_trans.gif" alt="Something Else" title=" Something Else " width="1" height="1" /><br />Something Else</a></div>
<div class="categoryListBoxContents" style="width:33%;"><a href="http://abc.co.uk/index.php?main_page=index&cPath=1"><img src="images/pixel_trans.gif" alt="Something Else Entirely" title=" Something Else Entirely " width="1" height="1" /><br /><img src="../../../images/this.png"></a></div>
<br class="clearBoth" />
<div class="categoryListBoxContents" style="width:33%;"><a href="http://abc.co.uk/index.php?main_page=index&cPath=4"><img src="images/pixel_trans.gif" alt="Whatever" title=" Whatever " width="1" height="1" /><br />Whatever</a></div>
<br class="clearBoth" />
Note: the number shown for the cPath of each category should correspond with the ID shown in the Catalog - Catagories/Products table.
This code is actually based upon a store configuration built using the column layout contribution, so this is also the solution for those users wanting a table layout using images with no furkin titles!
Best of all, because this eliminates all that darned PHP it is actually possible to edit it freely without needing to trace the file tree back a dozen levels, create 20 other files, inject code into the SQL database, or any other such nonsense. - Enjoy!