Our designer works in our own custom layout, located in:


There we modify the default layout Magento_LayeredNavigation::view.phtml

Now we want to add a custom block to this file:


inside the structure of filter.phtml

We wrote a custom module (app/code/vendor/namespace) with a block and we add this information in:


Now our question:

Is it correct that we add this new block in the custom design structure of view.phtml? - Or do we have to move the whole file (view.phtml) into the custom module ( which is bad for the designers .. cause the layout infos are mixed in several modules then! )

1 Answer 1


You have to move your filter.phtml file into your custom module. This way is good for you. Because you have already create new module for your custom file template.This is the proper way to use magento specific way because in future if you remove your extra changes from filter file at that time you have to just disable or remove that module and your functionality is close and default functionality is working.

If you want to change inside theme filter.phtml file this is mot create any problem for you but you have create already module then use inside module tempate file is best way.

  • Hi .. i dont know if i understand your answer. When i move the whole phtml into my custom module than the designers have to add the layout changes there .. i think this is not a good way. I hoped thar a can leave the phtml in the design folder and use xml to place the new block and adress it in the layout folder. Commented Aug 27, 2016 at 9:37
  • You have to ask your designer for that, files comes from this module, This is proper way but you can use customize inside your theme also Commented Aug 27, 2016 at 9:39
  • You have to think site performance level not for your designer and designer can also design inside module file. Most of extension are follow this way not doing inside theme. Commented Aug 27, 2016 at 9:40
  • Plz let me know if any issues. Commented Aug 27, 2016 at 9:50
  • Ok, i now move the view.phtml to my custom module and add a static content .. works fine. A also add a new Block to the structure (without a template) .. i only want to return a value! Commented Aug 27, 2016 at 9:57

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.