Catch errors on missing templates
Pages that are missing a template will cause a error 500. We now catch this and display a default string. Fixes #513
This commit is contained in:
parent
dcc0596c8f
commit
c0b0d438b8
@ -59,7 +59,7 @@
|
|||||||
<div class="message {$smarty.session.POPUP[popup].TYPE|default:"success"}"><p>{$smarty.session.POPUP[popup].CONTENT}</p></div>
|
<div class="message {$smarty.session.POPUP[popup].TYPE|default:"success"}"><p>{$smarty.session.POPUP[popup].CONTENT}</p></div>
|
||||||
{/section}
|
{/section}
|
||||||
{/if}
|
{/if}
|
||||||
{include file="$PAGE/$ACTION/$CONTENT"}
|
{if file_exists($smarty.current_dir|cat:"/$PAGE/$ACTION/$CONTENT")}{include file="$PAGE/$ACTION/$CONTENT"}{else}Missing template for this page{/if}
|
||||||
</div>
|
</div>
|
||||||
<div class"clear"></div>
|
<div class"clear"></div>
|
||||||
<div id="footer" style="font-size: 10px;">
|
<div id="footer" style="font-size: 10px;">
|
||||||
|
|||||||
@ -47,7 +47,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
{include file="$PAGE/$ACTION/$CONTENT"}
|
{if file_exists($smarty.current_dir|cat:"/$PAGE/$ACTION/$CONTENT")}{include file="$PAGE/$ACTION/$CONTENT"}{else}Missing template for this page{/if}
|
||||||
</div><!-- /content -->
|
</div><!-- /content -->
|
||||||
<div data-role="footer" data-position="fixed">
|
<div data-role="footer" data-position="fixed">
|
||||||
{include file="global/footer.tpl"}
|
{include file="global/footer.tpl"}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user