Forums / Templates, Stylesheets, Page Layout / Hiding main category name under image

Hiding main category name under image

Locked

Views: 1,710

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
29 Feb 2008, 9:29 PM
#1
anneli avatar

anneli

New Zenner

Join Date:
Jan 2008
Posts:
7
Plugin Contributions:
0

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.

29 Feb 2008, 10:26 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,682
Plugin Contributions:
0

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:

    $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_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br />' . $categories->fields['categories_name'] . '</a>');

Change to:

    $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_WIDTH, SUBCATEGORY_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.

29 Feb 2008, 10:48 PM
#3
anneli avatar

anneli

New Zenner

Join Date:
Jan 2008
Posts:
7
Plugin Contributions:
0

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

29 Feb 2008, 11:44 PM
#4
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,682
Plugin Contributions:
0

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.

29 Feb 2008, 11:49 PM
#5
anneli avatar

anneli

New Zenner

Join Date:
Jan 2008
Posts:
7
Plugin Contributions:
0

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!)

27 Mar 2008, 4:19 PM
#6
gjh42 avatar

gjh42

Black Belt

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

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
$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_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<span class="imgLinkName"><br />' . $categories->fields['categories_name'] . '</span></a>');

Then add to your stylesheet (/includes/templates/your_template/css/stylesheet.css)```
#indexHomeBody .imgLinkName {display: none;}
27 Mar 2008, 7:36 PM
#7
anneli avatar

anneli

New Zenner

Join Date:
Jan 2008
Posts:
7
Plugin Contributions:
0

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!

27 Mar 2008, 8:51 PM
#8
gjh42 avatar

gjh42

Black Belt

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

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.