View Single Post
  #8  
Old 01-06-2009, 07:58 AM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default Re: Rotating the Main Image based on categories

If you get an error please post that too.So it is easy to debug.
and
TRY THIS:
<div class="HeadLine" style="text-align: left; height: 153px; width: 100%; margin: 10px 0px 0px 0px">
{if $categories[cat_num].categoryid eq "110"}
<img src="{$ImagesDir}/IR_HdrImg.jpg" height="153" border="0" alt="IR Bullet Cameras" />
{elseif $categories[cat_num].categoryid eq "120"}
<img src="{$ImagesDir}/textbanner.jpg" height="153" border="0" alt="IR Bullet Cameras" />
{elseif $categories[cat_num].categoryid eq "130"}
<img src="{$ImagesDir}/IR_HdrImg.jpg" height="153" border="0" alt="IR Bullet Cameras" />
{elseif $categories[cat_num].categoryid eq "140"}
<img src="{$ImagesDir}/textbanner.jpg" height="153" border="0" alt="IR Bullet Cameras" />
{/if}
</div>

Quote:
Originally Posted by ChristineP
I've been playing with this and still not getting any results other than errors. I placed my images in the skin1/images folder on the host server and tried the original code in the head.tpl as:

<div class="HeadLine" style="text-align: left; height: 153px; width: 100%; margin: 10px 0px 0px 0px">
{if $cat eq "110" }
[img]{$ImagesDir}/IR_HdrImg.jpg[/img]
{elsif $cat eq "120"}
[img]{$ImagesDir}/textbanner.jpg[/img]
{elsif $cat eq "130"}
[img]{$ImagesDir}/IR_HdrImg.jpg.jpg[/img]
{else}
[img]{$ImagesDir}/textbanner.jpg[/img]
{/if}
</div>


Also placed the same images in my Images folder on the host server and the code in the head.tpl as:
<div class="HeadLine" style="text-align: left; height: 153px; width: 100%; margin: 10px 0px 0px 0px">
{if $categories[cat_num].categoryid = "110"}
<img src="/Images/IR_HdrImg.jpg" height="153" border="0" alt="IR Bullet Cameras" />
{elseif $categories[cat_num].categoryid = "120"}
<img src="/Images/textbanner.jpg" height="153" border="0" alt="IR Bullet Cameras" />
{elseif $categories[cat_num].categoryid = "130"}
<img src="/Images/IR_HdrImg.jpg" height="153" border="0" alt="IR Bullet Cameras" />
{elseif $categories[cat_num].categoryid = "140"}
<img src="/Images/textbanner.jpg" height="153" border="0" alt="IR Bullet Cameras" />
{/if}
</div>

Do you have suggestions for me to try?

Christine
Reply With Quote