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

Static Page and Smarty

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-29-2009, 07:18 AM
 
spyderwoman spyderwoman is offline
 

Advanced Member
  
Join Date: Jun 2008
Posts: 44
 

Default Static Page and Smarty

I want to create a static page to use as the entry point for our website but when I create a static page through the admin tool, if the page is not embeded I cant have it parse smarty code. Is there a way around this?
__________________
X-Cart DB Version: 4.1.10 GOLD

Addons:
Gift Registry (enabled);
RMA (enabled);
Special Offers (enabled);
Reply With Quote
  #2  
Old 04-29-2009, 07:21 AM
 
balinor balinor is offline
 

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

Default Re: Static Page and Smarty

Are you SURE you want to use a splash page? Those are SEO killers....
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 04-29-2009, 07:26 AM
 
spyderwoman spyderwoman is offline
 

Advanced Member
  
Join Date: Jun 2008
Posts: 44
 

Default Re: Static Page and Smarty

Really? Darn! I guess spash page is not what I mean per se. I guess what I mean is a customized home page. is that the same thing?
__________________
X-Cart DB Version: 4.1.10 GOLD

Addons:
Gift Registry (enabled);
RMA (enabled);
Special Offers (enabled);
Reply With Quote
  #4  
Old 04-29-2009, 07:27 AM
 
spyderwoman spyderwoman is offline
 

Advanced Member
  
Join Date: Jun 2008
Posts: 44
 

Default Re: Static Page and Smarty

just to give you an idea of what I want to do...
https://www.greenpeanursery.com/cart/splash.html
then I want to customize the store to have that header and menu and then only have the subcategories show up on the side once in the store. does that make sense?
__________________
X-Cart DB Version: 4.1.10 GOLD

Addons:
Gift Registry (enabled);
RMA (enabled);
Special Offers (enabled);
Reply With Quote
  #5  
Old 04-29-2009, 07:33 AM
 
balinor balinor is offline
 

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

Default Re: Static Page and Smarty

You can do that with simple {if} statements. To hide something on the home page or show something on the home page only, use this code:

{if $main eq "catalog" and $current_category.category eq ""}
Stuff you want to show on the home page only
{else}
Stuff you want to show on every page BUT the home page
{/if}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #6  
Old 04-29-2009, 07:50 AM
 
spyderwoman spyderwoman is offline
 

Advanced Member
  
Join Date: Jun 2008
Posts: 44
 

Default Re: Static Page and Smarty

i want to create a new header and footer to be used throughout, but then I want the center portion to be unique for the home page with no side boxes.
__________________
X-Cart DB Version: 4.1.10 GOLD

Addons:
Gift Registry (enabled);
RMA (enabled);
Special Offers (enabled);
Reply With Quote
  #7  
Old 04-29-2009, 07:50 AM
 
spyderwoman spyderwoman is offline
 

Advanced Member
  
Join Date: Jun 2008
Posts: 44
 

Default Re: Static Page and Smarty

does this mean there are no ways to display smarty tags in random pages?
__________________
X-Cart DB Version: 4.1.10 GOLD

Addons:
Gift Registry (enabled);
RMA (enabled);
Special Offers (enabled);
Reply With Quote
  #8  
Old 04-29-2009, 07:51 AM
 
balinor balinor is offline
 

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

Default Re: Static Page and Smarty

Then that code will work great - customer/main/welcome.tpl is the code for the home page center section, customer/home.tpl contains the sidebars.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #9  
Old 04-29-2009, 07:51 AM
 
balinor balinor is offline
 

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

Default Re: Static Page and Smarty

You can't display smarty without the smarty engine - non-embedded static pages are just plain html, no php at all.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
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 03:32 PM.

   

 
X-Cart forums © 2001-2020