cancel
Showing results for 
Search instead for 
Did you mean: 

Correct way to modify a 3rd party extension.

Correct way to modify a 3rd party extension.

Hi,

I'm new to Magento. I've got Magento 2 up and running pretty well so far and have installed a couple of extensions... I just need some guidance on the following:

 

I've got the Magefan Blog extension and I want to modify some of its templates to change the way it looks.

 

  1. Do I modify the app/code/magefan files?
  2. If not, where do I put my modifications so that they are not lost if I update the Magefan Blog in the future?
  3. If I edit the app/code/,magefan files, will my changes be lost when the module is upgraded in the future?

 

thanks for any help you can give,

John.

3 REPLIES

Re: Correct way to modify a 3rd party extension.

1. No

2. It depends on a particular case. Magento 2 gives multiple ways to modify a system behaviour. The most prominent are the plugins, dependency injection, and observers. 

3. Yes.

Re: Correct way to modify a 3rd party extension.

Thanks Dimitri,

I've found lots of info for overriding core files and behaviours. However, I've not found any info about how to modify a 3rd party extension in the app/code folder. In particular I want to override the magefan blog layout and appearance.

In this particular case what would be the appropriate/magento way to modify the appearnace of magefan_blog instaled there?

 

Please forgive me if I'm not being clear enough. Do I need to give other information? I'm an experienced programmer.but I am new to magento.

thanks, John.

Re: Correct way to modify a 3rd party extension.

Hi, 

 

I'd be super grateful if anybody could take on the obvious point of my question.

 

If as DImitry says the answer to 1. is 'no', then, Dimitry's generalisations aside, WHAT is the right way to override the appearance of the magefan templates?

 

I'm sure it 'depends on a particular case' but I have given a 'particular case'. If it isn't 'particular' enough then could someone request the particulars that are missing in order to answer it usefully?

 

thanks again, John.