Results 1 to 10 of 2267

Hybrid View

  1. #1
    Join Date
    Dec 2007
    Location
    Atlanta, Georgia
    Posts
    26
    Plugin Contributions
    0

    Default Re: Categories Dressing

    I have looked and overlooked but can't find how to remove (hide) the category test from the sidebox when no image is available. I put the categories in question in a center table as images with links to make the main page look more uniform. I want to be able to hide the text from the right sidebox.

    Well-Grounded Kids

    Thanks in advance for your advice.

    tin
    Hanging in there like a hair in a biscuit.

    www.groundedwear.com

  2. #2
    Join Date
    Dec 2007
    Location
    Atlanta, Georgia
    Posts
    26
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Quote Originally Posted by Tinman0650 View Post
    how to remove (hide) the category test from the sidebox when no image is available.
    tin
    Sorry, the word test should have been TEXT.

    Thanks,
    tin
    Hanging in there like a hair in a biscuit.

    www.groundedwear.com

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

    Default Re: Categories Dressing

    Find this near the top of your tpl_categories.php:
    PHP Code:
        $current_path str_replace("cPath=","",$box_categories_array[$i]['path']);
        if (
    zen_get_product_types_to_category($box_categories_array[$i]['path']) == or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
          
    // skip if this is for the document box (==3) 
        
    } else { 
    and add

    $current_path == 15 or $current_path == 16 or

    to get:
    PHP Code:
        $current_path str_replace("cPath=","",$box_categories_array[$i]['path']);
        if (
    $current_path == 15 or $current_path == 16 or zen_get_product_types_to_category($box_categories_array[$i]['path']) == or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
          
    // skip if this is for the document box (==3) 
        
    } else { 
    This will skip those categories in the sidebox output.

    You may need to add a bit of code to hide subcategories of those top cats. If this is the case, one thing that may work correctly is to use (int)$current_path in place of $current_path.
    If that does not do the right job, there is another method thai I know will work.
    Last edited by gjh42; 5 Mar 2008 at 08:17 PM.

  4. #4
    Join Date
    Dec 2007
    Location
    Atlanta, Georgia
    Posts
    26
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Glenn you are a giant and a genius. It worked perfectly! I have been racking my tiny brain for a couple days over this. Your categories dressing contrib is the best.

    Thank you,

    tin
    Hanging in there like a hair in a biscuit.

    www.groundedwear.com

  5. #5
    Join Date
    Dec 2007
    Location
    Atlanta, Georgia
    Posts
    26
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Glenn, with your infinite wisdom would you show me how to hide a categorie from the Nav Categories Tab? I am assuming this is the correct file to edit: includes/templates/your_template/templates/tpl_modules_categories_tabs.php
    hide $current_path == 16 from the navcattabs?
    Thanks,
    tin
    Hanging in there like a hair in a biscuit.

    www.groundedwear.com

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

    Default Re: Categories Dressing

    That file would be difficult to modify to single out one category for hiding. A better place would be /includes/modules/your_template/categories_tabs.php, where the output is built. Find this:
    PHP Code:
    $links_list = array();
    while (!
    $categories_tab->EOF) {

      
    // currently selected category
      
    if ((int)$cPath == $categories_tab->fields['categories_id']) {
        
    $new_style 'category-top';
        
    $categories_tab_current '<span class="category-subs-selected">' $categories_tab->fields['categories_name'] . '</span>';
      } else {
        
    $new_style 'category-top';
        
    $categories_tab_current $categories_tab->fields['categories_name'];
      }

      
    // create link to top level category
      
    $links_list[] = '<a class="' $new_style '" href="' zen_href_link(FILENAME_DEFAULT'cPath=' . (int)$categories_tab->fields['categories_id']) . '">' $categories_tab_current '</a> ';
      
    $categories_tab->MoveNext();

    and add a test to get this:
    PHP Code:
    $links_list = array();
    while (!
    $categories_tab->EOF) {
      if ((int)
    $cPath != 16) {//skip cat id 16
      // currently selected category
      
    if ((int)$cPath == $categories_tab->fields['categories_id']) {
        
    $new_style 'category-top';
        
    $categories_tab_current '<span class="category-subs-selected">' $categories_tab->fields['categories_name'] . '</span>';
      } else {
        
    $new_style 'category-top';
        
    $categories_tab_current $categories_tab->fields['categories_name'];
      }

      
    // create link to top level category
      
    $links_list[] = '<a class="' $new_style '" href="' zen_href_link(FILENAME_DEFAULT'cPath=' . (int)$categories_tab->fields['categories_id']) . '">' $categories_tab_current '</a> ';
      }
    //skip cat id 16
      
    $categories_tab->MoveNext();

    I haven't tested this and can't guarantee it will be free from oddities, but I think it will work ok.

  7. #7
    Join Date
    Dec 2007
    Location
    Atlanta, Georgia
    Posts
    26
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Glenn, I made the changes but no effect. I tried adding } here and there but just ending up not seeing anything on the page. Set it back to the mod above. cpath 16 still there.

    Any other options you can think of?

    Thanks,
    tin
    Hanging in there like a hair in a biscuit.

    www.groundedwear.com

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

    Default Re: Categories Dressing

    I was testing the wrong variable. This will work:
    PHP Code:
    $links_list = array();
    while (!
    $categories_tab->EOF) {
      if (
    $categories_tab->fields['categories_id'] != 16) {//skip cat id 16
      // currently selected category
      
    if ((int)$cPath == $categories_tab->fields['categories_id']) {
        
    $new_style 'category-top';
        
    $categories_tab_current '<span class="category-subs-selected">' $categories_tab->fields['categories_name'] . '</span>';
      } else {
        
    $new_style 'category-top';
        
    $categories_tab_current $categories_tab->fields['categories_name'];
      }

      
    // create link to top level category
      
    $links_list[] = '<a class="' $new_style '" href="' zen_href_link(FILENAME_DEFAULT'cPath=' . (int)$categories_tab->fields['categories_id']) . '">' $categories_tab_current '</a> ';
      }
    //skip cat id 16
      
    $categories_tab->MoveNext();

    Last edited by gjh42; 11 Mar 2008 at 08:59 PM.

 

 

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