Jump to content

Different layout for certain pages


Recommended Posts

Hi there,

I'm just going through the original template, making the necessary alterations as I go. I've hit a few stumbling blocks, but mostly ok so far.

What I would like to do, is make alterations to the template depending on the page I'm on. I'm pretty handy with HTML and CSS and I've looked through the .tpl files, but can't figure it out.

What I want to do is, for instance, remove the left and right column on the shopping cart page, so it spans the entire page. Is this possible?

Thanks

Link to comment
Share on other sites

It is possible, but there is quite few areas you need to modify, also it will best that you know how prestashop theme works you can visit this link http://www.daveegerton.com/prestashop-guides/Prestashop-Designers-Guide/Themes/modifying-the-default-prestashop-theme.html

I know the link above is base on the old version of Prestashop but it still give you a better understanding.

Now, if you are using the default theme, this is the way I did my theme to change from two or three column to one column
1. Edit your header.tpl
2. Find the line about the left column
3. Add this code for both left and right column:

<!-- Left -->
{if $page_name == 'order'} {else}

   {$HOOK_LEFT_COLUMN}

{/if}



4. Edit your footer.tpl this is where you will find the right column

5. Once you did that, you need to edit the global.css
6. Find any reference to the id="center_column"
7. Edit it by adding this css code:

body#order #center_column {width:900px}

or whatever size you want them to be.
I

I hope this is helpful, good luck!

Link to comment
Share on other sites

  • 2 weeks later...

Yes nicetazmenia, that is top advice! It worked as described and a big thank you from me too.

maybee if you could set light on one more detail. I am using CMS pages to create a homepage withouth any of the shopping blocks.
With your explanation if I do this {if $page_name == 'cms'} {else} ..... it will work for all the CMS pages however is there any way I can address specific CMS pages rather then all of them

Many thanks
nomad

Link to comment
Share on other sites

Nomad,

From my understanding of Prestashop theme structure and coding, part of the home page of prestashop is using Editorial module to display text. I have not try to use the CMS portion of it to be the home page. However, what I have done from some of the theme I have created, I combine the use of Editorial and another module called addstuff where I can display text and images and nothing from the shopping cart and product module display. I prefer that method rather than working with the CMS.

Now back to that code I mentioned before, that code is only going to look for the page name which the file name of the php and not the specific ID, I don't think that is possible from code since you don't know what ID it will be.

But then again, if some one out there have a better idea or have done something with the CMS to display on the home page; I am more than happy to see it and hear from you.

Good luck!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...