Exit from the view

Hi!

In some views I need to be able to get exit immediately from current view. For example, at the beginning of the view I write:


<?php if ( !$model ): ?>

    <h1>No photos available</h1>

<?php endif; ?>

And after that I want to exit and not execute the following code. If just write


exit();

it will interrupt all scripts, including the layout and I won’t see my footer




return;



andy_s, thanks :lol: