Zen Cart Logo
Forums / Addon Sideboxes / Categories Dressing

Categories Dressing

Views: 531,466

Results 2,141 to 2,160 of 2,268
25 Nov 2012, 13:44
#2141
gjh42 avatar

gjh42

Black Belt

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

Categories Dressing

Just remove the and $path_top != '150' from

    if($cPath_top != $path_top and $path_top != '84' and $path_top != '150') $test_level = 1;

Oops sorry, distracted... you want to add some code from another case in there to handle cat150. Back in a few...

25 Nov 2012, 14:48
#2142
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Try this:

	  case 7://full active tree, others per level; always cat 23, cat 150 active subs
        if( $path_top == '150'){
          if ($cat_depth >= 2){//only test sub-subcats+
            $path_ids = explode('_',$path);
            $path_parent = $path_ids[count($path_ids)-2];
            if (!in_array($path_parent,explode('_',$_GET['cPath']))) $skip_cat = 1;//show only subcats w parent in $cPath
          }
        } elseif ($cPath_top == $path_top or $path_top == '84') {//full tree
        }
        } else {//if not active test for level
          $test_level = 1;
        }
        break;
```This might want alteration to
if ($cat_depth >= 2)
25 Nov 2012, 15:03
#2143
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

Re: Categories Dressing

Using this code seems to break my category page :( It's coming up blank.

25 Nov 2012, 15:25
#2144
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

My code merge of two cases left an extra }. Change thisphp } elseif ($cPath_top == $path_top or $path_top == '84') {//full tree } } else {//if not active test for level to this ```php
} elseif ($cPath_top == $path_top or $path_top == '84') {//full tree
} else {//if not active test for level

25 Nov 2012, 15:33
#2145
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

Re: Categories Dressing

That did the trick, thanks so much... Exactly what I needed.

27 Nov 2012, 19:54
#2146
lanadearg avatar

lanadearg

New Zenner

Join Date:
Nov 2012
Location:
Buenos Aires
Posts:
35
Plugin Contributions:
0

Re: Categories Dressing

Hello all. I want remove bullet and move categories to left. My cite http://giftseshop.com/
I changed stylesheet_categories_dressing.css as written here, but doesn’t work. I have impression that cite doesn’t respond to the code. Please help me, suggest something.
Sorry for my English.

/**
 * CSS Stylesheet for Categories Dressing examples
 * @copyright Copyright 2009 Glenn Herbert
 * @copyright Portions Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license [url]http://www.gnu.org/licenses/[/url] GNU Public License V3.0
 * /includes/templates/your_template/css/stylesheet_categories_dressing.css
 * Categories Dressing v2.7.3   Glenn Herbert (gjh42)   - 20090505
 */
/*
hr.catBoxDivider1 { 
    color: #aabbcc;
    }
*/

 /*IE6 hacks*/
* html #categories li, * html #categories li a {
    height: 1em;/*fix IE6 whitespace bug*/
    background-image: url(../images/pixel_trans.gif);/*partially fix IE6 a block display bug*/
    }

.catBoxHeading1 { 
    font-family: georgia, serif;
    font-weight: bold;
    font-size: 1.4em;
    color: #335511; 
    background-color: #ff66ff;
    
    /*height: 23px; */ /*uncomment to use background image without coded text*/
    padding: 0.3em 0.4em;
    margin: 0;
    }

.catBoxHeading2 { 
    font-family: 'times new roman', serif;
    font-weight: bold;
    font-size: 1.4em;
    color: #335544; 
    background-color: #ffaaff;
    
    /*height: 23px; */ /*uncomment to use background image without coded text*/
    padding: 0.3em 0.4em;
    margin: 0 0 2px 0;
    }

.catBoxHeading3 { 
    font-family: 'comic sans ms', sans-serif;
    font-weight: bold;
    font-size: 1.2em;
    color: #336699; 
    background-color: #ffbbdd;
    
    /*height: 23px; */ /*uncomment to use background image without coded text*/
    padding: 0.3em 0.4em;
    margin: 0 0 2px 0;
    }

.catBoxHeadingImg { 
    padding: 0;
    margin: 0;
    }

.catBoxSubtext1 {
    font-family:  'times new roman', serif;
    font-weight: normal;
    font-size: 1.2em;
    color: #669911; 
    background-color: #ffddff;
    padding: 0.1em 0.2em 0.1em 1.0em;
    }

#categories ul {/*top category lists*/
    list-style: none;
    background: none;
    border: 1px solid #ffaa99;
    margin: 0 0 0.4em -2em;
    padding: 0;
    }

#categories ul a {/*top categories*/
    display: list-item;
    list-style:  none;
    background: no-repeat;
    border: none;
    margin: 0;
    padding: 0;
    }

#categories ul ul {/*subcategory lists*/
    list-style: none;
    background: #ffeecc;
    border: none;
    margin: 0 0 0.4em 0;
    padding: 0 0 0 1.3em;
    }

#categories ul ul a {/*subcategories*/
    display: list-item;
    list-style:  none;
    background: #ffddbb;
    border: none;
    margin: 0;
    padding: 0;
    }
 

/*change  bullet when a category w/o bg image is open to subs:*/
#categories li a.cat-parent-text {
    list-style:   none;
    }
/*change  bullet when a category w/o bg image is open to products:*/
#categories li a.cat-selected-text {
    list-style:   none;
    }

/*disable bullet for cats w/ image or bg image*/
#categories li a.cat-parent, #categories li a.cat-selected, #categories li a.cat-not-selected {
    list-style: none;
    display: block;/*fix IE6 margin-left bug*/
    }

/*different bullet for links if desired*/
/*
#categories li a.category-links {
    list-style:   none;
    }
*/

/* top category hover effects*/
#categories li.cat-top a:hover {
    color: #dd6633; 
 
list-style-type:none;
list-style: none;
margin-left:-2em;
    background:  #ddeeff url(../images/catbghover.gif);
    } 
/* subcategory hover effects*/
#categories li li.cat-subs a:hover, #categories li li.cat-products a:hover {
    color: #aa9966; 
    background: #ffb9ff url(../images/catbghover.gif);
    } 

/*individual page rules go after the general rules*/
/*example for individual category as bg image*/
#categories li a.catBg25 {
    
    height: 30px;
    }

#categories li a.catBg25:hover {
    
    }

/*example for custom individual category styling*/
#categories li.cat-holiday a {
    border-top: 3px dotted #112233; 
    background-color: #aabbff; 
    color: #112233; 
    padding: 1em 0em;
    }

/*example for custom category group styling*/
ul#catGroup15 {
    border: 1px solid #bd6699;
    background: #bbeeff; 
    position: relative;
    left: -1.3em;
    top: 0.2em;
    }

 .catCount {color: #000000;}[HTML][/HTML]
28 Nov 2012, 04:10
#2147
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

You do not have stylesheet_categories_dressing.css saved in the right folder. I don't know where it is, but it needs to be in
/includes/templates/classic/css/stylesheet_categories_dressing.css.

You also should read and follow the tutorials on making a custom template; the /classic/ folder is intended as an example, not as the template folder you should use.

28 Nov 2012, 12:47
#2148
lanadearg avatar

lanadearg

New Zenner

Join Date:
Nov 2012
Location:
Buenos Aires
Posts:
35
Plugin Contributions:
0

Re: Categories Dressing

gjh42:

You do not have stylesheet_categories_dressing.css saved in the right folder. I don't know where it is, but it needs to be in
/includes/templates/classic/css/stylesheet_categories_dressing.css.

You also should read and follow the tutorials on making a custom template; the /classic/ folder is intended as an example, not as the template folder you should use.
You are right, the folder stylesheet_categories_dressing.css vas saved in /includes/templates/template_default/css/stylesheet_categories_dressing.css.
Thank you very much, I did it!
Can you tell me in what folder I can correct “All items”? I tried cod

#category-links {
margin:0 0 0 0;
}

in the folders stylesheet.css and in stylesheet_categories_dressing.css.
-not responding.
http://www.giftseshop.com/
Thank you for your help!

28 Nov 2012, 15:55
#2149
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

That is a class, not an id, so you need to use it like this:

.category-links {
margin:0 0 0 0;
}

Also find in your stylesheet and change the items in pink to the values shown in green:

#categories ul {/*top category lists*/
    list-style: none;
    background: none;
    border: 1px solid #ffaa99 none;
    margin: 0 0 0.4em -2em 0;
    padding: 0;
    }
28 Nov 2012, 17:48
#2150
lanadearg avatar

lanadearg

New Zenner

Join Date:
Nov 2012
Location:
Buenos Aires
Posts:
35
Plugin Contributions:
0

Re: Categories Dressing

Yes, it works! Thanks, you're a genius!

04 Dec 2012, 15:50
#2151
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Categories Dressing

Glen with your help I have this module doing exactly what I want it to. This is a great contribution to Zen Cart.

The only issue I have is regarding to the layout display, if you are using subcategories. That is when you click on a main category, then the center column also displays this same list of your sub categories list in this menu (of course you can add an image to the center if you would like). This is creating duplicate lists side by side. You can see an example here: http://www.lasilhouettelingerie.com/store/shop-by-price-c-82/ This same scenario is repeated for any top category in this menu to the left.

Is it possible to make the top categories only, open to show subcategories; instead of going to the top category page when clicked? (that will then have duplicate lists). Another words clicking the top category link would only open the list (and not direct the page to the actual link).

04 Dec 2012, 16:12
#2152
ray_the_otter avatar

ray_the_otter

Zen Follower

Join Date:
Jul 2010
Posts:
278
Plugin Contributions:
0

Re: Categories Dressing

Is it possible to have a Category Dressing Title be made into a link that can point to and ezpage or contact us page?

For example : define ('CAT_BOX_HEADING_108_130','1|0|||Text Here Would be a Link|1|');

06 Dec 2012, 15:03
#2153
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Categories Dressing

sports guy:

Glen with your help I have this module doing exactly what I want it to. This is a great contribution to Zen Cart.

The only issue I have is regarding to the layout display, if you are using subcategories. That is when you click on a main category, then the center column also displays this same list of your sub categories list in this menu (of course you can add an image to the center if you would like). This is creating duplicate lists side by side. You can see an example here: http://www.lasilhouettelingerie.com/store/shop-by-price-c-82/ This same scenario is repeated for any top category in this menu to the left.

Is it possible to make the top categories only, open to show subcategories; instead of going to the top category page when clicked? (that will then have duplicate lists). Another words clicking the top category link would only open the list (and not direct the page to the actual link).

I suppose I should rephrase this and simply what I am asking. I am using the Collapseable Categories Tree. I would like it so, when the main category is clicked the tree expands which exposes all the sub-categories. I do like having the text link showing. But I don't want the category link to direct to the category page (URL), the page stays the same. Basically for the main categories only, I want to use these links as category tree expanders and not direct to the category page URL itself.

As for the sub-categories they stay the same. I do have arrow images attached that change when the main category URL is clicked. I would like these to still work properly like they are now. In that the sub-category URL's continue to direct to the corresponding sub-category. I have been scanning the docs and some of this forum, but have not found an answer yet.

I was thinking I could just find the URL code for the main categories, and just remove the cpath. Thereby breaking the link. But I am not sure where to find this, and I don't know if this is the best way to go.

06 Dec 2012, 16:21
#2154
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Ray: Yes, you can make the "heading" a link. Just put the HTML for it in the define, like this:

define ('CAT_BOX_HEADING_108_130','1|0|||<a href="index.php?main_page=page&id=23">EZ-Page 23 Link</a>|1|');

Be sure you don't use any unescaped single quotes. ( ' not ' )

Sports_guy: Unlinking the top categories in the sidebox will require a test and conditional edit either in categories_dressing_functions.php or tpl_categories.php. It shouldn't be too hard; I'll look into it in the next day or so.

07 Dec 2012, 01:44
#2155
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Categories Dressing

gjh42:

Sports_guy: Unlinking the top categories in the sidebox will require a test and conditional edit either in categories_dressing_functions.php or tpl_categories.php. It shouldn't be too hard; I'll look into it in the next day or so.

Thank you for looking into this Glen! And after looking though about 40 pages of this post this morning, I would never ask for this category tree to be two way (open and close sub-category tree based upon master-category click and unclick). and I will be happy! As you can see I am using this to just open the master category tree (like a javascript action would do).

