Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Hide Category Names (Just the text link below the category image)


akent64

Recommended Posts

Posted

I know this should be very simple but I cannot find the piece of code that will allow me just to hide the category name text link that displays under the category image. The reason I want to do this is as I am displaying each of the category names in the images and therefore the text link is not required (I do not want to get rid of this altogether, just hide it)

 

Any help would be much appreciated

 

Thanks

 

AK

Posted

Hi, i'm guessing you're talking about nested categories? (the list of categories inside a category). This should do the trick:

 

Find:

echo '				<td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>' . $categories['categories_name'] . '</a></td>' . "\n";

and change to:

 

echo '				<td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '</a></td>' . "\n";

Joe

 

MacMan strikes again!

 

Always backup first before listening to me!

Posted
Hi, i'm guessing you're talking about nested categories? (the list of categories inside a category). This should do the trick:

 

Find:

echo '				<td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>' . $categories['categories_name'] . '</a></td>' . "\n";

and change to:

 

echo '				<td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '</a></td>' . "\n";

 

That is perfect, thank you!

Posted
That is perfect, thank you!

 

Do you know how to create a vertical space between the category images. I do not want to use a <br> as the vertical space will be too large?

Posted
Do you know how to create a vertical space between the category images. I do not want to use a <br> as the vertical space will be too large?

 

????

Posted

Hi, this can be done by applying a margin to the top or bottom of your images. To do this you will need to add a class that acts as a 'hook' for the style so you can apply the rule.

 

Without looking into it properly (or testing!) try doing this. Change the code above so the class is like this:

 

class="smallText imgGap"

Then add to your stylesheet:

 

.imgGap {
 margin-bottom: 10px;
}

You might have to fiddle around but thats it in principle.

Joe

 

MacMan strikes again!

 

Always backup first before listening to me!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...