Exit from the view


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


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


andy_s, thanks :lol: