Page 62 of 227 FirstFirst ... 1252606162636472112162 ... LastLast
Results 611 to 620 of 2267
  1. #611
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Categories Dressing

    Code:
    /*change  bullet when a category w/o bg image is open to subs:*/
    
    #chcategories li a.cat-parent-text {
    
        list-style: square inside url(../images/bullet2.gif);/*change to list-style: none; to remove bullet*/
    
    	position: relative; left: -17px;
    
    	font-size: 13px;
    
    	font-weight: bold;
    
        }
    a.cat-parent-text
    applies to the top cats as well as to this one subcat that has subs; you can delete the font-weight here, as it is also covered under
    #chcategories ul a {/*top categories*/

  2. #612
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Glen, you really know your stuff... I'm really pleased with my navigation system now, it's working wonderfully and it looks just the way I want it.

    I can't thank you enough for your time.

    Her goes again though... another challenge :-)

    Perhaps this is nothing to do with the cat_dressing mod and more to do with the UCT mod.... But I have set only top level and 2nd level categories to display as it looks ridiculous when 3rd level cats are always visible.

    I am just wondering if there would be a way of keeping the way I have it now, but allowing the 3rd level category to display when it's parent category is activated...

    For example, when I click on Lingerie, the 3rd levels don't appear beneath it...... I've gotten round this only by using an HTML page with the links to these categories in HTML. I am just wondering if there'd be an easy way to have them drop down under Lingerie in the categories tree too? Only when parent is selected and only 3rd level cats for the selected parent.

    If this is too complex then don't worry about it... the way it's running just now is 99.9999999% peferct :-)

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

    Default Re: Categories Dressing

    Funny you asked... Categories Dressing v2.7, just submitted to Free Addons, includes an active/level combination that would suit your purpose. From the readme:

    The category display-limiting define takes this form:

    define('CAT_BOX_ACTIVE_LEVEL', 'active|highest_level|deepest_level');

    * The "active" field controls whether categories outside the current active tree will display: 0=all tops/1=active tree only/2=active tree only (all tops when no cat selected)/3=full active tree, others limited per level controls.
    * The "highest_level" field controls whether top categories will display: 0=all levels/1=no topcats/etc.
    * The "deepest_level" field controls whether subcategories will display: 1=only first subcats/2=first & second subcats/.../9=all levels down to 9.

    If you don't want to wait for the new version, you can replace the existing version of the cat_active_level_manage() function in /includes/functions/extra_functions/categories_dressing_functions.php with this:
    PHP Code:
    /* Categories Dressing v2.7  - Glenn Herbert (gjh42)   - 20090307 
     */

    function cat_active_level_manage($path) {
      
    $skip_cat 0;
      if (
    defined('CAT_BOX_ACTIVE_LEVEL')) {
        
    $cat_box_active_level explode('|',constant('CAT_BOX_ACTIVE_LEVEL'));
        
    $current_top = (int)$_GET['cPath'];
        
    $iteration_top = (int)$path// set = this iteration's topcat
        
    $cat_depth substr_count($path,'_');
        
    //tests for various kinds of skipping - more can be added
        
    $skip_cat $skip_cat + ($cat_box_active_level[0] == and $current_top != $iteration_top)?1:0;
        
    $skip_cat $skip_cat + ($cat_box_active_level[0] == and $current_top != $iteration_top and $current_top != 0)?1:0;
        
    $skip_cat $skip_cat + ($cat_box_active_level[0] == and ($current_top != $iteration_top and ($cat_box_active_level[1] > $cat_depth or $cat_box_active_level[2] < $cat_depth)))?1:0;
        
    $skip_cat $skip_cat + ($cat_box_active_level[1] > $cat_depth and $cat_box_active_level[0] != and $cat_box_active_level[0] != 3)?1:0;
        
    $skip_cat $skip_cat + ($cat_box_active_level[2] < $cat_depth and $cat_box_active_level[0] != 3)?1:0;
      }
    //defined
      
    return $skip_cat;


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

    Default Re: Categories Dressing

    On reflection, it might not work perfectly for you; I think Lingerie would expand when any Womenswear subcat was selected. It should be possible to tweak the function to work as you want. The define/function combination is open-ended, so any number of options can be added to the code.

  5. #615
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Hi Glen,

    I did as you suggested and replaced the old code with the new code below but it has no effect whatsoever.

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

    Default Re: Categories Dressing

    That code adds another optional setting without changing the function of the current settings. You would need to set the 'CAT_BOX_ACTIVE_LEVEL' define's first field to 3 to make it effective. Let me know how it behaves.

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

    Default Re: Categories Dressing

    A version of the function with a fourth option, to expand the active tree only to subs of cats in $cPath. Inactive cats are subject to level control settings.
    PHP Code:
     /* Categories Dressing v2.7.1  - Glenn Herbert (gjh42)   - 20090308 (new active option 4)
     */

    function cat_active_level_manage($path) {
      
    $skip_cat 0;
      if (
    defined('CAT_BOX_ACTIVE_LEVEL')) {
        
    $cat_box_active_level explode('|',constant('CAT_BOX_ACTIVE_LEVEL'));
        
    $cPath_top = (int)$_GET['cPath'];
        
    $path_top = (int)$path;
        
    $cat_depth substr_count($path,'_');
        
    //tests for various kinds of skipping - more can be added
        
    switch ('true'){
          case (
    $cat_box_active_level[0] == and $cPath_top != $path_top):
            
    $skip_cat 1;
            break;
          case (
    $cat_box_active_level[0] == and $cPath_top != $path_top and $cPath_top != 0):
            
    $skip_cat 1;
            break;
          case (
    $cat_box_active_level[0] == 3):
            if(
    $cPath_top == $path_top) break;//otherwise check levels
          
    case ($cat_box_active_level[0] == 4):
            if(
    $cPath_top == $path_top){
              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
              
    }
              break;
            }
    //if not active test for level
          
    case ($cat_box_active_level[1] > $cat_depth):
            
    $skip_cat 1;
            break;
          case (
    $cat_box_active_level[2] < $cat_depth):
            
    $skip_cat 1;
            break;
        }
    //switch
      
    }//defined
      
    return $skip_cat;

    Set the first field in the define to 4.

  8. #618
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Hi Glen,

    I couldn't get this to work but I don't want to waste your time on this as it's not important... In fact the chances are I wont even like it if I did get it working as the more I think about it, the more I feel it may look just wrong... I have far too many Lingerie Sub Categories you see... If they were expanded then it would look ridiculous....

    Sorry to have wasted your time on this, I should have given it more thought before asking about it...

    Thanks for all your time too, you've been a really brilliant help.

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

    Default Re: Categories Dressing

    I wouldn't have spent time on it if it didn't seem like a generally useful option. I just wrote the code and didn't get to testing, so I'll noodle around and see what it may need to work correctly.

  10. #620
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Categories Dressing

    I'm not sure why the code was not working for me.... You'd mentioned that I need to set CAT_BOX_ACTIVE_LEVEL' define's first field to 3.... but I wasn't too sure exactly how to do that :-)

    Did you mean to edit the categories_dressing_defines.php file?

 

 

Similar Threads

  1. categories dressing
    By fw541c in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 19 Nov 2010, 09:29 PM
  2. Categories Dressing
    By wotnow in forum Addon Sideboxes
    Replies: 10
    Last Post: 7 Apr 2010, 03:06 AM
  3. Categories Dressing issue
    By Maynards in forum Addon Sideboxes
    Replies: 0
    Last Post: 13 Mar 2010, 10:51 PM
  4. Categories Dressing
    By Maynards in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 12 Mar 2010, 11:05 PM
  5. Categories Dressing
    By PGlad in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 7 Aug 2007, 07:05 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