Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Show image on home page only

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-16-2006, 03:14 PM
  abeight's Avatar 
abeight abeight is offline
 

X-Adept
  
Join Date: Nov 2003
Location: Cleveland, OH
Posts: 479
 

Default Show image on home page only

I added some code to my head.tpl that tells it to show a different header image for the home page. For the most part, this works well but there is one page that is showing the wrong image, and that is the newsletter signup confirmation page.

http://72.32.121.173/home.php?mode=subscribed&email=m%40b.com

Does anyone know how I might alter this code to make this page show the right header image?

Code:
{if $main ne "catalog" or $current_category.category ne ""}<img src="{$ImagesDir}/custom/logo.gif" alt="Tracy Porter" border="0" width="480" height="49" />{else}<img src="{$ImagesDir}/custom/logo_splash.gif" alt="Tracy Porter" border="0" width="480" height="49" />{/if}

This store is V 4.1.2
__________________
~ Andrea Beight
Reply With Quote
  #2  
Old 10-16-2006, 03:37 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Show image on home page only

Flip the statement:

{if $main eq "catalog" and $current_category.category eq ""}<img src="{$ImagesDir}/custom/logo_splash.gif" alt="Tracy Porter" border="0" width="480" height="49" />{else}
<img src="{$ImagesDir}/custom/logo.gif" alt="Tracy Porter" border="0" width="480" height="49" />{/if}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 10-16-2006, 03:50 PM
  abeight's Avatar 
abeight abeight is offline
 

X-Adept
  
Join Date: Nov 2003
Location: Cleveland, OH
Posts: 479
 

Default Re: Show image on home page only

Thanks for the quick reply, Padraic. Even when I flip the code it still shows the wrong header on the newsletter confirmation page. *scratching head*
__________________
~ Andrea Beight
Reply With Quote
  #4  
Old 10-16-2006, 03:56 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Show image on home page only

How about this...

{if $main eq "catalog" and $current_category.category eq "" and
$smarty.get.mode ne "subscribed"}<img src="{$ImagesDir}/custom/logo_splash.gif" alt="Tracy Porter" border="0" width="480" height="49" />{else}
<img src="{$ImagesDir}/custom/logo.gif" alt="Tracy Porter" border="0" width="480" height="49" />{/if}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 10-16-2006, 04:19 PM
  abeight's Avatar 
abeight abeight is offline
 

X-Adept
  
Join Date: Nov 2003
Location: Cleveland, OH
Posts: 479
 

Default Re: Show image on home page only

That did the trick! Thanks so much!!
__________________
~ Andrea Beight
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:10 AM.

   

 
X-Cart forums © 2001-2020