Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [layout]

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

1
vote
1answer
15 views

Unknown UL LI tag broke the layout

I got this annoying issue: that's unwanted spaces thats caused by unknown HTML: My question is how to remove that unwanted annoying html (UL/LI) from home page? Thanks
1
vote
1answer
23 views

Home to make a Multi Level Field Dependency in Admin Form Magento 2

I have 3 Field type Display On Container the visibility of [Display on , container] depends on value of type field value of [container] depends on value of [Display on ] on field I have tried this ...
1
vote
2answers
14 views

Magento 2.3 How to override the custom theme's etc/layouts.xml file in recommended way?

There is, in a theme that I bought a layout.xml file that is used in the backoffice to hydrat a select element (that allows you to switch between 5 layouts). app/code/CompanyTheme/LayoutSwitcher/etc/...
2
votes
1answer
22 views

Removing block from layout doesn't work

I want to remove the register-link from the header links, so I have wrote in the default.xml of the Module_Customer of my theme: <referenceBlock element="register-link" remove="true"/> The ...
0
votes
1answer
18 views

Apply a jQuery whitespace trim to an adminhtml filter input

My goal is to load a simple jQuery function to trim any whitespace in an admin backend filter input. The use case involves a scanner inputting codes with spaces that will turn up no results. I have ...
0
votes
1answer
26 views

Magento 2: Header and footer not loading in custom module's CMS layout

I am developing a custom theme which inherits from Magento/blank. I am attempting to develop a CMS homepage layout within a custom module. I have created the module and successfully applied the ...
0
votes
0answers
9 views

Custom template not applying the proper layout and appearing under menu

We have created a custom template to show some documents and download them. This template is located in the backend. You can access through the menu and the submenu of one of the options. "Dealer ...
0
votes
0answers
21 views

referenceBlock and referenceContainer [duplicate]

what is layout reference and block in magento2.referenceBlock and referenceContainer.
0
votes
1answer
25 views

Move static block on category page

I'm trying to have 2 pieces of static content on a category page. One directly beneath the category title and another below the product listings. I notice Categories have a "description" and support a ...
2
votes
2answers
31 views

How to move Magento 2 Search bar to be centered

Here is my current search bar: And here is my expectation: I still don't understand about how to make centered search bar like that ? here is my html (from inspect element): <header class="page-...
2
votes
2answers
45 views

How to Get Layout Name in which is block is placed

I have My block <block class="Vendor\ModuleName\Block\Frontend\Linked" name="catalog.product.linked" template="Vendor_ModuleName::slide.phtml" /> in this file app\code\Vendor\ModuleName\...
1
vote
1answer
15 views

Add custom block under long description (product.info.description)

I'd like to add a custom block in description tab just after long description field. I Tried <referenceBlock name="product.info.description"> <block class="Magento\Catalog\Block\Product\...
0
votes
0answers
15 views

Magento 1 layout best practice

So on a multistore Magento 1 we need to change the html on a page depending on the store, everything is done with one theme. And we have 2 implementations, but I'm not sure which one is better. ...
3
votes
1answer
47 views

Custom Theme XML Files Changes 2.2 to 2.3

Does anybody know if there have been changes to the way XML files from custom themes are included in Version 2.3? I have a very simple XML file to modify the Magento Advanced Search page. The custom ...
1
vote
1answer
23 views

Remove class on div from empty.xml layout

I am running Magento 2.2. I have custom HTML I want to add to a CMS page. After navigating to the page where this HTML resides, the content is automatically displayed inside a div with class page-...
0
votes
1answer
10 views

Order of execution of the <referenceBlock name=“before.body.end”>

I want to add a js script near the </body> tag. But, in my project there are more than one layout files having <referenceBlock name="before.body.end">. So, is there a specific order in ...
2
votes
3answers
23 views

Move block and set template

I succesfully moved the product related block in my page layout with <move element="catalog.product.related" destination="product.info.right" after='-'/> I want now to apply a custom template ...
1
vote
0answers
31 views

Magento 2.2.5 configurable product is not open in admin?

I have created configurable product which has almost 2000 products associated. I want to edit some attribute but it is not opening and showing an warning: Warning: DOMDocumentFragment::appendXML()...
0
votes
0answers
25 views

Some product pages layout issue Magento 2

Suddenly my site has suffering layout issue on some product pages. I checked in console and it says require is not a defined, but many other product pages and site is working fine.
0
votes
2answers
35 views

Remove add to cart on category product

I am trying to remove the add to cart and add to compare buttons from the category page. At present I have used the following code: <referenceBlock name="product.info.addtocart" remove="true" />...
0
votes
1answer
26 views

How to remove an argument's item in LayoutXML

How can I remove an argument's item in Magento's LyoutXML? For instance I would like to remove <item name="msrp_price" xsi:type="array"> from catalog_product_prices.xml. In my theme's ...
0
votes
0answers
19 views

How to move checkout-agreements before buy now button in billing step in checkout?

How to move checkout-agreements before buy now button in billing step in checkout? Magento version is 2.2
1
vote
1answer
20 views

Changing block location based on size?

I want to have a block (contains a image and some text, nothing overly fancy) appear on the top of the products in a category page when it is on desktop, then on mobile I want it to be on the bottom ...
2
votes
1answer
34 views

Defer JS / CSS Magento 2 via layout files?

After reading a lot of devdocs, I can see there is case for defer in CSS and JS in the manual https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-types.html#layout-types-conf ...
0
votes
1answer
30 views

Add additional tab after reviews

I am trying to have a few more additional tabs added after the Reviews tab, though my tab keeps appearing as the first tab <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/...
1
vote
2answers
28 views

