Can anyone tell me how to add php code in .tpl file e.g i want to add the following code but it didn't work
{php}
if(isset($_GET['redirect']) && $_GET['redirect']=='clipboard'){
echo '<input type="hidden" name="check" value="redirect" />' ;
}
else{
echo '<input type="hidden" name="check" value="notredirect" />' ;
}
{/php}
I think that what you want is this:
input type="hidden" name="check" value="{if $smarty.get.redirect != "clipboard"}not{/if}redirect" />
You must set:
'allow_php_in_templates' => true, // Allow to use {php} tags in templates
in your config.local.php, and then it will work.
Enjoy .................... :)

HELLO GET OUT OF FINANCIAL MESS WITH THE HELP OF drbenjaminfinance@gmail.com
ReplyDeleteI have been in financial mess for the past months, I’m a single mum with kids to look after. My name is REBECCA MICHAELSON, and am from Ridley Park, Pennsylvania. A couple of weeks ago My friend visited me and along our discussion she told me about DR BENJAMIN OWEN FINANCE of drbenjaminfinance@gmail.com that he can help me out of my financial situation, I never believed cause I have spend so much money on different loan lenders who did nothing other than running away with my money. She advised, I gave it a try because she and some of her colleagues were rescued too by this Godsent lender with loans to revive their dying businesses and paying off bills. so I mailed him and explain all about my financial situation and therefore took me through the loan process which was very brief and easy. After that my loan application worth $278,000.00USD was granted, all i did was to follow the processing and be cooperative and today I am a proud business owner sharing the testimony of God-sent Lender. You can as well reach him through the Company WhatsApp +19292227023 Email drbenjaminfinance@gmail.com
THANK YOU VERY MUCH