Smarty template detection and showing jQuery

I lke to set init function based on template detection. Template detection is actually current template file using $smarty.template.

How to achieve result using standard smarty function. Example is the following:

Code:

{if $smarty.template == Mytemplatefile.tpl}
{nocache}
{literal}

{/literal} {/nocache} {/if}

Need help how to do in the correct way. Javascript file should not be shown if there is other tpl file.

Need help.

What is the problem you’re having?

{if $smarty.template == Mytemplatefile.tpl}

What is the correct detection of current template inside IF?
My name is the following:
Mytemplatefile.tpl

Current template is detected by $smarty.template

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.