| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Image as Category Name | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hello,
Is it possible to add unique images in place of specific category names? I have the Category Heading mod but it can add an image before the category, not as a category. I can make the image link to a static page or even an already existing category, but in order to link it to itself it seems that I'd have to have the image display and the regular category name display, and this isn't really what I want as there would be two links right next to each other that point to the same place. Is there a simple way to hide a category from displaying in the Category section? Is this the best solution? By hiding the category on the admin side I can use the Heading mod to place an image link to the hidden category that would display in the Category section. Is there another way to do this? Thanks,
__________________
version 4.4.2 |
|||||||
#2
|
|||||||
|
|||||||
![]() What I'd like to do is be able to add a field to the Category Details page in the admin section that would allow me to input an image file path (or to upload an image). If the filed is blank then the normal text style would be used but if a proper image path is entered then it would display the image instead of text.
__________________
version 4.4.2 |
|||||||
#3
|
|||||||
|
|||||||
![]() Easiest way to do this - as I have done in the past - is to simply name the images according to the category id - then they will automatically be called and you don't have to worry about adding a path for every single one. You'd just use this in place of the category title:
<img src="{$ImagesDir}/cat-images/{$current_category.categoryid}.jpg" alt="{$current_category.category|escape}" /> Then just create a folder called cat-images in the common_files/images folder called 'cat-images' and upload your jpg images (or png if you prefer) there. Note that this will not be as good from an SEO perspective as real text with an h1 tag around it though.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#4
|
|||||||
|
|||||||
![]() Thanks!
So if I have an image I want as the title I just input the code above into the Title field on the Category Details page? (after I've added the images to the correct directory of course) And if I want normal text then I simply input a text title as normal?
__________________
version 4.4.2 |
|||||||
#5
|
|||||||
|
|||||||
![]() No, this is a global solution - you'd need to add this code into the template in place of the code for the title - you can't add this to the title field in the admin, that doesn't accept html.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
|
|||
X-Cart forums © 2001-2020
|