Jump to content

Recommended Posts

Posted

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.

Posted

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:

 

  • Like 2

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...