07 Dec 2012, 02:38
#2156
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Find the section like this in tpl_categories.php and replace it with the following: ```php
$cat_name_display = cat_name_display($box_categories_array[$i]['name'], $current_path);
$active_class = ($box_categories_array[$i]['current'])? ($box_categories_array[$i]['has_sub_cat']? 'parent': 'selected'): 'not-selected';
if ($cat_depth == 0) {//no top cat link
$content .= str_repeat(' ',$cat_depth) . ' <li class="cat-' . $new_style . '"><span class="cat-' . $active_class . $cat_name_display[0] . '">';
} else {
$content .= str_repeat(' ',$cat_depth) . ' <li class="cat-' . $new_style . '"><a class="cat-' . $active_class . $cat_name_display[0] . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
}//no top cat link
$content .= $cat_name_display[1];
if ($box_categories_array[$i]['has_sub_cat'] and $cat_name_display[0] == '-text') {
$content .= CATEGORIES_SEPARATOR;
}

  if (SHOW_COUNTS == 'true' and $cat_name_display[0] == '-text') {
    if ((CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
      $content .= '<span class="catCount">' . CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX . '</span>';
    }
  }
  if ($cat_depth == 0) {//no top cat link
  $content .= '</span>';
  } else {
  $content .= '</a>';
  }//no top cat link
  $content .= cat_box_subtext($current_path);
}

}
$content .= cat_ul_manage(0, $prev_path, 0) . '</ul>' . "\n";

07 Dec 2012, 03:14
#2157
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Categories Dressing

Glen, are you sure this code is from tpl_categories.php? The code in my tpl_categories.php is completely different. it even had your name in the header. This is what I have:

<?php
/**
 * Side Box Template
 *
 * @package templateSystem
 * @copyright Copyright 2009 Glenn Herbert
 * @copyright Portions Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.gnu.org/licenses/ GNU Public License V3.0
 * @version $Id: tpl_categories.php 4162 2006-08-17 03:55:02Z ajeh $
 * Modified for Categories Dressing v2.7.3  by Glenn Herbert (gjh42)   - 20090505
 *
 * Referenced files:
 * includes/functions/extra_functions/categories_dressing_functions.php
 * includes/languages/english/extra_definitions/your_template/categories_dressing_defines.php - make user settings here
 */

  $content = "";
  $prev_cat_depth = -1;//do not alter
  $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";

  for ($i=0;$i<sizeof($box_categories_array);$i++) {
    switch(true) {
// to make a specific category stand out define a new class in the stylesheet example: #categories li.cat-holiday a {}
// uncomment the select below and set the cPath=3 to the cPath= your_categories_id
// many variations of this can be done
      case ($box_categories_array[$i]['path'] == 'cPath=181'):
        $new_style = 'pleasureobjects';
        break;
      case ($box_categories_array[$i]['path'] == 'cPath=141'):
        $new_style = 'hosiery';
        break;
      case ($box_categories_array[$i]['path'] == 'cPath=193'):
        $new_style = 'accessories';
        break;
      case ($box_categories_array[$i]['path'] == 'cPath=190'):
        $new_style = 'clothing';
        break;
      case ($box_categories_array[$i]['path'] == 'cPath=191'):
        $new_style = 'lingerie';
        break;
      case ($box_categories_array[$i]['path'] == 'cPath=192'):
        $new_style = 'swimwear';
        break;
      case ($box_categories_array[$i]['path'] == 'cPath=71'):
        $new_style = 'sale';
        break;
      case ($box_categories_array[$i]['top'] == 'true'):
        $new_style = 'top';
        break;
      case ($box_categories_array[$i]['has_sub_cat']):
        $new_style = 'subs';
        break;
      default:
        $new_style = 'products';
    }
    $current_path = str_replace("cPath=","",$box_categories_array[$i]['path']);
    $skip_cat = 0;
    $skip_cat = cat_active_level_manage($current_path);
    if ($skip_cat or zen_get_product_types_to_category($box_categories_array[$i]['path']) == 3 or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
      // skip if this is for the document box (==3)
    } else {
      $cat_box_heading = cat_box_heading($current_path);
      $cat_ul = cat_ul_manage($current_path, $prev_cat_depth, $cat_box_heading[0]);
      $content .= $cat_ul;
      $content .= $cat_box_heading[1];
      $cat_name_display = cat_name_display($box_categories_array[$i]['name'], $current_path);
      $active_class = ($box_categories_array[$i]['current'])? ($box_categories_array[$i]['has_sub_cat']? 'parent': 'selected'): 'not-selected';
      $content .= '  <li class="cat-' . $new_style . '"><a class="cat-' . $active_class . $cat_name_display[0] . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
      $content .= $cat_name_display[1];
      if ($box_categories_array[$i]['has_sub_cat'] and $cat_name_display[0] == '-text') {
        $content .= CATEGORIES_SEPARATOR;
      }

      if (SHOW_COUNTS == 'true' and $cat_name_display[0] == '-text') {
        if ((CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
          $content .= '<span class="catCount">' . CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX . '</span>';
        }
      }
      $content .= '</a>';
      $content .= cat_box_subtext($current_path);
    }
  }
  $content .= cat_ul_manage(0, $prev_cat_depth, 0) . '</ul>' . "\n";
    
  if (SHOW_CATEGORIES_BOX_SPECIALS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true' or SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
// display a separator between categories and links
    if (SHOW_CATEGORIES_SEPARATOR_LINK == '1') {
      $content .= '<hr id="catBoxDivider" />' . "\n";
    }
    $content .= '<ul class="catLinks">' . "\n";
    if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
      $cat_box_link_head = cat_box_heading('SPECIALS');
      $content .= $cat_box_link_head[1];
      $show_this = $db->Execute("select s.products_id from " . TABLE_SPECIALS . " s where s.status= 1 limit 1");
      if ($show_this->RecordCount() > 0) {
        $content .= '<li><a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . '</li>' . "\n";
      }
    }
    if (SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true') {
      // display limits
//      $display_limit = zen_get_products_new_timelimit();
      $display_limit = zen_get_new_date_range();

      $show_this = $db->Execute("select p.products_id
                                 from " . TABLE_PRODUCTS . " p
                                 where p.products_status = 1 " . $display_limit . " limit 1");
      if ($show_this->RecordCount() > 0) {
        $cat_box_link_head = cat_box_heading('NEW');
        $content .= $cat_box_link_head[1];
        $content .= '  <li><a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_NEW) . '">' . CATEGORIES_BOX_HEADING_WHATS_NEW . '</a>' . '</li>' . "\n";
      }
    }
    if (SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true') {
      $show_this = $db->Execute("select products_id from " . TABLE_FEATURED . " where status= 1 limit 1");
      if ($show_this->RecordCount() > 0) {
        $cat_box_link_head = cat_box_heading('FEATURED');
        $content .= $cat_box_link_head[1];
        $content .= '  <li><a class="category-links" href="' . zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS . '</a>' . '</li>' . "\n";
      }
    }
    if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
      $cat_box_link_head = cat_box_heading('ALL');
      $content .= $cat_box_link_head[1];
      $content .= '  <li><a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a>' . '</li>' . "\n";
    }
    $content .= '</ul>' . "\n";
  }
  $content .= '</div>';
?>

I thought perhaps this was merged with my original file (and it was) but my original file also did not have the code you want me to find. Last I looked at template default and that file also did not have this code.

07 Dec 2012, 03:25
#2158
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Categories Dressing

I found it. I will let you know how it works.

07 Dec 2012, 03:31
#2159
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Oops:) I realized a few minutes ago that I had made the edits to my v2.8 development copy instead of the v2.7.3 archive copy I also had open. This is the correct edited code for you:```php
$skip_cat = 0;
$skip_cat = cat_active_level_manage($current_path);
$cat_depth = substr_count($current_path,'_');//no top cat link
if ($skip_cat or zen_get_product_types_to_category($box_categories_array[$i]['path']) == 3 or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
// skip if this is for the document box (==3)
} else {
$cat_box_heading = cat_box_heading($current_path);
$cat_ul = cat_ul_manage($current_path, $prev_cat_depth, $cat_box_heading[0]);
$content .= $cat_ul;
$content .= $cat_box_heading[1];
$cat_name_display = cat_name_display($box_categories_array[$i]['name'], $current_path);
$active_class = ($box_categories_array[$i]['current'])? ($box_categories_array[$i]['has_sub_cat']? 'parent': 'selected'): 'not-selected';
//$content .= ' <li class="cat-' . $new_style . '"><a class="cat-' . $active_class . $cat_name_display[0] . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
if ($cat_depth == 0) {//no top cat link
$content .= str_repeat(' ',$cat_depth) . ' <li class="cat-' . $new_style . '"><span class="cat-' . $active_class . $cat_name_display[0] . '">';
} else {
$content .= str_repeat(' ',$cat_depth) . ' <li class="cat-' . $new_style . '"><a class="cat-' . $active_class . $cat_name_display[0] . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
}//no top cat link
$content .= $cat_name_display[1];
if ($box_categories_array[$i]['has_sub_cat'] and $cat_name_display[0] == '-text') {
$content .= CATEGORIES_SEPARATOR;
}

  if (SHOW_COUNTS == 'true' and $cat_name_display[0] == '-text') {
    if ((CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
      $content .= '<span class="catCount">' . CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX . '</span>';
    }
  }
  //$content .= '</a>';
  if ($cat_depth == 0) {//no top cat link
  $content .= '</span>';
  } else {
  $content .= '</a>';
  }//no top cat link
07 Dec 2012, 04:16
#2160
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Categories Dressing

The end of the coding you have provided confuses me slightly. I know where your coding begins and see where to insert, but I am not sure what line of my coding comes directly after your coding ends. Here is my coding around the area where yours would end:

$content .= '</a>';
      $content .= cat_box_subtext($current_path);
    }
  }
  $content .= cat_ul_manage(0, $prev_cat_depth, 0) . '</ul>' . "\n";
    
  if (SHOW_CATEGORIES_BOX_SPECIALS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true' or SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
// display a separator between categories and links

Which coding of mine, would be the first line (begin) right after your last line of coding provided?