assign('name', 'John Doe'); $smarty->display('index.tpl'); ?>
template_dir = '/path/to/templates/'; $smarty->compile_dir = '/path/to/compiled/templates/'; $smarty->config_dir = '/path/to/configs/'; $smarty->cache_dir = '/path/to/cache/'; $smarty->assign('name', 'John Doe'); $smarty->display('index.tpl'); ?>In this example, we’re configuring CSmartyDP to use a custom template directory, compiled template directory, configuration directory, and cache directory. We’re also assigning a value to the “name” variable and using it in the “index.tpl” template. Package Library: Smarty - the PHP Template Engine.