Questions tagged [default.xml]
The default.xml tag has no usage guidance.
35
questions
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!
0
votes
1
answer
105
views
Difference between various default.xml
I'm trying to do some simple modification to my theme, but I can't understand why there are 2 different default.xml files, one under \vendor\magento\module-theme\view\frontend\layout\ and the other ...
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\...
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&...
0
votes
1
answer
27
views
Changing the positon of sign in and create account from header to footer
I have created a custom theme which has parent theme as luma. Created a folder default.xml inside the theme_name_folder/layout_folder. Trying the change the code but its not reflecting in the theme. ...
0
votes
1
answer
35
views
Footer shows bullets in third column
How do I remove the bullets in the second picture?
I have a website and the footer looks like this:
But now I want to change the third column, but in the third column suddenly appears bullets in ...
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="...
0
votes
1
answer
606
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&...
1
vote
1
answer
618
views
<referenceBlock name="header.container" remove="true" /> removes minicart functionality
I've added <referenceBlock name="header.container" remove="true" /> to my themes default.xml and instead has been replaced with:
<referenceContainer name="page....
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 ...
1
vote
1
answer
205
views
Edit text in Sign In link
I am using a custom theme with Luma parent, and I am trying to change the text of the Sign In link (authorization-link-login) at the top. I am able to edit the text of the register link in my default....
0
votes
1
answer
28
views
Magento 2.3.4: Why doesn't Magento admin configuration take any effect on the `fax` field?
The option for fax under Store->Configuration->Customer->Customer Configuration->Name and Address options was set to NO right from the beginning of the installation of Magento 2. It is ...
0
votes
2
answers
430
views
store logo in not loading
I am overwriting my theme logo in my child theme with the default.xml file but the logo is not loading in the storefront.
This is my default.xml code:
<referenceBlock name="logo">
<...
-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 ...
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 ...
1
vote
1
answer
753
views
Default.xml won't apply to page in Magento 2.3
I have looked at other answers, and there is no problem in my path or my xml file I believe, In my own theme I am extending the blank theme and the blank theme did not contain any layout/default.xml ...
0
votes
1
answer
889
views
Magento 2 Add custom class before "main.content" excluding Home Page
I am looking for a solution to add a custom class before "main.content" for all pages remaining home page. Currently, I am doing below code
<referenceContainer name="page.wrapper">
&...
0
votes
1
answer
477
views
Magento 2 Add different body classes for different Pages
Currently, I am working to HTML to Magento 2 conversion and I got the HTML from the designer which have the class in the body so I added it generally add
in default.xml file in my Magento theme
...
1
vote
1
answer
516
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" ...
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 ...
2
votes
2
answers
1k
views
Have a option to enable/disable the module. I need to load admin page css when my module is enabled. No need to load css while module is disable
I write css in path
app/code/my/module/view/adminhtml/layout/default.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/...
0
votes
2
answers
386
views
How to call static block by xml to phtml without refrence
I want to call a static navigation block in topmenu.phtml
I defined that in default.xml
<block class="Magento\Cms\Block\Block" name="top_links">
<arguments>
&...
0
votes
2
answers
2k
views
Magento 2: Calling a cms block in default xml
I am trying to call a static block in the footer block but it does not work.
I created a theme and then created a default xml:
\app\design\frontend\MyTheme\Theme-frontend-default\Magento_Theme\...
2
votes
1
answer
3k
views
Re-position just the welcome message
I've been looking and looking and I can't seem to find the be all end ll to move this welcome message snippet.
I've looked around and found this question and answer to be helpful but not exactly ...
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....
4
votes
3
answers
13k
views
Magento 2 Difference between default.xml and default_head_blocks.xml
In Magento 2 Theme , default.xml and default_head_blocks.xml files are located in app\design\frontend\{package}\{theme}\Magento_Theme\layout
can anyone tell me what is the difference between these ...
7
votes
3
answers
5k
views
Use of ifconfig tag in layout xml?
What is the use of ifconfig tag inside the block tag in a layout xml file?
What purpose does it serve?
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 ...
0
votes
1
answer
2k
views
Magento 2.2 Store Selector not showing on the front end?
I've literally put this in my theme's default.xml file:
<block class="Magento\Store\Block\Switcher" name="store_switcher" as="store_switcher" template="Magento_Store::switch/stores.phtml"/>
...
5
votes
5
answers
5k
views
Reorder Top Links
I have been stuck on this task all day. I am hoping someone has some insight or is this a bug? I have tried a few different approaches and nothing seems to actually work.
This is how it currently ...
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 ...
0
votes
4
answers
3k
views
Add inline javascript to head - magento2
I am struggling to load a script tag on my Magento website. I am trying to add this to the head by adding the below code. I have tried to add this to the default.xml and default_head_blocks.xml
&...
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 "...
3
votes
1
answer
1k
views
Magento 2: changes to default.xml in custom theme aren't loaded
My custom theme is not loading any data from default.xml.
I confirmed this by checking the mage file in var/cache directory.
Can anyone please help me by explaining the cases in which default.xml ...
1
vote
1
answer
3k
views
Login link add as dropdown into my account magento 2.1.x
I want to show My account menu as drop-down and add Login/Logout link in it.
Currently it shows as separate menu link in top.links >> header.links
here is my default.xml
<page xmlns:xsi=&...