Forums / Templates, Stylesheets, Page Layout / Customizing the look of categories

Customizing the look of categories

Locked

Views: 1,199

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
6 Jun 2007, 4:23 PM
#1
corinne avatar

corinne

New Zenner

Join Date:
Jun 2005
Posts:
37
Plugin Contributions:
0

Customizing the look of categories

Hello,

I'm a newbie with Zen Cart, but I know CSS well... and I have a few notions of PHP, but probably not enough to solve this case !

I would like my categories to be displayed with this simple structure :

<div id="navig_left">
<h2>Categories</h2
<ul >
  <li><a href="#">Cat 1</a></li>
  <li><a href="#">Cat 2</a></li>
</ul>
</div>

So I tried to customize the sideboxes/tpl_categories.php page but without success at all... Anytime it gave me this kind of result :

<!--// bof: categories //-->
<div class="leftBoxContainer" id="categories" style="width: 150px">
<h3 class="leftBoxHeading" id="categoriesHeading">Categories</h3>
<div id="categoriesContent" class="sideBoxContent">
<li><a class="category-top" href="#">Cat</a></li><br />
<li><a class="category-top" href="#">Cat</a></li><br />
<li><a class="category-top" href="#">Cat</a></li><br />
<hr id="catBoxDivider" />
<a class="category-links" href="#">All Products ...</a>
</div></div>
<!--// eof: categories //-->

I would just like to get rid of all this stuff (various divs, classes, hr, etc) and place my ul, li, and div as I like... But the code structure is too mysterious for me in that template :)

Anonye could give me any tips or direct me to an existing ressource (search unsuccessful).

Many thanks in advance !

9 Jun 2007, 4:07 AM
#2
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Customizing the look of categories

The simple reason why your links don't work is php and zen cart are programed to update your categories and supcatagories by addind and removing from admin and an action within your datbase.

If you would like to by pass that you need to know the path to the catagorie and product and then program that into you side box.

Not verry handy if you change products .
If you are not verry good with php there is a contrib called bettercatagories that allows you to make changes to the looks of your catagories navs.


Play with it long enough and you will break it.
9 Jun 2007, 4:28 AM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Customizing the look of categories

The readme for the Categories Dressing mod has explanations of each altered segment, which may help you understand the structure better for any further changes you want to apply.

10 Jun 2007, 3:22 PM
#4
corinne avatar

corinne

New Zenner

Join Date:
Jun 2005
Posts:
37
Plugin Contributions:
0

Re: Customizing the look of categories

Hello both of you, thanks for the hints !

I just found what a piece of what I need into the common/tpl_box_default_left.php. There you can change the aspect of your category title (h3) and remove at least one <div> that was useless for me :)

But I'm still looking for the way to change the display of each category entry. In the default templates, there's just a list of links <a>, but I would like them to be displayed in a list <ul><li><a></li></ul>... So if anyone know how... I'll appreciate !

10 Jun 2007, 3:42 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Customizing the look of categories

"I'm still looking for the way to change the display of each category entry. "

Look at the example code comments in tpl_categories.php.
Categories Dressing also explains fully how to do that, among other things.

10 Jun 2007, 3:46 PM
#6
corinne avatar

corinne

New Zenner

Join Date:
Jun 2005
Posts:
37
Plugin Contributions:
0

Re: Customizing the look of categories

Yes !!!
I was just looking at that module you pointed out right after I posted, thank you very much for that useful readme :)
Have my categories looking (quite) fully okay now ;)