Render Smarty Plugin Content in Vanilla


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?
  2. function render_smarty_plugin($name) {
  3. $path = sys_get_temp_dir();
  4. $filename = 'a' . uniqid();
  5.  
  6. file_put_contents($path . '/' . $filename, '{' . $name . '}');
  7.  
  8. $smarty = new Gdn_Smarty(); $smarty->Render($path . '/' . $filename, $this);
  9. }
  10. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.