Questions tagged [layout]

Denotes the xml files used to define the block hierarchy which eventually renders the template files.

Filter by
Sorted by
Tagged with
0
votes
0answers
44 views

Magento 2.3 - catalog_product_view.xml add block after description not working

I am trying to add a custom block after (below) the product description but before the details (attributes output) but it wouldn't show at the correct position. In my module I have a ...
1
vote
0answers
26 views

Magento2 - Adobe XD to Magento2 font size

On the xd design the font-size is 55 and when I apply this font-size in my Magento layout It is bigger ? Why is it so?
0
votes
0answers
23 views

Block behaves in one layout, but not another (M2)

*****EDIT***** I am stupid. An entirely separate module was overriding the 'search_result_list' block without properly using the <referenceBlock> tag, so it was replacing the block entirely and ...
0
votes
0answers
8 views

Force 1column Grouped Product Layout [duplicate]

I'm trying to set the grouped product template so that the products table is on a new row at full-width. At first, I added app/design/frontend/Trey/Theme/Magento_GroupedProduct/layout/...
0
votes
2answers
341 views

Layout Update XML for Category in Magento 2.3.4

Can anyone help me how to change number of products per page for a SPECIFIC category. I am on magento 2.3.4 and noticed that Layout Update XML does not exist anymore.
0
votes
1answer
20 views

Magento 2 - change block class in layout

I know I can change the template of a block with: <referenceBlock name="copyright"> <action method="setTemplate"> <argument name="template" xsi:type="string">Dfr_Backend:...
0
votes
0answers
22 views

More then one Configurable products need to be dispayed in PDP

If I want to have more then one configurable product to be displayed in PDP with all the Swatches options with a single 'add to cart' button at bottom of the page, what kind of approach should I go ...
1
vote
0answers
20 views

Magento 2 How can I add 2columns-left in container area like the one I have shared

I want to add 2 columns one for the menu and other for the text in container Page.top is the menu container which I have move into a new container Now In that new container page top after banner I ...
0
votes
1answer
50 views

Magento2 - Element 'body': Character content other than whitespace is not allowed because the content type is 'element-only

I'm getting error in checkout page like below. No file name listed here to debug. how can i fix this. please help. 1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): ...
0
votes
0answers
34 views

Sorting is not working in magento 2

I modified 2columns-left layout in magento 2 design.After that sorting is not working <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
0
votes
0answers
11 views

Magento2.3: How to show a module form for a specific category?

We have a module called AC Ton Calculator and the AC ton form is displaying on all the pages of site. We want to show that AC Ton form only on the AC category. How can I make that visible only at ...
0
votes
0answers
34 views

Magento 2 Remove print.css file from all pages except Myaccount

I am trying to remove the print.css file and add it to only on customer_account.xml. I removed the CSS in default_head_block.xml and added it in customer_account.xml. But the CSS is not loading on ...
0
votes
0answers
28 views

Add html code to CMS block somehow

I'm extremely new to Magento, I'm using v2, and find the learning curve to be a straight line up. I've created a child theme for Luma and created a page layout called test.xml which I then associated ...
1
vote
1answer
41 views

How to add a date column in Search Terms Grid Magento 2.3

I need to add the updated_at date column in the Magento search term grid. the field is presented in the search_query table. I'm trying to override layout vendor/magento/module-search/view/adminhtml/...
0
votes
1answer
20 views

Magento 2- Add custom container into product listing page

I've search for some answers to this but unfortunately I can't seem to find anything. I would really appreciate some help about this. I have created a custom container using XML in '...
1
vote
1answer
46 views

Magento 2 City field not showing in cart for shipping estimation

We have installed Shippit to calculate rates and it requires the City to be filled out for Australian addresses. This is fine in checkout. However in the cart there is no city field showing, ...
0
votes
1answer
68 views

how to make noindex nofollow for login page

I want to make noindex nofollow for login page, i tried <customer_account_login translate="label"> <label>Customer Account Login Form</label> <!-- Mage_Customer ...
0
votes
0answers
50 views

