Smarty 3 and {php} (General)

by Peter, Monday, September 12, 2011, 06:49 (4631 days ago) @ edkgb
edited by Peter, Monday, September 12, 2011, 06:54

INCLUDE_PHP was deprecated in Smarty, and I had the same issue. Try this:

Put this near the bottom of index.php

## Your code
$navbar = file_get_contents($_SERVER['DOCUMENT_ROOT'].'/public/includes/navbar.inc');
$smarty -> assign ('navbar', $navbar);
 
## Existing code
$smarty->display($theme.'/'.$template); 
?>

Then stick

{$navbar}

in the tpl file(s).


Complete thread:

 RSS Feed of thread