Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Always executer certain php code before smaerty template loa

 
Post new topic   Reply to topic    Smarty Forum Index -> Tips and Tricks
View previous topic :: View next topic  
Author Message
JohnSerbersky
Smarty n00b


Joined: 02 Oct 2013
Posts: 3

PostPosted: Thu Dec 12, 2013 10:26 pm    Post subject: Always executer certain php code before smaerty template loa Reply with quote

I have site of 50 pages and 50 templates. I decided that i want to run certain code after before each template loads

i.e. before
Code:
$smarty->display("pagetemplate.tpl");



I could create function and then add line in every page out of 50, however its not what i want to do.
Is there one place to include code that runs just before smarty "display" procedure runs.

I also not looking for messing with smarty class or any files that can be replaced upon updating smarty.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Tips and Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP