Removing Footer

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:


main_without_footer.php should look something like that:

<!DOCTYPE html>





       <?php echo $content; ?>




main.php should look something like that:

<?php $this->beginContent('//layouts/main_without_footer'); ?>

<?php echo $content; ?>

<div id='footer'>



<?php $this->endContent(); ?>

Topic moved to General Discussion.