|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
tzak902 Smarty n00b
Joined: 28 May 2019 Posts: 2
|
Posted: Tue May 28, 2019 1:29 am Post subject: Issue with Smarty |
|
|
Hello,
I have Edited the OrderDetailController file and added a simple function to do some tests before implementing desired code:
Code: | public function SayHello (){
$HelloWorld = "Hello World";
$this->context->smarty->assign('HelloWorld' , $HelloWorld);
} |
and I added the following to my tpl file in my view:
Code: | <li><strong>Tracking#</strong> {$HelloWorld}</li> |
All I'm getting is Undefined Index HelloWorld
Not sure what's the issue |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Tue May 28, 2019 4:52 am Post subject: |
|
|
You can't modify running template variables from outside.
This is done for security and consistency reasons. |
|
Back to top |
|
tzak902 Smarty n00b
Joined: 28 May 2019 Posts: 2
|
Posted: Tue May 28, 2019 3:29 pm Post subject: |
|
|
AnrDaemon wrote: | You can't modify running template variables from outside.
This is done for security and consistency reasons. |
Ok, can you please tell me how to achieve the mentioned code |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|