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 !

up vote 1 down vote accepted

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

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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