Could any one of you guyz help me out. How to remove footer from certain page of yii
Could any one of you guyz help me out. How to remove footer from certain page of yii
Different layout maybe for that specific page?
Google results yii layouts.
Having one main layout with footer and one without, eg. in the layouts folder having
main.php
main_without_footer.php
Set your default layout in Controller.php to be main and then in the controller or action or view you do not want the footer to show, use the other layout just by overwriting it:
$this->layout='//layouts/main_without_footer';
main_without_footer.php should look something like that:
<!DOCTYPE html>
<html>
<head>...</head>
<body>
...
<?php echo $content; ?>
...
</body>
</html>
main.php should look something like that:
<?php $this->beginContent('//layouts/main_without_footer'); ?>
<?php echo $content; ?>
<div id='footer'>
...
</div>
<?php $this->endContent(); ?>
Topic moved to General Discussion.