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

Home page without left or right side bar

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-22-2009, 10:16 AM
 
jholley jholley is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 66
 

Default Home page without left or right side bar

Here's my problem.
This pertains to the home page and static pages.
How can I cause the home page to not show the left and right side bars?
I was able to hide the categories using an if statment, but then they don't show up on the static pages.

I want to lay out the home page completely different than the rest of the site.
__________________
Joe Holley
4.2
Reply With Quote
  #2  
Old 01-22-2009, 10:53 AM
 
balinor balinor is offline
 

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

Default Re: Home page without left or right side bar

This is the correct code to use if you want something to show only on the home page:

{if $main eq "catalog" and $current_category.category eq ""}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 01-22-2009, 10:56 AM
 
jholley jholley is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 66
 

Default Re: Home page without left or right side bar

That's what I am using to show the home page content, but it doesn't hide the side bars.
__________________
Joe Holley
4.2
Reply With Quote
  #4  
Old 01-22-2009, 10:57 AM
 
balinor balinor is offline
 

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

Default Re: Home page without left or right side bar

{if $main eq "catalog" and $current_category.category eq ""}
{else}
sidebar code
{/if}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 01-22-2009, 11:01 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Home page without left or right side bar

I thkn what you want is this.

{if $main ne "catalog" and $current_category.category eq ""}

change the eq to ne and wrap the content you don't want on the home page with the above if statement
__________________
xcart 5.1.2
Reply With Quote
  #6  
Old 01-22-2009, 11:09 AM
 
jholley jholley is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 66
 

Default Re: Home page without left or right side bar

OK, I used this to not show the side bars on the home page.

{if $current_category.category ne ""}

But, they don't show on static pages now.
__________________
Joe Holley
4.2
Reply With Quote
  #7  
Old 01-22-2009, 11:12 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Home page without left or right side bar

you have to use this and exactly this

{if $main ne "catalog" and $current_category.category eq ""}
sidebar content
{/if}

not what you have

{if $current_category.category ne ""}

very different.
__________________
xcart 5.1.2
Reply With Quote
  #8  
Old 01-22-2009, 11:44 AM
 
jholley jholley is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 66
 

Default Re: Home page without left or right side bar

That hides them all the time, not just on the home page.

What I used, hides them, but I can't get them to show up on static pages.
__________________
Joe Holley
4.2
Reply With Quote
  #9  
Old 01-22-2009, 11:57 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Home page without left or right side bar

well it didn't hide them on my static pages.
__________________
xcart 5.1.2
Reply With Quote
  #10  
Old 01-22-2009, 12:01 PM
 
jholley jholley is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 66
 

Default Re: Home page without left or right side bar

All I can go by is what happens when I use it.
When I put the exact code you said to use, it hides the left side bar all the time.
__________________
Joe Holley
4.2
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:39 AM.

   

 
X-Cart forums © 2001-2020