Forums / Templates, Stylesheets, Page Layout / Disable Footer on Homepage ONLY

Disable Footer on Homepage ONLY

Started by cebra on 18 Jun 2011, 8:49 PM · Views: 1,018

Results 1 to 10 of 10
18 Jun 2011, 8:49 PM
#1
cebra avatar

cebra

New Zenner

Join Date:
Jun 2011
Posts:
23
Plugin Contributions:
0

Disable Footer on Homepage ONLY

How do I disable the footer on my homepage ONLY ie. it must not show on the homepage but on all other pages?

Web address is https://www.cebraonline.co.uk (footer currently shows" contact us" faqs" delivery & returns" and so forth...).

18 Jun 2011, 10:03 PM
#2
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Disable Footer on Homepage ONLY

Cebra:

How do I disable the footer on my homepage ONLY ie. it must not show on the homepage but on all other pages?

Web address is https://www.cebraonline.co.uk (footer currently shows" contact us" faqs" delivery & returns" and so forth...).

open includes/templates/YOUR_TEMPLATE/common/tpl_main_page.php

find the following section of code:

// the following IF statement can be duplicated/modified as needed to set additional flags
  if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes_on_here,separated_by_commas,and_no_spaces')) ) {
    $flag_disable_right = true;
  }

Just above this add the following code:

if ($this_is_home_page) {
$flag_disable_footer = true;
}

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

18 Jun 2011, 10:07 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Disable Footer on Homepage ONLY

Edit in your templates and overrides:
/includes/templates/your_template_dir/common/tpl_main_page.php

and add the code in red:


// bof: disable footer on home page
  if ($this_is_home_page) {
    $flag_disable_footer = true;
  }
// eof: disable footer on home page
  if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_FOOTER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) {

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

18 Jun 2011, 10:08 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Disable Footer on Homepage ONLY

Or use clydejones's code ... both are basically the same, just the position is different ... :cool:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

19 Jun 2011, 9:03 PM
#5
cebra avatar

cebra

New Zenner

Join Date:
Jun 2011
Posts:
23
Plugin Contributions:
0

Re: Disable Footer on Homepage ONLY

Thank you both. I shall try that :smile:

19 Jun 2011, 9:09 PM
#6
cebra avatar

cebra

New Zenner

Join Date:
Jun 2011
Posts:
23
Plugin Contributions:
0

Re: Disable Footer on Homepage ONLY

It works alas it also eliminates the images at the bottom. Can I put the payment and other images in a footer that shows ONLY on the homepage? How do I do this?

19 Jun 2011, 9:22 PM
#7
cebra avatar

cebra

New Zenner

Join Date:
Jun 2011
Posts:
23
Plugin Contributions:
0

Re: Disable Footer on Homepage ONLY

What I meant actually is: Can I create a specific footer banner just for the homepage and leave the "original" footer for all other pages i.e. showing the payment images and membership icons on the homepage (without the information links) but both - information links AND images - on all other pages?

19 Jun 2011, 10:04 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Disable Footer on Homepage ONLY

If you are using the Footer Banner position 3, you can customize the code in the tpl_main_page.php and change:

  if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) {

to read:

  if ($this_is_home_page && SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) {

and the banner will only show on the Home Page and no where else ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

19 Jun 2011, 10:28 PM
#9
cebra avatar

cebra

New Zenner

Join Date:
Jun 2011
Posts:
23
Plugin Contributions:
0

Re: Disable Footer on Homepage ONLY

Superb! That worked fantastically well, Ajeh. Thank you

19 Jun 2011, 11:10 PM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Disable Footer on Homepage ONLY

You are most welcome ... thanks for the update that this worked for you ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!