X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Dynamic image to display based on cat id? (https://forum.x-cart.com/showthread.php?t=29442)

pdheady 03-06-2007 06:40 PM

Dynamic image to display based on cat id?
 
Is there a way to display a graphic image at the top of the products results page based on category id? or this a hack or module somewhere for this already?

I tried the following but it did not work.

<?php

$catheadimage = '<img src="/skin/images/catheadimage' . $cat . '.jpg" width="667" height="270" alt="">';

echo "$catheadimage";

?>

balinor 03-07-2007 04:15 AM

Re: Dynamic image to display based on cat id?
 
Don't use php, just put it in the template. Not sure about category id, but I use this for calling an image with the current category name:

<img src="{ImagesDir}/{$current_category.category}.jpg" alt="{$current_category.category}">

pdheady 03-07-2007 07:52 AM

Re: Dynamic image to display based on cat id?
 
Thanks that's what i was looking for. Where can I go to find a list of all system variables? Is there a reference?

balinor 03-07-2007 07:57 AM

Re: Dynamic image to display based on cat id?
 
http://forum.x-cart.com/showthread.php?t=12718

pdheady 03-07-2007 08:07 AM

Re: Dynamic image to display based on cat id?
 
Wow, awesome! Thanks.


All times are GMT -8. The time now is 07:43 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.