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)
-   -   Test for home page (https://forum.x-cart.com/showthread.php?t=67127)

Nora McDougall-Collins 06-16-2013 09:01 PM

Test for home page
 
I would like the front page of an X-cart installation to have three columns and the other pages to have two columns. What is the test for the home page?

Here is a model of what I need. I only need the test for the first line.
if(page = home)
three columns
else
two columns

Thanks a bunch!!!

chamberinternet 06-17-2013 06:59 AM

Re: Test for home page
 
Code:

{if $main eq "catalog" and $current_category.category eq ""}
{ 3 column layout }
{else}
{ 2 column layout }
{/if}

HTH

Nora McDougall-Collins 06-17-2013 08:46 AM

Re: Test for home page
 
Thanks so much! It worked!!! I do find it strange that the home page of the shopping cart is "catalog." Is that to differentiate it with the static pages?

I'm just realized I've been a little dense. "eq" means = then. I kept wondering what all the eq's were.

cflsystems 06-17-2013 11:56 AM

Re: Test for home page
 
Look in home_main.tpl and common_templates.tpl - you can find 90% of the $main values in there

Nora McDougall-Collins 06-20-2013 02:58 PM

Re: Test for home page
 
Excellent lead, Steve! But, it would be helpful if each if in these files - and each file - were commented. For example, what is the scope of the content in "catalog" as compared to "product". I think it would save a lot of time opening files and reading code that ends up not being what someone needs. And, it could save a lot of time asking questions in the forum.

carpeperdiem 06-20-2013 03:44 PM

Re: Test for home page
 
Quote:

Originally Posted by Nora McDougall-Collins
Excellent lead, Steve! But, it would be helpful if each if in these files - and each file - were commented. For example, what is the scope of the content in "catalog" as compared to "product". I think it would save a lot of time opening files and reading code that ends up not being what someone needs. And, it could save a lot of time asking questions in the forum.


If you use webmaster mode, you won't have to ask the forum for your $main eq or other variables.

Webmaster mode has two modes: templates and variables.

It's gonna be your BFF


All times are GMT -8. The time now is 01:28 PM.

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