Jump to content

Different layout/template per page (home/catogory/product)


Recommended Posts

Hey all,

 

I want to have different templates for pages.

 

Like:

home page = 1 column

category = 2 columns

product = 3 column

 

I saw that a template is always build with a leftcolumn, middle en rightcolumn...

 

So what is the best way to implement different layouts/templates per page?

 

Or isn't there a best way to implement different layouts?

 

I hope you can help me out!

 

Thanx!

Link to comment
Share on other sites

Hey all,

 

I want to have different templates for pages.

 

Like:

home page = 1 column

category = 2 columns

product = 3 column

 

I saw that a template is always build with a leftcolumn, middle en rightcolumn...

 

So what is the best way to implement different layouts/templates per page?

 

Or isn't there a best way to implement different layouts?

 

I hope you can help me out!

 

Thanx!

You can have 1, 2, 3... or more columns. Have a look at the add-ons website to see examples. Also read the designers' guide to get further info on making themes.

Link to comment
Share on other sites

I indeed read the designer guide and checked the backend. But itsn't that easy. A template is always build with a left column and right column. You can remove a column but that would remove the column for all pages. And what i want is to have for example 1 column for the home page and 3 columns for the category page.

 

But in prestashop youy can not create different templates. What i can do is to switch of all modules when the user is on the categorpage.

 

.Like: if(!$page_name == 'category') {

// show module

}

 

I think that's the only solutions. Or you can set in the backend per module an exclude per page...

 

But i hope there is an better way...but i haven't found it yet....

 

And which add-ons do you mean?

 

Thnx for ur answer!

Link to comment
Share on other sites

A template is always build with a left column and right column.

No, a template is built however you want it build. If you don't want left column, don't add left colum on e.g. product pages only.

 

And that conditional should not be in template anyway and that granular, Rather in the PHP file that calls the relevant template:

 

if (abc) { display tempate a...

if (xyz) { display tempate b...

...

 

I do agree however is that it is a lot of work to create PrestaShop themes. And they are fragile in that on the next release, however minor, you will need to make changes to it or they will become outdated. CSS is a mess, everywhere inline rules. No established module template guidelines; it is possible to come accross a module installed that will totally mess the theme...I don't envy themes

authors.

 

And which add-ons do you mean?

The PrestaShop add-ons shop. Click on the link in previous post and you will get there. Then select templates.

Link to comment
Share on other sites

Thanx for the response and your suggestions! It's good to hear that's possible..

 

I was searching for this...i'm strugling with the desicion opencart or prestashop and want to find out which one

is the best for me!

Link to comment
Share on other sites

  • 6 months later...

I also have the need for changing templates between main page and the rest of the contents.

My designer is leaving me because of a difference of opinion on this subject. He has designed a main page and shop to customer specs. I have to implement it. Designer says as to his knowledge Presta does permit changes of templates freely...HOW?

TIA

Link to comment
Share on other sites

  • 1 month later...

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...