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.

Quan Le
1,7181 gold badge13 silver badges18 bronze badges
asked Jun 17, 2017 at 6:31
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 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? Commented Jun 17, 2017 at 6:51
  • Yes, you can use 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. Commented Jun 17, 2017 at 7:06
  • clear the content of both files and check site 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
answered Jun 17, 2017 at 7:31
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.