Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Changing only the homepage

Changing only the homepage

Views: 581

Results 1 to 7 of 7
21 Feb 2011, 12:24 AM
#1
kaoschris avatar

kaoschris

New Zenner

Join Date:
Feb 2007
Location:
San Francisco, CA
Posts:
16
Plugin Contributions:
0

Changing only the homepage

I need to alter my homepage to look different from the rest of my site. I have tried creating a directory in my template directory and dropping a copy of tpl_main_page.php into it and it works for altering the homepage, but then also alters the my categories and products page. Is there anyway to just alter my homepage without altering these other pages? Thanks.

21 Feb 2011, 4:03 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Changing only the homepage

In that file find a declare for your items "$this_is_home_page"

22 Feb 2011, 9:34 PM
#3
kaoschris avatar

kaoschris

New Zenner

Join Date:
Feb 2007
Location:
San Francisco, CA
Posts:
16
Plugin Contributions:
0

Re: Changing only the homepage

What do I do from there?

22 Feb 2011, 10:37 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Changing only the homepage

Create the statement for the items that you only want oin your homepage

Read the commented items for guidance

What is it** exactly** that you want as your title "Changing only the homepage" leaves it wide open

22 Feb 2011, 10:48 PM
#5
kaoschris avatar

kaoschris

New Zenner

Join Date:
Feb 2007
Location:
San Francisco, CA
Posts:
16
Plugin Contributions:
0

Re: Changing only the homepage

I want to use the blank sidebox with some information in it to be wider than the other sideboxes on the left side in a two column layout. I also need it to line up with the featured product box so it stays lower than the main content box. I only want this box on the main page, so I was going to create another table just below the table with all the content to keep these two things in. I just can't make it happen on only the main page. Let me know if that makes sense, and I welcome any suggestions you have. Thanks.

23 Feb 2011, 1:18 AM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Changing only the homepage

Unfortunately, the homepage shares a name with category listing and product listing pages.
The changes you are discussing are major enough that you may need to make alternate versions of some parts of the file, and choose which part executes by the $this_is_home_page test.

You would also use this test in the blank sidebox file to decide whether it displays (homepage or not).

Some of the styling should be able to be done in the stylesheet, using an index_home.css stylesheet.

23 Feb 2011, 1:22 AM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Changing only the homepage

Actually, it is possible that all the changes you want can be done in index_home.css, along with the blank sidebox edit. We would need to see your site and a mockup of what you want to give better advice.