View Single Post
  #6  
Old 09-30-2008, 05:21 AM
 
fotodog13 fotodog13 is offline
 

Senior Member
  
Join Date: Sep 2007
Posts: 126
 

Default Re: little help with a {if} statement

Hey Jon,

With a fresh set of eyes I was able to get what you gave me working but if I need to be able to do this more than once on the same subcategory page, and when I use the code you provided it only redirects to the category page on whatever is listed last in the code.

I have tried a bunch of variations on this, below is the last one.

Can you please take a look at it and tell me what you think.

here is what I have done

<td class="ColumnTitles" valign="top"><a title="{$subcat.description}" <a href="home.php?cat={if $subcat.categoryid eq '270'}264 {else}{$subcat.categoryid}
{/if}">
<a title="{$subcat.description}" <a href="home.php?cat={if $subcat.categoryid eq '254'}268 {else}{$subcat.categoryid}
{/if}">


<a title="{$subcat.description}" <a href="home.php?cat={if $subcat.categoryid eq '272'}267 {else}{$subcat.categoryid}
{/if}">


<a title="{$subcat.description}" <a href="home.php?cat={if $subcat.categoryid eq '271'}253 {else}{$subcat.categoryid}
{/if}">

<img src="{if $subcat.icon_url}{$subcat.icon_url}{else}{$xcart_w eb_dir}/default_image.gif{/if}" alt="" />

Basically this is what I want to happen

if a person lands on page id 270 it will pull up 264
if a person lands on page id 254 it will pull up 268
if a person lands on page id 272 it will pull up 267
if a person lands on page id 271 it will pull up 253

You can see the page here
http://1090484.nwinetworks.com/home.php?cat=249

As this page is written only Anniversary- (271 to 253) works. It is the last one in the line of code.

I think the idea is close and is probably something that can be done, but I am over my head

Many thanks in advance to you and anyway else that has the time to look

Best
Scott V
fotodog13
4.1.11 gold
apache




__________________
scott v
x cart version 4.1.8 (Unix)
Reply With Quote