1

I don't know if this question has answered before. I am creating a custom theme in magento 2.1. My parent theme is magento/blank.

I have copied layout and template files from module-theme\view\frontend and pasted in app/design/frontend/vendor/themename/Magento_Theme/

My problem is that I lost the top links with welcome message after copying and pasting the layout folder. If i rename app/design/frontend/vendor/themename/Magento_Theme/layout to any random name top links appears.

Can any one help me to sort it out? Thank you.

8
  • Copy only file-names not content. And copy only required files which need to edit. You only need to add updated code in these files. try this
    – Jarnail S
    Commented Jun 17, 2017 at 6:39
  • I need exact same layout in as in magento blank. Can I use the same codes in module-theme\view\frontend\layout\default.xml?
    – hakkim
    Commented Jun 17, 2017 at 6:51
  • Yes, you can use
    – Jarnail S
    Commented Jun 17, 2017 at 6:53
  • I have removed the unwanted files. Now my custom theme layout folder have only default.xml and default_head_blocks.xml only. Still it is not working. But if I rename custom theme layout folder to something else, it is working.
    – hakkim
    Commented Jun 17, 2017 at 7:06
  • clear the content of both files and check site
    – Jarnail S
    Commented Jun 17, 2017 at 7:14

1 Answer 1

3

Here are few thing to do:

  • Copy only file-names from parent theme. And copy only required files which need to edit. You only need to add updated code in these files.
  • You add updated code in default.xml file. Only which you want to edit not all. ie if you to remove any element then you can mention like this <referenceBlock name="catalog.compare.sidebar" remove="true"/> inside body tag
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.