This method works for Magento 1 but not for Magento 2 (version 0.42.0-beta10): http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/admin/using_custom_admin_theme_templates
The Process is quite similar to creating a theme for frontend.
1. Create theme.xml in
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd"> <title>Magento 2 backend</title> <parent>Magento/backend</parent> // set parent theme </theme>
2. Register theme in
3. Enable theme.
you can enable frontend theme in admin, but for backend you need to enable the theme through di.xml
app/code/Magento/Theme/etc/di.xml, you can find block of code below.
add this block of code to your module and change adminhtml to your admin package and theme name.
<type name="Magento\Theme\Model\View\Design"> <arguments> <argument name="themes" xsi:type="array"> <item name="frontend" xsi:type="string">Magento/luma</item> <item name="adminhtml" xsi:type="string">Magento/backend</item> </argument> </arguments> </type>
Now you can overwrite something in you admin theme to see whether it works.
The theme system has changed a bit in Magento 2 but there are similarities.
First you need to create a theme folder in
app/design/frontend. The folder structure is similar to the modules structure. You have to have a vendor name (in Magento 1 was called package) and a theme folder .
Then you have to declare your theme.
you need to create inside your theme folder a file
theme.xml with the following content:
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd"> <title>Your theme name</title> <parent>Magento/blank</parent><!-- or any other parent theme similar to Magento 1.9 --> <media> <preview_image>media/preview.jpg</preview_image> </media> </theme>
then create a preview image of your theme inside your theme in the
media folder(create this also) and call the preview image
preview.jpg (as declared in the XML above).
Now your theme is set.
If you want to change something from the parent theme all you need to do is copy the file you want to change (layout, template) to your theme from the specific module and do your magic.
For example if you want to change the way that the product view page looks like copy the file
app/design/frontend/Vendor/theme/Magento_Catalog/layout/catalog_product_view.xml and change what you need.
More details about creating a theme can be found here.
I also found a sample theme that you can use as guideline.
You can also install the official sample data and you will get a theme called
luma where you can see the folder structure.
In case someone has problems with generating static files for newly created admin theme. In order for magento to generate files for backend theme on setup:static-content:deploy,
folder should contain files. Any dummy file would do the job.
To create admin Theme please follow below links, it must be work.