workdreamer Posted December 20, 2016 Posted December 20, 2016 Hello. I am starting to use ProcessWire. So, i need to extend the ProcessTemplate Module. I need to add a required field to the templates into the Advanced Tab (for personal purposes) I already added the field, but inside the core folder, but this is a very bad practice. The best would be add the modifications inside the site folder. How could i extend the core module ProcessTemplate in order to not affect the core, and the processwire read my extended modifications. Thank you very much everyone.
kongondo Posted December 20, 2016 Posted December 20, 2016 Hi @workdreamer. Welcome to ProcessWire and the forums . You are right. Very bad practice to add/remove from the core . To override any core methods you use Hooks (as long as the method you want to override is hookable). There is an example here regarding Templates: And all about Hooks: 2
Ivan Gretsky Posted December 20, 2016 Posted December 20, 2016 @workdreamer There is a way to override core modules, but it is certainly not the best way to handle the situation here in my opinion. But still an option. And welcome to the forums, man! You've found a thing to work on you could only dream of! 3
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