WebDevAE Posted January 19, 2015 Share Posted January 19, 2015 Hi ! I have some HTML code that I have put on different php files to use it on different pages. So, I'd like to do an include of some of my .tpl files on the header.tpl. But, when I do <?php include (PATH_TO_ROOT . '/themes/kreatine-theme/inc/bandeauHeaderMessage.inc.php'); ?> or <?php include "/inc/bandeauHeaderMessage.inc.php";?> nothing appends. (I tried to change the value of allow_php_tag on smarty.class.php, but I didn't find the value. And I tried to use the {php} {/php} tags but then I have a white page ... Thanks a lot for your answers ! Link to comment Share on other sites More sharing options...
imagetag Posted January 19, 2015 Share Posted January 19, 2015 Smarty has a tag {php}{/php}, but it is deprecated for good reason. I would really recommend to put your code to a module and extend the controller. Link to comment Share on other sites More sharing options...
vekia Posted January 19, 2015 Share Posted January 19, 2015 it's against MVC model, use php in controllers, in tpl only html + smarty syntax Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now