dinopacha Posted September 15, 2015 Posted September 15, 2015 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.
Hotclutch Posted September 15, 2015 Posted September 15, 2015 Homepage only implies $cPath not set, so try something with isset($cPath) OR !isset($cPath)
dinopacha Posted September 15, 2015 Author Posted September 15, 2015 Do you mean it like this?? if (isset($cPath) && tep_not_null($cPath)) { ?> <!--here is the code from the logo--> <?php } ?>
dinopacha Posted September 16, 2015 Author Posted September 16, 2015 oops it does not work quite well. someone who can help me further. :(
♥Tsimi Posted September 16, 2015 Posted September 16, 2015 Try this <?php if(($PHP_SELF == 'index.php') and ($category_depth == 'top')) { ?> <!--here is the code from the logo--> <?php } ?>
dinopacha Posted September 16, 2015 Author Posted September 16, 2015 @@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 ????
♥Tsimi Posted September 16, 2015 Posted September 16, 2015 What is logo.php? Never heard of such a file.
dinopacha Posted September 16, 2015 Author Posted September 16, 2015 Includes/modules/content/header/templates/logo.php
dinopacha Posted September 16, 2015 Author Posted September 16, 2015 @@Tsimi here is where your logo is written. Or is it not the right place for the code.
Hotclutch Posted September 16, 2015 Posted September 16, 2015 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; } }
dinopacha Posted September 16, 2015 Author Posted September 16, 2015 tomorrow I will try it directly when I get up. But which of the two is better, or it does no matter????
♥Tsimi Posted September 16, 2015 Posted September 16, 2015 logo.php as in logo module. Yes of course. I must have had a blackout that moment. Do as Ashley says that will work.
dinopacha Posted September 17, 2015 Author Posted September 17, 2015 @@Ashley Sorry I put the code in cm_header_logo.php as you told but it did not work. The logo is just visible everywhere.
dinopacha Posted September 17, 2015 Author Posted September 17, 2015 @@Ashley Sorry It will work I had the code allready in header.php. :- But the logo shows up when you open the products.
♥Tsimi Posted September 17, 2015 Posted September 17, 2015 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; } }
dinopacha Posted September 17, 2015 Author Posted September 17, 2015 This will do the job. Thank you, :thumbsup: this is just what I needed.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.