Forums / Templates, Stylesheets, Page Layout / Hide subcategory-name from listing

Hide subcategory-name from listing

Locked

Views: 933

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
24 Nov 2007, 3:44 PM
#1
jagge avatar

jagge

Zen Follower

Join Date:
Jul 2007
Posts:
110
Plugin Contributions:
0

Hide subcategory-name from listing

Hi everybody!
I hope someone can help me with this one. I cant find the file to edit myself.

I dont want the subcategorys name to show in listing. I just want the categorypicture to show. The name on subcategory should still show in the menu though.

Can someone please help me with this and save the weekend??

The site is in development so check the Casio-category. its the only one with categorys in it.

www.blingofsweden.se/klockor

Best regards,
Ola

24 Nov 2007, 5:09 PM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Hide subcategory-name from listing

This is one of those things where there is just no handle to affect the name by itself in the stylesheet. It will require a file edit.

In /includes/templates/your_template/category_row.php, find this```php
// $categories->fields['products_name'] = zen_get_products_name($categories->fields['products_id']);

$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>');

$col ++;
and remove 

. '<br />' . $categories->fields['categories_name']

to get```php
    //    $categories->fields['products_name'] = zen_get_products_name($categories->fields['products_id']);

    $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>');

    $col ++;
24 Nov 2007, 6:04 PM
#3
jagge avatar

jagge

Zen Follower

Join Date:
Jul 2007
Posts:
110
Plugin Contributions:
0

Re: Hide subcategory-name from listing

It worked!
Many thanks for your help! Have a nice weekend!

/Ola