Home Page Layout

Locked

Views: 7,680

Results 1 to 20 of 25
This thread is locked. New replies are disabled.
1 Oct 2008, 11:25 AM
#1
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Home Page Layout

Hi I wondered if somebody can help me? I need to have a homepage which is a totally different layout to the rest of my website.

I plan on having feature products on the homepage only and their will be graphics that will be applied on the homepage which will be outside the cart.

So I think I need to build a custom template specifically for the homepage, then the rest of the pages will operate normally.

So can anybody give me an idea of how I would go about this, considering I'm pretty new to ZEN CART.

Thanks
Nick

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

1 Oct 2008, 11:40 AM
#2
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Home Page Layout

I think you need to define some of your terminology. The 'homepage' is normally the first page of website. Will that be a Zen Cart page or no?

If you are looking for some Template ideas you can find some free ones here that work with Zen Cart.

The learning is in the doing.

Potent Products

1 Oct 2008, 12:01 PM
#3
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Home Page Layout

The homepage would need to be a zen cart page in order to update categories, text, etc.

The site I'm building is for a wine merchants and we require featured products to be shown on the homepage only.

The rest of the shopping cart can function as normal.

See the attached document to get an idea of layout. That will be the homepage only.

Many Thanks

Nick

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

1 Oct 2008, 12:27 PM
#4
bigbadboy avatar

bigbadboy

Totally Zenned

Join Date:
Apr 2008
Location:
London
Posts:
557
Plugin Contributions:
0

Re: Home Page Layout

A lot of elements of ZC can be manipulated almost anyway you require.
I have built many custom ZC based sites (as opposed to simply stores) many time manipulating the main page to be beyond simple recognition as a ZC store.

What I am saying is - With ZC almost anything is possible.

1 Oct 2008, 4:50 PM
#5
nowhere avatar

nowhere

New Zenner

Join Date:
Oct 2008
Posts:
14
Plugin Contributions:
0

Re: Home Page Layout

Have you thought about setting your landing page as an EZpage?

1 Oct 2008, 5:09 PM
#6
gjh42 avatar

gjh42

Black Belt

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

Re: Home Page Layout

You can disable header, footer and sidebars for the home page and have all of your code for the functions you want in define_main_page.php. (Ez-pages can't handle PHP code.)

See my site for an example.

1 Oct 2008, 5:10 PM
#7
bigbadboy avatar

bigbadboy

Totally Zenned

Join Date:
Apr 2008
Location:
London
Posts:
557
Plugin Contributions:
0

Re: Home Page Layout

In the past I have used EZ-Pages, custom define pages or the built in main page for the website 'home page' - so, yes it can be done.

3 Oct 2008, 6:35 PM
#9
nosleephotel avatar

nosleephotel

New Zenner

Join Date:
Sep 2008
Location:
Los Angeles, CA
Posts:
67
Plugin Contributions:
0

Re: Home Page Layout

Is there a way to apply a CSS file to just the home page? Or looking at the other side, have the home page call a separate CSS file than the rest of the site.

3 Oct 2008, 6:53 PM
#10
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Home Page Layout

nosleephotel:

Is there a way to apply a CSS file to just the home page? Or looking at the other side, have the home page call a separate CSS file than the rest of the site.
Previous thread/post below should help
http://www.zen-cart.com/forum/showpost.php?p=283764&postcount=6

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

3 Oct 2008, 7:42 PM
#11
nosleephotel avatar

nosleephotel

New Zenner

Join Date:
Sep 2008
Location:
Los Angeles, CA
Posts:
67
Plugin Contributions:
0

Re: Home Page Layout

Thank you, misty. That should help; appreciate it. Another thing I realized, I will need to change the logo to a different .jpg for the home page as well as hide the "Home," "Login," and Search feature. How is this controlled?

3 Oct 2008, 8:10 PM
#12
nosleephotel avatar

nosleephotel

New Zenner

Join Date:
Sep 2008
Location:
Los Angeles, CA
Posts:
67
Plugin Contributions:
0

Re: Home Page Layout

I figured how to hide the "Home," "Login," and Search field by putting```
#navMainWrapper {
display: none;
}

3 Oct 2008, 9:45 PM
#13
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Home Page Layout

nosleephotel:

I figured how to hide the "Home," "Login," and Search field by putting```
#navMainWrapper {
display: none;
}

