2

What is the difference between a THEME And Module in Magento 2 ?

Theme Registration.php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'Inchoo_Helloworld',
    __DIR__
);

Module Registration.php

 \Magento\Framework\Component\ComponentRegistrar::Module,
1
  • you want to know difference between theme or module ? or need to know difference between there registration.php file ? Commented Jan 25, 2018 at 10:49

1 Answer 1

3

To register the module, you need to create a registration.php file with the following content:

app/code/[VendorName]/[ModuleName]/registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    '[VendorName]_[ModuleName]',
    __DIR__
);

To register your theme in the system, in your theme directory you need to create a registration.php file with the following content:

app/design/frontend/[VendorName]/[themename]/registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/[VendorName]/[themename]',
    __DIR__
);

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.