I have a html block which i want to show every pages except the login page.
In my project folder I have these files.
index.php
services.php
about.php
------
------
contact.php
login.php
I have common header which i include via php. In my header I want to show a html block every pages except the login.php page.
In that case I declare a veriable in login.php page // Login.php
<?php
$loginPage = "hide";
?>
Header Section
<?php if (!($loginPage == "hide" )): ?>
<a class="btn btn-secondary signin" href="<?php echo Yii::app()->request->baseUrl; ?>/store/login">Sign in <span class="highlighter"></span></a>
<?php endif; ?>
In common header I have write this code for not showing this block in login.php page. But its not working what's going wrong with this ?
One more thing that I will implement this logic into yii framework. To understand the logic I use raw php.