Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2004
    Posts
    262
    Plugin Contributions
    0

    Default 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.

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default 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 Code:
    // display a separator between categories and links
        
    if (SHOW_CATEGORIES_SEPARATOR_LINK == '1') {
          
    $content .= '<hr id="catBoxDivider" />' "\n";
        } 
    and styled in the stylesheet:
    Code:
    HR {
    	height: 1px;
    	margin-top: 0.5em;
    	border: none;
    	border-bottom: 1px solid #9a9a9a;
    	}
    You can change anything about it here, or even add a
    background-image: url(../images/dividerimg.gif);
    to it. Forget pixel_silver.gif, though; that is obsolete for this purpose.

  3. #3
    Join Date
    Aug 2004
    Posts
    262
    Plugin Contributions
    0

    Default 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.

  4. #4
    Join Date
    Nov 2007
    Posts
    162
    Plugin Contributions
    0

    Default Re: category divider line

    Quote Originally Posted by gjh42 View Post
    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 Code:
    // display a separator between categories and links
        
    if (SHOW_CATEGORIES_SEPARATOR_LINK == '1') {
          
    $content .= '<hr id="catBoxDivider" />' "\n";
        } 
    and styled in the stylesheet:
    Code:
    HR {
    	height: 1px;
    	margin-top: 0.5em;
    	border: none;
    	border-bottom: 1px solid #9a9a9a;
    	}
    You can change anything about it here, or even add a
    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

    Any suggestions would be welcomed and appreciated.

    Thanks.

    Zencart ROCKS!
    www.ZenCrystals.com
    www.CraftMagick.com
    Magickal & Metaphysical supplies/services

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default 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 Code:
        // 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.

  6. #6
    Join Date
    Nov 2007
    Posts
    162
    Plugin Contributions
    0

    Default Re: category divider line

    Quote Originally Posted by gjh42 View Post
    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 Code:
        // 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!
    www.ZenCrystals.com
    www.CraftMagick.com
    Magickal & Metaphysical supplies/services

 

 

Similar Threads

  1. column divider line off centered
    By petergy in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 30 Mar 2013, 03:43 PM
  2. v151 Missing Category Divider Line
    By sports guy in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 18 Nov 2012, 05:51 PM
  3. Category Tabs Divider
    By Berserker in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 2 Oct 2008, 11:51 AM
  4. How can I make a Divider Line in Product_info_display.php
    By milobloom in forum Basic Configuration
    Replies: 0
    Last Post: 25 Jul 2008, 09:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR