Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / category divider line

category divider line

Locked

Views: 3,870

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
24 Jun 2007, 4:06 AM
#1
sadie avatar

sadie

Zen Follower

Join Date:
Aug 2004
Posts:
252
Plugin Contributions:
0

category divider line

I am having a problem (upgrading from 1.2.6 to current software) changing the look of the category divider line in the category side box. In 1.2.6, we could go to:

/includes/templates/YOURTEMPLATE/sideboxes/tpl_categories.php

 $content .= '<br />' . zen_draw_separator('pixel_silver.gif') . 

and replace the “pixel_silver.gif” image (in our image folder) with an image of our choice, and the divider bar would be whatever we wanted.

Now, in 1.3.6 I do not see where the catBoxDivider image is coming from, or how I can replace it.

24 Jun 2007, 5:58 AM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: category divider line

The divider is not inherently an image in 1.3.x; it is a <hr> horizontal rule, as shown here in tpl_categories.php: php // display a separator between categories and links if (SHOW_CATEGORIES_SEPARATOR_LINK == '1') { $content .= '<hr id="catBoxDivider" />' . "\n"; } and styled in the stylesheet:```
HR {
height: 1px;
margin-top: 0.5em;
border: none;
border-bottom: 1px solid #9a9a9a;
}

background-image: url(../images/dividerimg.gif);
to it. Forget pixel_silver.gif, though; that is obsolete for this purpose.
24 Jun 2007, 4:41 PM
#3
sadie avatar

sadie

Zen Follower

Join Date:
Aug 2004
Posts:
252
Plugin Contributions:
0

Re: category divider line

Thank you,

It is a bit of a challenge with the upgrade. I kept details notes of all of my changes to 1.2.6, and many of them work here also, but not this one.

7 Jul 2008, 10:49 PM
#4
craft_magick avatar

craft_magick

Zen Follower

Join Date:
Nov 2007
Posts:
166
Plugin Contributions:
0

Re: category divider line

gjh42:

The divider is not inherently an image in 1.3.x; it is a <hr> horizontal rule, as shown here in tpl_categories.php: php // display a separator between categories and links if (SHOW_CATEGORIES_SEPARATOR_LINK == '1') { $content .= '<hr id="catBoxDivider" />' . "\n"; } and styled in the stylesheet:```
HR {
height: 1px;
margin-top: 0.5em;
border: none;
border-bottom: 1px solid #9a9a9a;
}

> background-image: url(../images/dividerimg.gif);
> to it. Forget pixel_silver.gif, though; that is obsolete for this purpose.

I tried the above suggestions and there is no difference showing up in my page. 

I did change: 
border-bottom: 1px solid #9a9a9a;
to
border-bottom: 1px solid #000000;
because 9a9a9a is the background color of my category sidebox, but still nothing.

I am trying to get a divider line between my top level categories in the category sidebox.

I'm using 1.3.8 and here's a link to my site [http://www.CraftMagick.com](http://www.CraftMagick.com)

Any suggestions would be welcomed and appreciated.

Thanks.

Zencart ROCKS!
8 Jul 2008, 12:12 AM
#5
gjh42 avatar

gjh42

Black Belt

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

Re: category divider line

Since you have installed Categories Dressing, you can add all of the top cat ids to the explode() function in this part of tpl_categories.php:```php
// categories dressing - add divider above specified cats
if (in_array(str_replace("cPath=","",$box_categories_array[$i]['path']), explode(",",'3,22,21_56'))) { //replace numbers with your cat ids separated by commas
$content .= '<hr class="catBoxDivider" />' . "\n";
}

You may want to leave out the first category so it doesn't have a divider above it.
8 Jul 2008, 2:05 AM
#6
craft_magick avatar

craft_magick

Zen Follower

Join Date:
Nov 2007
Posts:
166
Plugin Contributions:
0

Re: category divider line

gjh42:

Since you have installed Categories Dressing, you can add all of the top cat ids to the explode() function in this part of tpl_categories.php:```php
// categories dressing - add divider above specified cats
if (in_array(str_replace("cPath=","",$box_categories_array[$i]['path']), explode(",",'3,22,21_56'))) { //replace numbers with your cat ids separated by commas
$content .= '<hr class="catBoxDivider" />' . "\n";
}

> You may want to leave out the first category so it doesn't have a divider above it.

Thank you very much gjh42 for your response. Yes, I finally went ahead and installed the Cat Dressing mod but am so php illiterate that I really appreciate your help.

Thanks again for such a quick and helpful response.

Zencart ROCKS!