Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Different Homepage Footer


cclayton

Recommended Posts

Posted

Hi Guys,

 

Any ideas how I can have a different footed on just my homepage to the rest of the pages on my site?

 

Thanks!

Founder & Director at CSC Tours Ltd

Posted

I assume it would be something like:

 

<?php

if ($this_is_home_page)

{

include('footer_home.php');

}

else

{

include('footer.php');

}

?>

 

Is that right?

Founder & Director at CSC Tours Ltd

Posted

I am getting closer...

 

<?php
if ( basename($PHP_SELF) == FILENAME_DEFAULT && $cPath==null) {
include(DIR_WS_INCLUDES . 'footer_home.php');
}
else
{
include(DIR_WS_INCLUDES . 'footer.php');
}
?>

 

Any ideas why this isnt working? It now shows footer_home.php on homepage and category pages, when I just want it on homepage.

 

Thanks!

Founder & Director at CSC Tours Ltd

Posted

Try this:

 

if( $PHP_SELF== FILENAME_DEFAULT && $category_depth == 'top' ) {
 include( DIR_WS_INCLUDES . 'footer_home.php' );
} else {
 include( DIR_WS_INCLUDES . 'footer.php' );
}
?>

 

Regards

Jim

 

edit: Editor ate the code.

See my profile for a list of my addons and ways to get support.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...