Page 174 of 227 FirstFirst ... 74124164172173174175176184224 ... LastLast
Results 1,731 to 1,740 of 2267
  1. #1731
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Categories Dressing

    Your example is a very complex and custom-built categories menu group.
    You could achieve the basic functionality of showing only the active branches of the active tree by modifying case 4 in categories_dressing_functions.php. Call it case 7:
    PHP Code:
          case 7://like 3, active branches only, no tops, no collateral first subs
            
    if($cPath_top == $path_top){
              
    $path_ids explode('_',$path);
              if (
    $cat_depth == 0){ $skip_cat 1//no top cats
              
    }elseif ($cat_depth ==1){//hide first subcats unless active or none selected
                
    $cpath_depth substr_count($_GET['cPath'],'_');
                
    $path_current $path_ids[count($path_ids)-1];
                if (!
    in_array($path_current,explode('_',$_GET['cPath'])) and $cpath_depth >= 1$skip_cat 1;//show only subcats w parent in $cPath
              
    }elseif ($cat_depth >= 2){//only test sub-subcats+
                
    $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
              
    }
            } else {
    //skip if not in active top
              
    $skip_cat 1;
            }
            break; 
    I'm getting cross-eyed now... time to take a break. Try this and see how it works. Use 7|1|9 in the define. Post a screenshot and description if it isn't what you want yet.

  2. #1732
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,741
    Plugin Contributions
    22

    Default Re: Categories Dressing

    Man, that's awesome! It works exactly as I want it. Thank you so very much!

    Now, I'll just have to figure out how to add a link to all top level categories on top of the sidebox. Been thinking about what you've said and there should be something there, although I have cat tabs. Would you happen to know what code would call for all top level categories listing?

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

    Default Re: Categories Dressing

    Glad it's working!
    A link for all top cats would be like
    <a href="index.php?main_page=index&amp;cPath=0">All Main Categories</a>

    There are easy ways to add a link in the Categories Dressing box, but since you have so many different possible displays there, they won't work correctly in every instance. You will need to hard-code it in tpl_categories.php. Find this at the top of the file
    PHP Code:
      $content .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent">' "\n"
    and add

    $content .= '<a id="topLink" href="index.php?main_page=index&amp;cPath=0">All Main Categories</a>';

    to get
    PHP Code:
      $content .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent">' "\n";
      
    $content .= '<a id="topLink" href="index.php?main_page=index&amp;cPath=0">All Main Categories</a>'
    Then add to your stylesheet

    #chcategories #topLink {}

    with any styling you need.
    Change the All Main Categories text as desired.
    Last edited by gjh42; 10 May 2011 at 02:33 PM.

  4. #1734
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,741
    Plugin Contributions
    22

    Default Re: Categories Dressing

    Hm... Adding it is not a problem, but it doesn't work with Simple SEO URLs. I did know the direct link (cPath=0), but I've tested it on my other live site which uses SSU and it just took me to the home page (as in page not found). Is there any other way to access all categories (zen_href link) so it works with SSU since I plan on using it on this site...

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

    Default Re: Categories Dressing

    You should be able to use zen_href_link() for that... I don't have the exact format you would need off the top of my head.

  6. #1736
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,741
    Plugin Contributions
    22

    Default Re: Categories Dressing

    Glenn, thank you very much for all your effort and help provided, I really appreciate it. If I find the solution for the zen_href_link and going to top level categories, I'll make sure to post it here.

    Once again, thank you.

  7. #1737
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,845
    Plugin Contributions
    25

    Default Re: Categories Dressing

    At first I was a little overwhelmed by the possibilities of this mod, but now... I just love it

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

    Default Re: Categories Dressing

    Thanks! It can be overkill for some small requirements, but it would have been much more complicated to build a bunch of different small mods that could all work together instead of bundling the whole smorgasbord of options into one mod.

  9. #1739
    Join Date
    Oct 2010
    Posts
    21
    Plugin Contributions
    0

    Default Re: Categories Dressing

    I'm really sorry if this has already been addressed. I've tried searching, but short of reading all 170+ pages in this forum alone, I'm stuck as to where to go next.

    Anyhow, what I'm trying to do is to display one of my groups of categories as inline. In other words, I have categories for each letter, and I'd rather them appear as one block than each on its own line.

    I had no problem before I added the categories dressing (simply removed the < br > from the tpl_categories.php for my theme). But now, with Categories Dressing, I can't figure out what to do. It seems that my group is only including the first category in it rather than all 26.

    Any thoughts?

    Another more specific question: in the categories_dressing_defines.php, does it matter what order the define statements are in? My categories don't appear in numerical order, so my define statements reflect that. ie:

    define ('CAT_BOX_HEADING_61','1|0||');
    define ('CAT_BOX_HEADING_41','1|0||');
    define ('CAT_BOX_HEADING_33','1|0||');
    define ('CAT_BOX_HEADING_1','1|0||');

    Thanks in advance for the help!
    Last edited by artjewl; 20 May 2011 at 04:54 AM. Reason: fix typos

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

    Default Re: Categories Dressing

    The order of the defines makes no difference.

    You should be able to make your special group of categories inline while the rest display as usual, by setting the first item in each define '1|0||' correctly (to start a new group or not). I can give specific advice if I can see your site live.

 

 

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

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