Smarty:禁用包括错误

I have few templates included in index. Index is responsible for outputing every page in site. I include them like this:

{include file="`$show`_contentleft.tpl"}

For some reason any of those templates are not needed.

So if i don't have a template, there is smarty error:

Uncaught --> Smarty: Unable to load template file

It should be skipped. How can i disable this?

If I understand you correctly you can simply remove those lines or comment them using:

{*  {include file="`$show`_contentleft.tpl"}  *}

EDIT

After explanation it could be done using file_exists but you need to include also directory structure.

For example in my index.php I have:

$smarty->setTemplateDir('templates');

so in my template I have to use:

{if file_exists("templates/`$show`_contentleft.tpl")}
    {include file="`$show`_contentleft.tpl"}
{/if}

If I don't use correct path in file_exists, file_exists never find this file so never include this file regardless of $show value.