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

3 column and 2 column on the same site?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-14-2005, 08:33 PM
 
jamboro jamboro is offline
 

Newbie
  
Join Date: Oct 2005
Posts: 3
 

Default 3 column and 2 column on the same site?

Hi all,

Ok I believe that x-cart will be able to do this, its just a matter of time for me to find the correct files to edit.

I need to have a main page in home.tpl to be 3 column. Ok so I have done that during the installation, but lets say if I want to have three columns for the main pages or certain pages but 2 columns on every other pages, such as product display and user registration or user profile.

Correct me if I am wrong but I think that all the content is by default going into the middle column of the home.tpl, so if I create a file named home2.tpl and just place the first and the second column, I will have succeeded in creating a custom template for general displays.

So for me to have ONLY certain files with 2 columns, I would have to call for home2.tpl in the respective particular .tpl file, instead of the default home.tpl, right?

The question is that this is just my theory but in actual fact, what are the files that I need to edit in order to call for the custom 2 column template (head2.tpl), in for example products.tpl?
__________________
xcart 4.0.16
Reply With Quote
  #2  
Old 10-14-2005, 11:42 PM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,052
 

Default

You are kind of on the right lines I think.

I'm just going to give you a few pointers that I believe may help you solve this.

Firstly, to call a different template such as home2.tpl, you need to find the relevant php file that calls it and then look for a bit of code right near the bottom that says:

func_display("customer/home.tpl",$smarty);

Change that to whatever template you want to call. It's not that straight forward though, especially as you can't just goto Webmaster mode and see what is doing what. And I don't think you can do it for the products.php file.

Also, I think, that as per your example, the products page is part of the categories and subcategories routines.

Now, another way to do this is to use if statements. If you look at home_main.tpl you will see loads of if stamements that determine what happens when you are in certain areas. You need to take these and build them into your home.tpl, instead of making a new one.

This is the logic, but not the proper code.

In one of your nav columns, you need to put something like this

{if $main eq "catalog"}

{else}
(normal nav column bits go here)

{if}

So that is saying that if you are in the catalog section, which as I say I think is products, then by leaving a blank before the else statment - nothing is displayed. After the else statement is all your normal nav. Then close it with the end if tag.

Hope that helps a bit.
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #3  
Old 10-18-2005, 11:26 AM
 
jamboro jamboro is offline
 

Newbie
  
Join Date: Oct 2005
Posts: 3
 

Default

Thanks Paul.

That sure did help.

I simply created home2.tpl (with two column) and replaced the tags in product.php with it for home.tpl....

And the rest was history.
__________________
xcart 4.0.16
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 05:36 PM.

   

 
X-Cart forums © 2001-2020