Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Always executer certain php code before smaerty template loa

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    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:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    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