0

Where are the Magento Luma theme files located?

Been looking around for them for the past hour and just can't find them. Although the theme is being applied to my store locally, I'm not seeing where the theme files are located at, at all. Can't find any css/scss/less files, js, etc etc. in regards to this theme.

What I'd like to do is copy Luma to my custom theme, then customize it from there. Better to start from something, rather than nothing, is how I see it.

If I enable my custom theme right now, it looks like this: https://i.imgur.com/MyQviW4.png

My theme.xml is:

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>pilot-shop</title>
    <parent>Magento/Luma</parent>
    <media>
        <preview_image>media/theme-image.jpg</preview_image>
    </media>
</theme>

My registration.php file is:

<?php
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/Sportys/pilot-shop',
    __DIR__
);

Thank you.

1

The files that make up the theme are located in vender/magento/theme-frontend-luma.

For customization, you don't have to copy over any file other then the ones you want to change. By creating a child theme with Luma as the parent, you will already have all those file using Magento's inheritance system.

Just note that as you do overrides, you have to follow Magento's naming convention, not the actual file paths. When you look at the Luma theme, you will see how they are doing this, just follow the same naming convention in your theme.

So say you want to customize the catalog xml layout file. The file lives in the Luma theme here:

vendor/magento/theme-frontend-luma/Magento_Catalog/layout/catalog_product_view.xml

For you, that same file will live in:

app/design/frontend/{{vendor_namespace}}/{{theme}}/Magento_Catalog/layout/catalog_product_view.xml

  • I am confused, I have created the custom theme, and set it's parent to <parent>Magento/Luma</parent> and it looks like this when I enable it: i.imgur.com/MyQviW4.png What am I doing wrong? @circlesix – James Nov 15 '17 at 20:45
  • There could be two things at work here, but likely you need to recompile your static files with this CLI command in the root of you site: php bin/magento setup:static-content:deploy . You have defined the theme and magento is seeing that definition, but those theme files have not been compiled down and served up to you. If you look in the pub/static/frontened folder, you wont see your theme files there. After you compile, you will. Also, check the deploy mode you are in with php bin/magento deploy:mode:show. You might be in default mode, which you will need to change to developer. – circlesix Nov 15 '17 at 20:55
  • The second thing could be file permissions. If you think that is the case just run chmod -R 777 pub/static/frontend and that will clear that up. – circlesix Nov 15 '17 at 20:56
  • Hmm neither of those did anything. I did switch to Developer mode, but that didn't solve it. I'm using xampp on Windows for my local dev environment, so I don't think chmod is an issue. When I used the deploy command, it says: "[Magento\Framework\Exception\LocalizedException] NOTE: Manual static content deployment is not required in "default" and "developer" modes. In "default" and "developer" modes static contents are being deployed automatically on demand. If you still want to deploy in these modes, use -f option: 'bin/magento setup:static-content:deploy -f'" – James Nov 15 '17 at 21:07
  • What do you see in the pub/static/frontend/ folders? you should see two folders, one called Magento and the other should be your theme. is that there? – circlesix Nov 15 '17 at 23:08
1

Luma theme you can find in this location:

vendor/magento/theme-frontend-luma

if you want to customize or override then you have to create theme inside

app/design/frontend/Vendor_name/theme_name/

Note: you can use official document for theme customization: http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/themes/theme-create.html

I hope, it will help you.

0

It should be inside vendor\magento\module-frontend-luma

Follow this document to create new theme from Parent theme Luma or Blank.

http://devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/theme-create.html

  • I am confused, I have created the custom theme, and set it's parent to <parent>Magento/Luma</parent> and it looks like this when I enable it: i.imgur.com/MyQviW4.png What am I doing wrong? @Abhishek Panchal – James Nov 15 '17 at 20:48

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.