akent64 Posted May 29, 2009 Posted May 29, 2009 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
morehawes Posted May 29, 2009 Posted May 29, 2009 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!
akent64 Posted May 31, 2009 Author Posted May 31, 2009 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!
akent64 Posted May 31, 2009 Author Posted May 31, 2009 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?
akent64 Posted June 1, 2009 Author Posted June 1, 2009 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? ????
morehawes Posted June 2, 2009 Posted June 2, 2009 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!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.