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,
  • you want to know difference between theme or module ? or need to know difference between there registration.php file ? – Manthan Dave Jan 25 '18 at 10:49
2

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, privacy policy and cookie policy

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