I want to modify certain aspects of the out-of-the-box Luma theme but I would like to do it by preserving the original file(s) and also ensuring that whenever I update Magento I preserve my changes as well.
I want to do this by way of a Child Theme.
Does Magento 2 support child themes and, if so, how do I structure my directory path to make this happen?
Solved! Go to Solution.
You can create a child theme in Magento 2. You should use Luma as parent theme.
Please refer following official documentation Create a theme
As per the link you should use following( mentioned under declare your theme section of documentation)
ce" xsi:noNamespaceSchemaLocation="urn:magento:framewo rk:Config/etc/theme.xsd"> <title>New theme</title> <!-- your theme's name --> <parent>Magento/luma</parent> <!-- the parent theme, in case your theme inherits from an existing theme --> <media> <preview_image>media/preview.jpg</preview_image> <!-- the path to your theme's preview image --> </media> </theme>
I followed the instructions and got this error:
There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: 704914686841
When I comment out the contents of the registration.php file, the error goes away
HI, Just a note do not use luma as a parent theme, magento strongly advises against this as it is often changed during upgrade, always use another theme blank theme