문제

I have a problem when I add a new theme in my new Magento 2.2.1 CE from scratch, and I try to inherent Luma theme. I sow to many examples but nothing work for me. If I put as parent blank work well but not for Luma. I created inside

app/design/frontend/[vendor_name]/[theme_name]/

my files registrations.php

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

and theme.xml

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>Mbs Tutorial Theme</title>
    <parent>Magento/luma</parent>   
</theme>

On the database my theme parent_id is Luma (id = 2), and I added to the store view design without problems, but they don't inherent Luma.

도움이 되었습니까?

해결책

Looks good. Add new css file to your theme (you can copy from parent), flush cache and run static content deploy

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top