Maybe I will set
{nocache}
{literal}
I'm new to Smarty but when to set
{nocache}
{literal}
When to put {nocache} {literal}?
Moderator: General Moderators
- waytoecommerce
- Forum Newbie
- Posts: 16
- Joined: Tue Apr 12, 2011 11:47 am
Re: When to put {nocache} {literal}?
Use of LITERAL :
When ever you are using js in the middle or in the smarty doc you have to use {literal} tags
Example :
when you want to disable cashing of template section then at that time use {nocache} tags
When ever you are using js in the middle or in the smarty doc you have to use {literal} tags
Example :
Code: Select all
{literal}
<script> function example(a,b) {
number += a;
alert('You have chosen: ' + b);
}
</script>
{/literal}Code: Select all
{nocache}
{$smarty.now|date_format}
{/nocache}