Move category description from admin panel (Layout Update XML) in Magento 2

Our customer wanted to show category description after the product list by default, so we added a new container and the following line to the default.xml in out theme: <move element="category....
1
vote
2answers
72 views

How to change footer and header for a CMS page only using layout XML?

I want to change out the footer and header for a minimized version but only on a certain CMS Page. Is it possible to do this with the layout XML input field to remove the header/footer and add static ...
0
votes
4answers
50 views

How to move the phone number field from checkout page magento 2

I want to move to the phone field. My XML <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:...
1
vote
1answer
32 views

How to create page in customer account section Magento 2

I want to create new page and link to => HISTORY how i can do this?? where I can add a new link?
1
vote
0answers
24 views

Magento2: Minicart issue on Custom layout

I am using a custom layout for the category page. Here is my code: app/code/Custom/Module/view/frontend/page_layout/equipment.xml <?xml version="1.0"?> <layout xmlns:xsi="http://www....
0
votes
1answer
25 views

Magento2: programmatically add layout for specific products

Good evening. I need to add layout for products, which SKUs start from 9 (so 9XXXX). I've read we can add this though handler or some other methods. If someone had experience with that moment, ...
0
votes
2answers
69 views

Remove merged css and js from layout in magento2

I have enabled js and css merging and bundling from the configuration. we can remove particular js or css using below code. <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
2answers
139 views

Issue with multiple custom product details tabs not displaying

In catalog_product_view.xml I have the following section: <referenceBlock name="product.info.details"> <block class="Magento\Framework\View\Element\Template" template="Magento_Catalog::...
2
votes
1answer
45 views

Override Magento 2 checkout.cart.methods.onepage.bottom proceed to checkout button Block and template file

I see below configuration in Magento 2 layout at vendor\magento\module-checkout\view\frontend\layout\checkout_cart_index.xml. I created custom module and copied existing Link Block and link.phtml to ...
0
votes
0answers
13 views

Specify Namespace on getLayout()

I'm currently working on a site which is using two store views. For some reason the second store view is throwing an error. Uncaught Error: Call to undefined method ...
0
votes
1answer
56 views

How to use different page layouts depends on base layout specified?

I have to use different page layouts (<page>) depends on base layout (<layout>) specified for a product. For example, if I select a layout in product's 'Design' menu with the name ...
1
vote
1answer
23 views

magento 2 createBlock from argument item

My custom module xml file contains the block code. I want to call that block code directly using createBlock method and set template to show in specific template. My block code is adding animated ...
0
votes
0answers
51 views

How to Remove <uiComponent> Tag

Is it possible to remove this tag which was declared in another extension? <referenceContainer name="content"> <uiComponent name="library_authors_list"/> </referenceContainer> ...
0
votes
3answers
51 views

Add CMS block to bottom of each product list

I would like to add a CMS block to the bottom of each product list whehter it is on a category page or the search result page. Since I would like to add it on every list I'll try to do this via layout ...
2
votes
4answers
63 views

Remove cms block from only cms home page

I have created a cms block and using widget added inside header page container, now I want to remove that block from only home page. How can i achieve this? Widget screenshot to display block
1
vote
2answers
33 views

Adding contents to default customer sign up / create account page - Magento 2

I would like to add a banner image and some contents to default create customer account page at www.domain.com/customer/account/create/, how do i do it? Or Can I add a CMS Page or static block to it?
1
vote
0answers
7 views

Magento 2 add body class into as per current page using toolbar.php plugin for category and search results page

I have created plugin for toolbar.php \Magento\Catalog\Block\Product\ProductList\Toolbar protected function _prepareLayout() { $this->pageConfig->getTitle()->set(__('Category Page')); ...
2
votes
3answers
80 views

Magento 2 : How to update 'Update cart' Button`s Template?

I have develop custom module that can update add to cart and update cart button but I can`t update Update cart button I have update Add to Cart button using catalog_product_view.xml <...
4
votes
2answers
87 views

Magento 2 : How to debug knockoutjs getRegion() bindings

Shipping address is displayed using below knockout js code. I am having a hard time finding the back-end code that's setting data for getRegion('ship-to') function even though I could see the UI JS ...
0
votes
0answers
16 views

Magento 2: Product review page layout gets changed

When I click on "add your review" button of the product domain_name.com/concession-trailer-8-5-x20-black-1599.html it redirects me to domain_name.com/review/product/list/id/1427/#review-form ...
0
votes
0answers
38 views

Added CMS block to contacts page layout XML, but doesn't show up

I am trying to add a CMS static block, to the magento 1 contacts page, in the right column. I've tried adding the following to app/design/frontend/{client}/{theme}/layout/local.xml <...
6
votes
0answers
186 views

Header and footer in an external file

I'm using an index.php file under /pub/custom folder, which is used to create custom designs. This file is completely written in html and javascript. Is there any way to include current theme ...
2
votes
1answer
53 views

magento 2 Infortis ultimo theme display category tree menu on the left of the search result page

I am using the Infortis ultimo theme, in the included feature, i was able to add the category tree menu on the left bar of each category page, but how can i add it to the search result page? is this ...
1
vote
0answers
48 views

How to move product.info.mailto block in custom layout file in magento 2?

In vendor file \magento226\vendor\magento\module-catalog\view\frontend\layout\catalog_product_view.xml I found <container name="product.info.extrahint" as="extrahint" label="Product View ...
1
vote
1answer
19 views

Magento : Is the layout reference scoped for an specific handle?

When I put the following block inside catalog_category_layered handle, it works and I can call it by getChildHtml(). But when I insert it in default handle it doesn't work at all. Is the catalog.layer....