Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Divider Lines Between Categories

Divider Lines Between Categories

Locked

Views: 1,095

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
30 Jan 2010, 11:20 AM
#1
amyleew avatar

amyleew

Zen Follower

Join Date:
Jul 2009
Posts:
159
Plugin Contributions:
0

Divider Lines Between Categories

I have been thinking about installing Categories Dressing but I'm wondering if what I want can be done any easier way and if not, can Categories Dressing do what I want.

I want to put some simple divider lines (about 3) in between sections of my categories just to break the block of text up so it is easier to read. Is it possible to do this in the style sheet? If I can do this, is it possible to have them related to the sort order of my categories at all? I am adding categories all the time so if I had to go edit the style sheet to keep everything up to date every time I add a new category it would drive me crazy.

What I mean about the sort order is I want certain things to be 0 at the top all of the time, other things to be 10 and then others to be 20 and I want a line between each of the groups to separate them. Ideally when I want to add a category I would put the sort order as say, 10 and then it would appear with the other 10's in between the correct lines.

Am I dreaming?

30 Jan 2010, 2:22 PM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Divider Lines Between Categories

You would need to customize tpl_categories.php to do any of those things, because the stock version of the file does not identify the individual categories in any usable way, only different kinds of categories.

Categories Dressing had its origin in my desire for an extra divider between two groups of categories. Figuring out how to do that modification enabled me to answer other people's requests for tweaks to the categories sidebox, and it grew from there...

Dividers are tied to a specific category (they appear above the specified category), so you do need to ensure that the one you use will remain the first in its group. You could give that one sort order 20 and the rest of the group sort order 21.
If you want them all to sort themselves alphabetically within the group, you need to be prepared to switch the divider over to the new top if that happens; this is as simple as opening a file (categories_dressing_defines.php, which has no code except definition statements) and changing a category id number , say from 'CAT_BOX_HEADING_79' to 'CAT_BOX_HEADING_123'.
It would be possible to write code that would put a divider above the first category with a sort order of 20, 30, etc. - this would best be done within the already set up structure of Categories Dressing.