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.
-
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 thisJarnail S– Jarnail S2017年06月17日 06:39:33 +00:00Commented 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– hakkim2017年06月17日 06:51:38 +00:00Commented Jun 17, 2017 at 6:51
-
Yes, you can useJarnail S– Jarnail S2017年06月17日 06:53:40 +00:00Commented 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– hakkim2017年06月17日 07:06:30 +00:00Commented Jun 17, 2017 at 7:06
-
clear the content of both files and check siteJarnail S– Jarnail S2017年06月17日 07:14:15 +00:00Commented Jun 17, 2017 at 7:14
1 Answer 1
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
Explore related questions
See similar questions with these tags.