- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone, just started playing with theme creation in magento 2 and want to use Luma as a starting point. Instead of copying this theme I want to create a theme based on luma, but can't seem to get it to work.
Steps:
created folder /app/design/frontend/mycompany/mytheme
created /app/design/frontend/mycompany/mytheme/theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>My main theme</title>
<parent>Magento/luma</parent>
</theme>created /app/design/frontend/mycompany/mytheme/composer.json
{
"name": "mycompany/mytheme",
"description": "My theme",
"require": {
"php": "~5.5.0|~5.6.0|~7.0.0",
"magento/theme-frontend-luma": "100.0.*",
"magento/framework": "100.0.*"
},
"type": "magento2-theme",
"version": "100.0.2",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"autoload": {
"files": [
"registration.php"
]
}
}created /app/design/frontend/mycompany/mytheme/registration.php
<?php
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME,
'frontend/mycompany/mytheme',
__DIR__
);Unfortunatly this does not seem to work.
How can I create a theme based on a theme?
To explain, it loads all the files (but none of the CMS blocks) and when I create a different file web/images/logo.svg it still takes the file from Luma
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The CMS Blocks are bound to a specific theme under CONTENT> Widgets there you will see that they are all bound to Magento Luma
You have to create new Widgets and bind them to your new theme
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Creating theme based on Luma
Ok, thank you. That is strange. That means if I want to create a holiday theme I also have to recreate widgets. Is there no better way to call for blocks then?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Creating theme based on Luma
you could add them directly in your template (phtml) files
but i only did it in a tutorial for Magento 1.9 never in Magento 2.0
but if you read through the Developer guide, maybe there is another way for that ^^
oh and you can call for blocks in Pages i think, but i am also pretty new to magento
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Creating theme based on Luma
Ok...theme inheritance is not working that good as Wordpress.
Luckily i find this post after 2 days of trying everything...