Manaus Posted April 5, 2021 Share Posted April 5, 2021 Hello, I'm using the Smarty Template engine, and I would like to include a 'variables' file in each page, without explicitly including it in every file (I'm lazy and dry ?, either .php or Smarty template. Something like functions.php in WP environment. If not possible, what is the best way? Thanks Link to comment Share on other sites More sharing options...
elabx Posted April 5, 2021 Share Posted April 5, 2021 https://github.com/blue-tomato/TemplateEngineSmarty Check the last part of the docs, Extending Smarty, it has an example on how to register object/functions. Quote Something like functions.php in WP environment If I understand correctly functions.php, the kind of functionality that it enables would translate on the hook system of ProcessWire. https://processwire.com/docs/modules/hooks/ 1 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