Magento 2 related Question. Is a block(CMS Static Block) which I create via the Admin Panl, the same as a block which I created programatically in a module (app/code/Vendor/Module1/Block/Bla.php) ?

IF YES: In which folder is the static block(CMS Static Block) I created (via admin panel) located ? Where is the physical php class and the template and the layout XML file ?

IF NO: Where is the difference ?

Please Help I'm very confused. Any resource links are apreciated !


No, they are completely different. CMS blocks are a way to organize frontend static content. They are stored in the database, not anywhere in the file structure.

Php block classes, on the other hand, are generally used for business logic such as 'is this user logged in?' or 'what are the products in this category?'.

Your Answer