Depends how you have named logo/header image..
URL of your site is?

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

6 Oct 2008, 4:26 AM
#14
nosleephotel avatar

nosleephotel

New Zenner

Join Date:
Sep 2008
Location:
Los Angeles, CA
Posts:
67
Plugin Contributions:
0

Re: Home Page Layout

Here is the link: http://vanessamooney.com/temp/. I was going to hide the logo by putting```
#logoWrapperOuter {
display: none;
}


I can do the second and third step but making the logo image a different image for just the home page is what I don't know how to do.
6 Oct 2008, 6:07 AM
#15
gjh42 avatar

gjh42

Black Belt

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

Re: Home Page Layout

There is a variant of the Smart Backgrounds code in the support thread (post 104) that is built to switch logos for specific pages. You would put it in /includes/templates/your_template/common/tpl_header.php.
If you only want the home page different, you could simplify that to:```php

<!--bof-branding display--> <div id="logoWrapper"> <?php //Smart Backgrounds - for foreground logo - homepage only - 20081006 $smart_image = ''; //change filename to smartimg_ and pagename only if page image exists $smart_image = (file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartimg_' . $current_page_base . '.gif'))?'smartimg_' . $current_page_base . '.gif':HEADER_LOGO_IMAGE; //default/home page image will be as defined (HEADER_LOGO_IMAGE) // /Smart Backgrounds?> <div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir($smart_image, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . $smart_image, HEADER_ALT_TEXT) . '</a>'; ?></div> ``` Save the homepage logo as /includes/templates/your_template/images/smartimg_indexHome.gif.
9 Oct 2008, 6:09 PM
#16
nosleephotel avatar

nosleephotel

New Zenner

Join Date:
Sep 2008
Location:
Los Angeles, CA
Posts:
67
Plugin Contributions:
0

Re: Home Page Layout

Thanks, Glenn. I'll give it a go.

29 Oct 2008, 9:26 PM
#17
nosleephotel avatar

nosleephotel

New Zenner

Join Date:
Sep 2008
Location:
Los Angeles, CA
Posts:
67
Plugin Contributions:
0

Re: Home Page Layout

Okay, new questions, guys. I want to add a div layer with some image buttons at the top of my home page. Is there a way I can add this in the tpl_header.php but only for the home page or put it in the code just before the tpl_header.php is called (not sure which file this would be? Here is a screen shot of what I'm trying to accomplish: Screenshot

30 Oct 2008, 5:43 AM
#18
gjh42 avatar

gjh42

Black Belt

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

Re: Home Page Layout

Those two buttons would definitely want to go in tpl_header.php, not before it.
Surround the div with a test:```php

<?php if ($this_is_home_page) { >? your HTML button code; <?php } ?>
30 Oct 2008, 7:49 PM
#19
nosleephotel avatar

nosleephotel

New Zenner

Join Date:
Sep 2008
Location:
Los Angeles, CA
Posts:
67
Plugin Contributions:
0

Re: Home Page Layout

Glenn, thanks for the help. :D Only tweak was putting the "?" on the left of the ">" in the first line. So it was like:```php

<?php if ($this_is_home_page) { ?>

your HTML button code;

<?php } ?>
10 Nov 2008, 3:05 PM
#20
erezw avatar

erezw

New Zenner

Join Date:
Dec 2007
Posts:
57
Plugin Contributions:
0

Re: Home Page Layout

gjh42:

You can disable header, footer and sidebars for the home page and have all of your code for the functions you want in define_main_page.php. (Ez-pages can't handle PHP code.)

See my site for an example.

I added my code to define_main_page.php yet it does not show on the main page? any ideas?

Currently it starts with one of the categories yet even if i disable that, i just get a blank area.

Thanks
Erez

https://www.respectyourtaste.com