|
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 |
directphp Smarty n00b
Joined: 19 Nov 2017 Posts: 2
|
Posted: Sun Nov 19, 2017 3:19 pm Post subject: i cant used this code |
|
|
how can used this code in file tpl
Code: | data-frames='[{"from":"y:[100%];z:0;rX:0deg;rY:0;rZ:0;sX:1;sY:1;skX:0;skY:0;","mask":"x:0px;y:0px;s:inherit;e:inherit;","speed":1500,"to":"o:1;","delay":1000,"ease":"Power3.easeInOut"},{"delay":"wait","speed":1000,"to":"auto:auto;","mask":"x:0;y:0;s:inherit;e:inherit;","ease":"Power3.easeInOut"}]' |
|
|
Back to top |
|
bsmither Smarty Elite
Joined: 20 Dec 2011 Posts: 322 Location: West Coast
|
Posted: Sun Nov 19, 2017 5:18 pm Post subject: |
|
|
Smarty is not the engine to derive or calculate the value for data-frames. PHP will have to do that.
But once calculated, and the JSON string is assigned to a PHP variable, then...
In PHP, having instantiated the Smarty class:
$smarty->assign('DATA_FRAME_OBJECT_1', $json_string);
The template code will be:
data-frames="{$DATA_FRAME_OBJECT_1}" |
|
Back to top |
|
directphp Smarty n00b
Joined: 19 Nov 2017 Posts: 2
|
Posted: Sun Nov 19, 2017 6:35 pm Post subject: |
|
|
thank you very much |
|
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
|