I saw two topics about that but I'm still not sure.

I'm discovering Magento 2, I'm a frontend developer and right now, I just want to make my company website's header and footer (html, css) (so a theme)

Which folder should I use ? app/code or app/design.

If I'm creating a new module, I have to create all phtml files, layout, etc... in app/code/../view/frontend/templates/xx.phtml but if I'm overriding an existing module, eg : module-theme or module-catalog, I'm doing it in app/design/frontend/../../templates/xx.phtml?

  • For creating a new module you would place all you code inside app/code/vendorname/modulename/ For editing a theme you can either create a child theme of your current theme and do any changes to that. If you just want to do a few simple amends you can edit your theme which is situated in app/design, just remember that version control is your friend Jan 10, 2020 at 8:51

1 Answer 1


Depends on the approach you want to have.

You need to understand few things.

In the app/design, you only can edit files: phtml, html, less, css, xml The design is last in the chain than anything that happens in the app/code. So if something happens in luma design, you can have troubles changing things in the app/code.

In the app/code this is a place for new modules. You can't access the mage lib here. Your can't change the templates that exist in the current design or any of its parent.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.