Skip to main content

Questions tagged [default.xml]

14 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
3 answers
3k views

How to Get Top Menu in Header as dropdown in Magento 2

Want to show top links as "DROPDOWN" in custom theme. Trying from many days but still no success. Have to show "Sign In/Up" Link in toplinks when customer is not logged in. After Customer Logged In "...
Vinay's user avatar
  • 443
2 votes
2 answers
2k views

Magento2.3 add custom phtml files to footer

I have a Magento 2.3 website that has a child theme of Luma setup and bootstrap added. What I want is to in the footer is to call in a customfooter.phtml file so I can setup the footer to be a 4col ...
Jayreis's user avatar
  • 725
1 vote
1 answer
518 views

Wrap Block In Container

I am including the extension Ves MegaMenu in my theme in default.xml. How can I wrap this within a container? <referenceBlock name="page.wrapper"> <block class="Ves\Megamenu\Block\Menu" ...
Chris Oliver's user avatar
1 vote
1 answer
113 views

Preventing the call to default.xml

I have default.xml overridden into my custom_theme but is actually an empty file(need not worry about the content). I want to prevent magento 2 from calling this empty file so as to improve the system ...
YDF's user avatar
  • 193
1 vote
4 answers
2k views

Search result page blank page

Does somebody know why the xml bellow causes blank page on search result page ? Im using luma theme and have custom theme with Magento_Theme/layout/default.xml. All pages are shown correctly exept ...
matin's user avatar
  • 463
0 votes
1 answer
19 views

Permanently tick use default box

We would like to permanently tick the 'use default box' for all of our products. Can someone elaborate on how this can be done? Thanks!
Names_Life's user avatar
0 votes
1 answer
84 views

Adding custom link in the beginning of the top.links section using default.xml

I have created a custom link using default.xml and moved it inside the top.links reference block. This is my code <referenceBlock name="top.links"> <block class="Magento\...
Rajeev Singh's user avatar
0 votes
1 answer
43 views

Changes in the child custom theme are not visible in the front end

<referenceBlock name="footer_links"> <block class="Magento\Framework\View\Element\Html\Link\Current" name="about-us" before="search-term-popular-link&...
kks's user avatar
  • 19
0 votes
0 answers
245 views

How to defer CSS via layout xml?

I'm trying to defer a CSS file through default_head_blocks.xml. After reading through as much as possible on here - and across the internet - I came across an answer suggesting to add defer="...
Terence Patane-Ronan's user avatar
0 votes
1 answer
608 views

Magento 2 - Custom Head PHTML showing in body

I am trying to create dynamic head using phtml on Magento 2.3.5 p1. I am inserting in default.xml the following: <page> <body> ... <referenceContainer name="head.additional&...
archigrafix's user avatar
0 votes
1 answer
195 views

How to remove compare product icon from new products widget?

As the title asks, how do I remove the "add to compare" button from a "new products" widget? Currently this is what's I'm seeing ... but only within this widget: I've got the ...
BugHunterUK's user avatar
0 votes
1 answer
74 views

Magento 2: Make changes to default.xml programmatically

I was wondering if it's possible to make changes to default.xml programmatically? Use case is as follows: I want a different theme being loaded when a certain mode is activated for example by ...
Wokkel's user avatar
  • 181
0 votes
2 answers
1k views

Magento 2.2.4 - Moving and removing reference block in default.xml not working on localhost

This is my first theming product using Magento 2. I have themed Magento 1.9 previously (twice). I have tried to move elements or remove blocks in the default.xml file but nothing seems to be working....
Amy Ling's user avatar
  • 400
-1 votes
1 answer
169 views

Magento2 static block now being moved via xml

I have a Magento2.4 based site and I edited the default.xml to load static cms block in the footer div and align them next to each other. My issue is one of the static blocks keeps appear outside the ...
Jayreis's user avatar
  • 725