Add template directory(s)
$smarty->addTemplateDir('/path/to/my/templates/');
$smarty->addTemplateDir( '/path/to/my/templates/', '/path/to/another/templates/' );
$smarty->addTemplateDir( '/path/to/my/package/templates/', 'MyPackage' );Here we're adding a directory `/path/to/my/package/templates/` to the search path, but we're also specifying a package library name of "MyPackage". This is useful if you have multiple packages or modules with their own set of templates. Overall, the addTemplateDir() method is a useful tool in extending Smarty's abilities beyond the default search path for template directories.