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

how to have a section with 2 column layout while the rest 3-column

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-08-2007, 08:01 PM
 
pumpkins pumpkins is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 56
 

Default how to have a section with 2 column layout while the rest 3-column

I want to start a FAQ/tutorial section on our site with static embedded pages. However I am thinking I want to have a 2-column layout (the site is currently setup with 3-column). How would I go about doing that?

I found an old thread about this
http://forum.x-cart.com/showthread.php?t=16995&page=2&

but the customer/home.tpl file seems to be different than what I have. Perhaps it is due to the different versions, or maybe I am just looking at the wrong file. Please help.
__________________
X-Cart Gold Version 4.1.8
Reply With Quote
  #2  
Old 08-09-2007, 03:41 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: how to have a section with 2 column layout while the rest 3-column

You're going to love this:

in home.tpl

{if $main eq "pages" and $page_data.pageid eq "1"}
3rd column code goes here
{/if}

-- to find the page ID, hover over the static embedded page link in the admin. You can also make this a RANGE of page IDs. Smarty is your friend.

Cool?
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #3  
Old 08-09-2007, 01:25 PM
 
pumpkins pumpkins is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 56
 

Default Re: how to have a section with 2 column layout while the rest 3-column

Thanks carpeperdiem, I think I understand bit more about this now. However I am confused about the page ID.

1)First of all, when ever you generate a static page in X-cart it assign an ID # to the page, but does that # change? If I add, delete and also change to POS of these static pages, would that mess up the PAGEID? And is it also possible to manually assign page ID so that it could be better managed?

2)how about the other pages? such as home page, product pages and so on. the code on your last post:

{if $main eq "pages" and $page_data.pageid eq "1"}
3rd column code goes here
{/if}

basically says: if pageid equals to 1, then display these(3rd column).

when I just added this into my home.tpl (btw, I haven't play around too much with this, since I have other issues that I need to resolve first), the 3rd column at the home page would disappear. This probably because the homepage does not equal to pageid 1. So how do I make it so that only the new FAQ/Tutorial section has 2-column layout? (sorry this sounded like "please spoon feed me", but I am just too much of a newbie to figure this out.)

3. How would all this be affected if I installed a SEO mod, such as cdseo, DSEFU or XC SEO?

Thanks in advance
__________________
X-Cart Gold Version 4.1.8
Reply With Quote
  #4  
Old 08-09-2007, 01:33 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: how to have a section with 2 column layout while the rest 3-column

Quote:
Originally Posted by pumpkins
1)First of all, when ever you generate a static page in X-cart it assign an ID # to the page, but does that # change? If I add, delete and also change to POS of these static pages, would that mess up the PAGEID? And is it also possible to manually assign page ID so that it could be better managed?

No -- you are stuck with the pageID assigned. it really doesn't matter what it is, it's only for under the hood. The POS has nothing to do with pageID.

Quote:
2)how about the other pages? such as home page, product pages and so on. the code on your last post:

{if $main eq "pages" and $page_data.pageid eq "1"}
3rd column code goes here
{/if}

basically says: if pageid equals to 1, then display these(3rd column).

Not exactly....
If your goal is to REMOVE the 3rd column for the static embedded pages, the if may want to be:
Code:
{if $main eq "pages" and $page_data.pageid eq "1"} {else} 3rd column code goes here {/if}

This will always display the 3rd column code except when pageid 1 is to be displayed.
Quote:
3. How would all this be affected if I installed a SEO mod, such as cdseo, DSEFU or XC SEO?

CDSEO will not have any issues. Can't speak for the others. CDSEO lets the under-the-hood links do their thing, yet the visible links are nice and pretty looking.

Try adding the {else} and see if this works more to your liking.

The next step is to get creative with smarty, and find a RANGE of pageIDs to include/exclude.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #5  
Old 08-09-2007, 04:47 PM
 
pumpkins pumpkins is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 56
 

Default Re: how to have a section with 2 column layout while the rest 3-column

Hey thanks again carpeperdiem, you actually taught me a lot by posting these code. I scan through the if/then thread before and it didn▓t make much sense to me since it seems to be a bit random. I think it will make more sense to me from now on.

Anyway, I still need to read up on more information on this, but just going by the code you gave me, can I do this?:

{if $main ne "pages"}
3rd column code goes here
{/if}

I am thinking this will make it so that whenever it calls on pages.php, the layout would be 2-columns and the rest would be 3-column. I▓ll test this out in a bit, but let me know if you think this will create problem down the road.

As far as the SEO mods, I▓ll try to learn more about them. I want to start optimizing my page, and there are lots of information on this subject in the forum, however it just seems that the information is scattered all over the place, and for someone who is new to both X-cart and SEO, it is quite difficult to piece together (or it just takes time).
__________________
X-Cart Gold Version 4.1.8
Reply With Quote
  #6  
Old 08-09-2007, 04:53 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: how to have a section with 2 column layout while the rest 3-column

Quote:
{if $main ne "pages"}
3rd column code goes here
{/if}

I am thinking this will make it so that whenever it calls on pages.php, the layout would be 2-columns and the rest would be 3-column.

Yes, if that's what you want.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
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 10:01 PM.

   

 
X-Cart forums © 2001-2020