Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2008
    Posts
    7
    Plugin Contributions
    0

    Default Hiding main category name under image

    I am sure there is a simple solution to this, but I have scoured the forum and found no leads. I am a total newbie to zencart as well as php, so bare with me!

    Here's my site that I am trying to fix: http://www.tildeshop.com/zencart/index.php

    I want to get rid of the category names that appear under the circles (images). Since I have the info text in the image I don't need it repeated underneath it.

    How do I delete it here without deleting the category name from the next page after clicking one of the circles?

    Hope that makes sense...
    Thanks so much for the help.

  2. #2
    Join Date
    Jun 2003
    Posts
    33,720
    Plugin Contributions
    0

    Default Re: Hiding main category name under image

    Copy includes/modules/category_row.php to includes/modules/YOUR_TEMPLATE/

    Edit the following line in your override file :

    Change from:
    PHP Code:
        $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' ' ' 'style="width:' $col_width '%;"',
                                               
    'text' => '<a href="' zen_href_link(FILENAME_DEFAULT$cPath_new) . '">' zen_image(DIR_WS_IMAGES $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTHSUBCATEGORY_IMAGE_HEIGHT) . '<br />' $categories->fields['categories_name'] . '</a>'); 
    Change to:
    PHP Code:
        $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' ' ' 'style="width:' $col_width '%;"',
                                               
    'text' => '<a href="' zen_href_link(FILENAME_DEFAULT$cPath_new) . '">' zen_image(DIR_WS_IMAGES $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTHSUBCATEGORY_IMAGE_HEIGHT) . '</a>'); 
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Jan 2008
    Posts
    7
    Plugin Contributions
    0

    Default Re: Hiding main category name under image

    Thanks so much Kim for your fast reply...

    That worked great for the page with the circles on it (main page)...
    However, I did want to keep the titles under the images on the product pages.... they are now gone as well. Is it possible to just make that alteration to that first page only??

    Thanks

  4. #4
    Join Date
    Jun 2003
    Posts
    33,720
    Plugin Contributions
    0

    Default Re: Hiding main category name under image

    ... Reverse what you did. Add a CSS class to the link that you had previously removed and use the CSS to hide it on the index. ... no scratch that - you will have to put a <span> around the text with a class, then use the stylesheet to hide it on the index page.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  5. #5
    Join Date
    Jan 2008
    Posts
    7
    Plugin Contributions
    0

    Default Re: Hiding main category name under image

    Thanks so much...
    I really appreciate your help! although I need help to do that. I am not sure how or where to put in the CSS (new at that too!)

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

    Default Re: Hiding main category name under image

    Since I see that you still have no titles under all of your images, here is the code you need to regulate that. In /includes/modules/your_template/category_row.php about line 39, add
    <span class="imgLinkName"> and </span> around the
    <br />' . $categories->fields['categories_name'] . '
    PHP Code:
        $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' ' ' 'style="width:' $col_width '%;"',
                                               
    'text' => '<a href="' zen_href_link(FILENAME_DEFAULT$cPath_new) . '">' zen_image(DIR_WS_IMAGES $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTHSUBCATEGORY_IMAGE_HEIGHT) . '<span class="imgLinkName"><br />' $categories->fields['categories_name'] . '</span></a>'); 
    Then add to your stylesheet (/includes/templates/your_template/css/stylesheet.css)
    Code:
    #indexHomeBody .imgLinkName {display: none;}

  7. #7
    Join Date
    Jan 2008
    Posts
    7
    Plugin Contributions
    0

    Default Re: Hiding main category name under image

    Yes! Thank you so much for giving me the code. I am still learning CSS and that made it simple.

    Now, I just need to adjust the number of characters that are allowed underneath the products/images in their titles. The titles are longer that what appears right now. Is there a way to increase the number of characters without going into the database?

    Thanks Again!

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

    Default Re: Hiding main category name under image

    No, that is a database setting. The product name is something like varchar(64); you can change it to varchar(128) or whatever, using phpMyAdmin in your server control panel.

 

 

Similar Threads

  1. alignment main category image and name
    By malachi in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 20 Sep 2010, 08:29 PM
  2. Category name shows under sidebox image
    By tcooptx in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 8 Oct 2009, 07:46 AM
  3. Can't get product name to appear under image on Main page
    By mes7000 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 12 Oct 2008, 05:40 AM
  4. Hiding product images under one category but not another
    By robgt in forum Templates, Stylesheets, Page Layout
    Replies: 21
    Last Post: 7 Mar 2008, 01:13 AM

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