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

Layout question

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-31-2006, 01:54 PM
 
Lucent88 Lucent88 is offline
 

Senior Member
  
Join Date: Aug 2005
Posts: 147
 

Default Layout question

I wonder if I'm able to change the page layout like the following

- Every page has 3 column design except

-when I'm on product detail page I want it to be 2 column

and

-when I'm on shopping cart page (1 column)

has anyone done such layout modify? What file should I be looking into?
Reply With Quote
  #2  
Old 01-31-2006, 02:26 PM
 
balinor balinor is offline
 

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

Default

Yes, it is easier than it looks actually Just use {if} statements around the columns in home.tpl.

To show the right hand column on all pages except the product page and cart pages, use this around the right hand column:

{if $main ne "product" and $main ne "cart" and $smarty.get.mode ne "checkout"}

For the left hand column, use this to show it everywhere but in the cart & checkout:

{if $main ne "cart" and $smarty.get.mode ne "checkout"}

See if that does the trick for you
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 02-01-2006, 06:20 AM
 
Lucent88 Lucent88 is offline
 

Senior Member
  
Join Date: Aug 2005
Posts: 147
 

Default

Thank you that works.

Is it possible to do one column? Like there is only header, center content, and footer, no left and right column menus.
Reply With Quote
  #4  
Old 02-01-2006, 06:38 AM
 
balinor balinor is offline
 

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

Default

Yes, I do that all the time. You can either use {if} statements to hide the side columns in certain areas, or you can just remove them all together.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 02-01-2006, 07:44 AM
 
Lucent88 Lucent88 is offline
 

Senior Member
  
Join Date: Aug 2005
Posts: 147
 

Default

I dont want to remove all of them. I would like to do it by cases..

for example...

product list page (3 column)
Product detail (2 column - main content & left column)
cart (1 column - main content)

Also, please forgive my ignorance... can you explain the following statement to me

{if $main ne "product" and $main ne "cart" and $smarty.get.mode ne "checkout"}

if product _____ and cart_____ and smarty_________ checkout

what does ne mean?
Reply With Quote
  #6  
Old 02-01-2006, 07:52 AM
 
balinor balinor is offline
 

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

Default

That statement means if the current page ($main) is not the product detail page (product), cart page (cart), or checkout pages (checkout).

So yes, you could set up the site the way you describe, will just get a bit tricky with those if statements
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 02-01-2006, 09:42 AM
 
Lucent88 Lucent88 is offline
 

Senior Member
  
Join Date: Aug 2005
Posts: 147
 

Default

so, it means

if current page is not this, this and this, then don't show the content, right?

Is it possible to do
if current page is this, then use this home.tpl layout, kind of statement? so, I can set up different home.tpl layout for different pages....

another question..

there are product page, cart page, checkout page, category, product list, customer login, ...etc

Is there a way I can find out all the pages out there? What folder would I look in for all the pages?
__________________
X-Cart Gold 4.0.17
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 02:28 AM.

   

 
X-Cart forums © 2001-2020