Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Logo only visible in homepage


Recommended Posts

Posted

I want the logo only visible on the homepage. when I put the code in logo.php, it works fine except in category.

Here the logo is still visible.

 

<?php

if ( (strpos($_SERVER['PHP_SELF'],'index.php')) )

{?>

 

<!--here is the code from the logo-->

<?php

}

?>

 

but if I drop the code below, the logo gone. it is not visible anymore.

 

<?php

if ( strpos($_SERVER['PHP_SELF'],'index.php') && $category_depth == 'top' )

{?>

 

<!--here is the code from the logo-->

<?php

}

?>

 

i hope someone can help me out.

Posted

Do you mean it like this??

 

 

if (isset($cPath) && tep_not_null($cPath)) {

?>

 

<!--here is the code from the logo-->

<?php

}

?>

Posted

Try this

  <?php if(($PHP_SELF == 'index.php') and ($category_depth == 'top')) { ?>
  <!--here is the code from the logo-->
  <?php } ?>
Posted

@@Tsimi

 

This will work in header.php but not in logo.php

I have to put the whole code include the logo in header.php.

 

Is there a way to to it in logo.php ????

Posted

In cm_header_logo.php, find:

    function isEnabled() {
      return $this->enabled;
    }

replace with:

/*
    function isEnabled() {
      return $this->enabled;
    }
*/	
	function isEnabled() {
     global $cPath, $PHP_SELF;
     if(($PHP_SELF == FILENAME_DEFAULT) && isset($cPath) && tep_not_null($cPath)){
      $this->enabled = false;
      }else{
      return $this->enabled;
      }
    }
Posted

tomorrow I will try it directly when I get up.

 

But which of the two is better, or it does no matter????

Posted

logo.php as in logo module. Yes of course. I must have had a blackout that moment.

Do as Ashley says that will work.

Posted

Can you try this inside the cm_header_logo.php

/*
    function isEnabled() {
      return $this->enabled;
    }
*/    
    function isEnabled() {
     global $cPath, $PHP_SELF;
     if(($PHP_SELF != FILENAME_DEFAULT) || tep_not_null($cPath)){
      $this->enabled = false;
      }else{
      return $this->enabled;
      }
    }

Archived

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

×
×
  • Create New...