How to re-order My Account navigation links

My question might be possibly duplicate of Magento 2 - How to rearrange Customer "My Account" links but I really have no idea why my code is not working as expected My current links order ...
0
votes
1answer
132 views

How to create a Block, Layout and Template for backend module in magento 2

I have doubt as how to create Backend Module using block,layout and templates. After creating the block,I have assigned the block in app_appdashboard_index.xml file and I called the block page ...
0
votes
0answers
18 views

Magento2: How to move product.info.main container to Particulars product tabs like review tab?

How to move product.info.main container to Particulars product tabs like review tab ?
0
votes
0answers
29 views

Magento 2.2.3 admin ui component works on developer not on production page is blank

My Custom admin page isn't loading up. I get a blank screen I have taken a look at the similar questions in Magento.StackExchange but none of them did the trick. it works if I put the MAGE_MODE to ...
0
votes
0answers
13 views

Custom theme magento 2 from Luma missing Customer sign in

I have "create account" but I am missing "Sign in" here is my custom default XML - I am getting system error report, "main.CRITICAL: Broken reference: No element found with ID 'customer. not sure its ...
0
votes
1answer
98 views

How to create a frontend custom page module with view template files in magento 2.3

I have doubt as how to create Frontend Module with View template files. I have created Module using this reference Magento Documentation "https://devdocs.magento.com/videos/fundamentals/create-a-new-...
0
votes
0answers
25 views

Block is not getting called in custom module - Magento 2.3

I created a custom module to list all categories in a custom page. But the associated block is not getting called in the layout file. I can see the controller function is getting executed and page ...
0
votes
0answers
21 views

Magento 2 - Find out which file causes exception

I get Element 'referenceContainer', attribute 'htmlClass': The attribute 'htmlClass' is not allowed. but it does not point out which file is causing it. 1 exception(s): Exception #0 (Magento\...
0
votes
0answers
18 views

Magento 2 - What is the role of the “label” attribute in a layout?

I wonder about the usage of the label attribute? e.g. <container name="header-row-col-a" label="Header Bootstrap Col-A" htmlTag="div" htmlClass="col-2"/> From the documentation: label: An ...
0
votes
2answers
169 views

Magento 2 - Add custom attribute to layout container

I try to add a new container to my layout. The container needs the attribute data-block='minicart' <container name="minicart-wrapper" htmlTag="div" htmlClass="minicart-wrapper" data-block='...
0
votes
2answers
112 views

How to override arguments in layout file?

module-sales/view/frontend/layout/sales_order_view.xml <referenceContainer name="content"> <block class="Magento\Sales\Block\Order\View" name="order.comments" template="...
0
votes
1answer
74 views

Magento 2.3.3: Does catalog_product_view.xml not pass down containers to specific product types?

I have created a catalog_product_view.xml in my theme and when I go to create a widget and select all product types in the layout updates section I can see my custom container I created. If I then ...
0
votes
0answers
7 views

What should I do to edit the page in the background and open it in a new window when I hit Tab

When developing background management and editing page, click Tab on the left, magento2 opens under a window by default, now I need to switch Tab to open with a new window, what should I do? Here is ...
0
votes
4answers
49 views

How to add css in custom module using layout file in Magento2?

I wan't to add bootstrap.css to a template in a custom layout.xml, this is my code: view/frontend/web/css/bootstrap.css here is the css file view/frontend/layout/pakke_trackshipment_info.xml <?...
2
votes
1answer
47 views

Disable cache for particular custom block called in layout xml

I want to disable cache only for particular block which is called in some pages like Home Page, Category Listing page , Product page and Shopping cart page etc. <block class="Namespace\Module\...
0
votes
1answer
351 views

How to add custom form on cash on delivery payment method using layout in checkout_index_index.xml Magento 2

I want to add form in cash on delivery payment method only on checkout page Magento 2. I want to add it using layout checkout_index_index.xml. Can anyone please tell me how to add form using layout ...
0
votes
2answers
40 views

How to get acces to block parameters defined in XML layout in block class

