skip to Main Content

I am new to Magento.

I am creating Magenta 2 site, I have managed to install Magento, and for it to use the luma theme.

I want to be able to edit the theme (through Inheritance), I understand it uses XML files to design the layout, how do I change these, should they be in the new theme folder, and change them there?

If so, where do I get the origonal Luma xml files, or does magento create these? – There are no themes within the app/ folder, is it here where I create the new theme (that inherits from Luma)?

Many thanks for any help, I am completely new to Magento.

2

Answers


  1. You have to create a custom theme and make theme.xml and set a parent to LUMA.
    Now app/design/frontend/customthemename

    So anything that you want to customized used in customthemename folder

    Thanks

    Login or Signup to reply.
    1. You should create a child theme to edit XML file. To create a child theme, there are 3 steps to do:

    Firstly, create a new theme directory in app/design/frontend.

    Secondly, declare the new theme by:

    • Creating theme.xml: this file identifies the name, parent and other
      basic info of the new theme.
    • Creating Composer.json: this file is used to install the theme via Composer later.
    • Creating registration.php: this file is required in any Magento 2 Extension
      and Themes.
    • Creating static files directories: this folder is used to store CSS, JS, image files.
    • Creating logo folder: this folder contains files that determine the location and size of your new theme logo.

    Thirdly, apply and configure theme in admin: – Run Upgrade Command. – Apply the theme. – Deploy.

    For more detailed tutorial, go to Guide to create Magento 2 theme.

    1. The original XML files of any module and themes are located in vendor/magento//view/frontend/layout, with the module_name is the module related to the XML file you want to edit.

    For example, with homepage CMS, the XML file is located in vendor/magento/module-cms/view/frontend/layout

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search