Forums / Templates, Stylesheets, Page Layout / how do I change the home page layout?

how do I change the home page layout?

Started by scottdb on 31 Jul 2011, 4:42 PM · Views: 1,947

Results 1 to 17 of 17
31 Jul 2011, 4:42 PM
#1
scottdb avatar

scottdb

New Zenner

Join Date:
Jul 2011
Posts:
95
Plugin Contributions:
0

how do I change the home page layout?

Hi, I wanted to change the layout of the main page. Take out the sidebars and stuff without changing the layout of the rest of the site. What file do I need to edit to do this?

Was able to change it in firebug to what I want but cant figure out what page it is that I was editing in firebug.

Best Regards,
Scott
**My test site**

31 Jul 2011, 7:14 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: how do I change the home page layout?

Look in your template's common/tpl_main_page.php file. The header block explains what you need to do.

If your template doesn't have one, copy the one in template_default/common to your template's common folder.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

31 Jul 2011, 11:39 PM
#3
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: how do I change the home page layout?

There are also settings in the Admin Panel that influence layout. EG: you can GLOBALLY disable a side column (or both if you wish), just by clicking a switch in Configuration >>> Layout Settings...

Stylesheets too, can be used to influence layout.

20 years a Zencart User

6 Aug 2011, 5:08 PM
#4
scottdb avatar

scottdb

New Zenner

Join Date:
Jul 2011
Posts:
95
Plugin Contributions:
0

Re: how do I change the home page layout?

Look in your template's common/tpl_main_page.php file. The header block explains what you need to do.

I have been messing around with this and can figure out how to edit the css and the tpl_main_page.php to make it look the way I want it but a little confused on how to make the main page different from the rest of the site. if I change the common/tpl_main_page.php file and save and upload and overwrite it changes the whole site. I understand that I take this template and change it and rename it to the new page that I want to make it into but for the main page what do I call it? Index.php? A little confused here. This is not like editing a regular simple site where all you need to do is edit the index page.

Best Regards,
Scott
**My test site**

6 Aug 2011, 5:11 PM
#5
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,887
Plugin Contributions:
20

Re: how do I change the home page layout?

Look at the read me in the CSS folder of your template.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

6 Aug 2011, 5:21 PM
#6
scottdb avatar

scottdb

New Zenner

Join Date:
Jul 2011
Posts:
95
Plugin Contributions:
0

Re: how do I change the home page layout?

Wow that was quick. Thanks. I understand that I can change and rename the css for a particular page but I'm not only changing the css but the layout as well. When I change the common/tpl_main_page.php file to become the new main page what do I do with it that will make the main page become the new edited one and leave the other pages as they were.

Best Regards,
Scott
**My test site**

6 Aug 2011, 5:28 PM
#7
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,887
Plugin Contributions:
20

Re: how do I change the home page layout?

Perhaps you would be better served using an ezpage instead. Can't visualize a justification for two versions of the main page.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

6 Aug 2011, 5:45 PM
#8
scottdb avatar

scottdb

New Zenner

Join Date:
Jul 2011
Posts:
95
Plugin Contributions:
0

Re: how do I change the home page layout?

dbltoe:

Perhaps you would be better served using an ezpage instead. Can't visualize a justification for two versions of the main page.

As I understand it the ezpage is for making a new page in addition to the exsisting ones. I am not trying to make two versions of the main page. I want to change the main page layout only.

Best Regards,
Scott
**My test site**

6 Aug 2011, 5:51 PM
#9
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,887
Plugin Contributions:
20

Re: how do I change the home page layout?

So, we seem to be going in circles. Are you wanting to keep or remove things like the header, footer, side-columns and change what is left?
If so, you,d only need to modify the define_ main_page.php file for that specific area.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

6 Aug 2011, 5:59 PM
#10
scottdb avatar

scottdb

New Zenner

Join Date:
Jul 2011
Posts:
95
Plugin Contributions:
0

Re: how do I change the home page layout?

Yes I want to change just about everything on the main page. Take out side bars, change header, footer, different background images and more. I just cant seem to do it without changing every page to the new pg edits. I want this page to be my main page or index page but will be totally different from the other pages.

Best Regards,
Scott
**My test site**

6 Aug 2011, 6:09 PM
#11
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,887
Plugin Contributions:
20

Re: how do I change the home page layout?

Then it would be simplest to use a stylesheet to turn off everything but the define_main_page content and create it as you want.
Remember that your HTML, body, etc will be created already and would double if used in the define_main_page.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

6 Aug 2011, 6:21 PM
#12
scottdb avatar

scottdb

New Zenner

Join Date:
Jul 2011
Posts:
95
Plugin Contributions:
0

Re: how do I change the home page layout?

OK, so let me see if I am understanding this. The common/tpl_main_page.php file controls the layout for every page. I can make new pages from this by editing, renaming and placing in the correct directory but I cant use this to create a new index page only?

Best Regards,
Scott
**My test site**

6 Aug 2011, 6:38 PM
#13
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,887
Plugin Contributions:
20

Re: how do I change the home page layout?

A bit confusing, but the tpl defines the main part of each page while the define_main_page defines only the content of the main page between the side columns and between the header and footer.
Thus the caution to not duplicate anything but what would go inside the body tags in the define_main_page.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

6 Aug 2011, 6:50 PM
#14
scottdb avatar

scottdb

New Zenner

Join Date:
Jul 2011
Posts:
95
Plugin Contributions:
0

Re: how do I change the home page layout?

Ok I understand this and I do want to keep the define main page the same and leave it in the tpl so that I can edit it from the admin. What I am not getting is if there is a way to make a different tpl for the index page that will be different from the tpl for the rest of the site. I understand that I will have to use a different css as well.

Best Regards,
Scott
**My test site**

6 Aug 2011, 7:31 PM
#15
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,887
Plugin Contributions:
20

Re: how do I change the home page layout?

no need for the different tpl. Just use the custom stylesheet to turn on or off whatever you want.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

6 Aug 2011, 7:36 PM
#16
scottdb avatar

scottdb

New Zenner

Join Date:
Jul 2011
Posts:
95
Plugin Contributions:
0

Re: how do I change the home page layout?

Ok, Ill try to edit a custom style sheet for the index. Can you tell me where in the css I edit to remove the side bars?

Best Regards,
Scott
**My test site**

6 Aug 2011, 10:12 PM
#17
scottdb avatar

scottdb

New Zenner

Join Date:
Jul 2011
Posts:
95
Plugin Contributions:
0

Re: how do I change the home page layout?

Or is it even possible to remove the sidebars from the index or home page without removing them from the rest of the site?

Best Regards,
Scott
**My test site**