I am wondering how I can get access to parameter for blocks I define in a layout.xml My cms_index_index.xml is as follows: <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/...
1
vote
1answer
187 views

Move bundle options via XML - Magento 2

I've tried absolutely everything I can think of to move the bundle options but for some reason they won't move. When you click the customize and add to cart button it's those options that I want to ...
0
votes
1answer
31 views

Magento:2 To add custom block in layout

I wanted to add a custom block in my account page after account information. <?xml version="1.0"?> <!-- /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license ...
0
votes
1answer
43 views

I want to override customer-account-index.xml from magento-customer

If we want to override customer-account-index.xml from magento-customer. Where I should override? By making folder name as Magento_Customer in app\design\vendor\theme or app\code\vendor\module.. ...
0
votes
0answers
19 views

How can I use a block I created in my plugin to be used as a CMS block?

What am I trying to achieve? I want to show a block of my plugin on every product page of a specific category. What my problem is right now. In the Magento CMS you can add XML layout to a category ...
0
votes
1answer
44 views

How to create an empty container and render it

I want to create an empty container and get it rendered. Currently my empty container isn't showing up. <container name="empty-container" htmlTag="div" htmlClass="my-class"/>
2
votes
1answer
233 views

Page Title Move for All Pages - Magento2

<div class="columns"> <div class="column main"> <div class="page-title-wrapper"> <h1 class="page-title"> <span class="base" data-ui-id="page-title-...
1
vote
2answers
71 views

How to disable button url in Magento 2?

I tried to put # places of the url, but the url still works and e.stopImmediatePropagation () with js also didn't help. Is there any way to do this through xml or otherwise? Thanks <item name="...
1
vote
0answers
82 views

Magento 2.3.2 LayoutXML Update remove canonical

Under Stores > Configuration > Catalog > Catalog, We have "Use Canonical Link Meta Tag For Categories" set to "Yes" There are a couple of category pages that we want to edit the Canonical Link for. I ...
1
vote
1answer
183 views

How to show Block depending on Customer Logged In/Out in Magento 2

I want to Show Conditionally Depend of customer logged in status For Magento 1 i Found this Solution i want Same Lopic for Magento 2 // is Logged in <customer_logged_in> <reference ...
1
vote
1answer
27 views

Various pages displaying “Customer Login” instead of their proper page title as defined in the xml page

My Contact Us page, Password Reset, Forgotten password and possibly a few other pages are having their page title overriten to say "Customer Login". I have a feeling that the culprit is located here,.....
1
vote
1answer
31 views

Magento 2 - how to reference a template of my theme in a layout file?

I have this file app\design\frontend\company\mytheme\web\templates\header\foobar.phtml How can I reference it in a layout file e.g. in app\design\frontend\company\mytheme\Magento_Theme\layout\...
1
vote
0answers
21 views

Magento2: Cannot update wishlist list items with xml in module

I am trying to add a 'low stock' banner to wishlist items that are low stock. This works if I add my block to the theme xml file but doesn't if I add in a module wishlist_index_index.xml file. I ...
1
vote
0answers
29 views

Magento 2.3.3: Widget layout - Is it possible to add a widget to products by attribute?

I know Magento allows for widgets to be placed on specific products but I need to take it further. I need the option to allow me to filter by product attribute and apply widget to products with those ...
0
votes
0answers
16 views

Magento 2 include customer account navigation into top links

E.g.: I want to include customer-account-navigation block childs into top.links block. By doing this it should add customer account sidebar links into top links header. But when referencing top.links ...
2
votes
1answer
71 views

Override Default layout with module

I have one module called Test_A. We can override any layout of Module-theme in Test_A by giving the same name. Ex. Module-theme/view/frontend/layouts/frontname_controller_action.xml can be override ...
0
votes
0answers
31 views

Magento 2| Move Product options swatches before product image, Category page

I want to move options swatches before product image, in category view. I try something like this <move element="category.product.type.details.renderers.configurable" destination="product.info"/&...

1 2
3
4 5
54