X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Home page without left or right side bar (https://forum.x-cart.com/showthread.php?t=45005)

jholley 01-22-2009 10:16 AM

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.

balinor 01-22-2009 10:53 AM

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 ""}

jholley 01-22-2009 10:56 AM

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.

balinor 01-22-2009 10:57 AM

Re: Home page without left or right side bar
 
{if $main eq "catalog" and $current_category.category eq ""}
{else}
sidebar code
{/if}

ARW VISIONS 01-22-2009 11:01 AM

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

jholley 01-22-2009 11:09 AM

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.

ARW VISIONS 01-22-2009 11:12 AM

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.

jholley 01-22-2009 11:44 AM

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.

ARW VISIONS 01-22-2009 11:57 AM

Re: Home page without left or right side bar
 
well it didn't hide them on my static pages.

jholley 01-22-2009 12:01 PM

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.


All times are GMT -8. The time now is 04:35 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.