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.

0
votes
2answers
2k views

Magento 2 - Move Product description out of Tab above the add to cart button

How can I move Product description out of Tab, above the add to cart button in magento 2 in luma theme Why there is no view.phtml file as in magento 1.x
0
votes
3answers
21 views

Layout - Pass variables from parent to child

How can I access variables defined in the parent template inside a child template? Example -> I added a new block with name product.info.grouped.news_flag as child of the block with name product.info....
0
votes
2answers
1k views

Magento 2 Change order of Tabs on product page

I have added catalog_product_view.xml in the location app/code/design/frontend/kh/custom/Magento_Catalog/layout Set the priority for the tabs for the product detail page, but its is not working ...
0
votes
1answer
1k views

edit product view xml to move element

I want to move the product description to appear right after the short description on our magento 2.1 product detail page. However My issue is I am not sure what the element name is for the short ...
0
votes
3answers
283 views

Magento 2 - Categories not display when Page Cache is on

I have a very strange issue on Magento 2.2.2, if I enable the Page Cache (Full page caching - FPC) the top navigation is not display anymore. What I can do? Thank you
1
vote
1answer
13 views

Add an Element on the top of header.panel.wrapper

I need to place an element ot the most top of page. the position is exactly on the top of header.panel.wrapper. My objection is to have some elements on the the most top of header. Any help ...
1
vote
2answers
31 views

Move recently viewed product or completely remove it

Magento has a great feature to show recently viewed product, but now I need to move this element (recently viewed product) to exactly on the top of footer. I have no clue about how to show/hide or ...
3
votes
4answers
1k views

How to call module block after header?

I have a module layout file like below <default> <block name="ampromo_notification" type="ampromo/notification" template="amasty/ampromo/notification.phtml" before="-" /> <...
1
vote
1answer
25 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
1answer
20 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
2answers
19 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
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
1answer
21 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
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
1answer
993 views

How do i use a different header for each page

I'm new to Magento i have a bit of a problem i have 4 pages e.g home about etc... all these pages use the same header, i have created another header and updated in the page.xml file, from what i ...
0
votes
1answer
1k views

Magento 2 - Full Width Section

If I need to add a new full width section between the main element and the footer element, is there a way to declare something in the theme's default.xml that places it before or after a container?
0
votes
0answers
22 views

referenceBlock and referenceContainer [duplicate]

what is layout reference and block in magento2.referenceBlock and referenceContainer.
5
votes
3answers
5k views

Magento2: How to rename the Details tab on the product details page, via overwriting layout file?

How can I use arguments in an xml layout file to overwrite the Details tab title on the product details page? The layout file I hope to overwrite is: vendor/magento/module-catalog/view/frontend/layout/...
3
votes
1answer
920 views

Adding custom layout xml to adminhtml

I want to add a custom layout xml file to update adminhtml. I have it working now by adding the xml file to app/design/adminhtml/default/default/layout/[module]/custom.xml. I don't like adding this ...
2
votes
2answers
984 views

Magento 2 How can I remove tabs in order view?

It is able to remove the block by using But how can I remove the tab which is added by using argument? Thanks. <block class="Magento\Sales\Block\Adminhtml\Order\View\Tab\Creditmemos" name="...
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 ...
3
votes
2answers
33 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
3answers
2k views

Magento 2 : Move “catalog.product.related” block in product view

I'm modifying the layout of the product view. I'm trying to move and edit the product related block "catalog.product.related". In my catalog_product_view.xml I have : <referenceContainer name="...
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\...
3
votes
3answers
2k views

Magento 2: How to find layout position name for destination attribute of a move tag

In magento2 to change a position of block <move> is used whose syntax is as follows. <move element="name.of.an.element" destination="name.of.destination.element" as="new_alias" after="name....
1
vote
1answer
25 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
2answers
2k views

Magento 1.9 : Add Block to One step checkout

I have a extension that shows a price slider for store credit in the Cart. I do not use the Cart and customers go straight to the Checkout. I want to show the slider on my checkout instead. Here is ...
6
votes
1answer
13k views

how to create custom layout page in custom theme

I want to create a custom page layout in my custom theme. I have created a custom theme named "ktheme" with a parent theme. I created cutome_home.xml in the layout folder but I am just getting a blank ...
1
vote
1answer
16 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
16 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 ...
2
votes
3answers
24 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 ...
0
votes
1answer
1k views

How can I move blocks around in Magento 1.x layout?

I'm trying to move the highlighted div right after the header page div. I'm not sure how I can do this - can someone explain how?
0
votes
1answer
422 views

Magento2 hello world displaying blank screen

I am trying to create a simple hello world module, I am able to successfully create and install the module but for some reason, my screen is showing up blank. But if I echo something in controller it ...
0
votes
1answer
98 views

Exception 'Mage_Core_Exception' with message 'Invalid block type' Magento 1

The following exceptions are showing in my exception log. Could anyone help to resolve that issue and clean my exception log? exception 'Mage_Core_Exception' with message 'Invalid block type: ...
2
votes
3answers
6k views

How to remove tool bar in Magento 2

I would like to remove the tool bar from my theme since I don't have that many products. So far I have tried this in my /app/design/frontend/VENDORNAME/THEME/Magento_Theme/layout/default.xml <...
3
votes
0answers
50 views

Product's “Layout Update XML” code disappears from the site every 24 hours

I have some products with "Layout Update XML" Design updates (simple XML pointing to a template file; very basic and in the correct format). Every 24 hours after a cache flush, the code vanishes from ...
5
votes
3answers
13k views

How to change layout of product detail page?

I've set up a child theme of Luma and want to change the layout of my individual product detail page. What file controls this? I don't see the .phtml file and don't see how changing block order in my ...
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 ...
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 ...
0
votes
1answer
2k views

Change meta title of customer login page

Trying to change the meta title of the customer login page in Magento2 at example.com/customer/account/login/. Added tag to my xml file but no luck. Please advise. Here's my xml layout: <?xml ...
3
votes
1answer
2k views

Magento 2.2.2 - Display Customer Account header dropdown and remove Sign Out link post login

After successful login, Luma theme shows customer account details in dropdown on header as seen in below image I need to replicate the same in our custom theme which has Blank as its parent. Vendor/...
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
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:...
2
votes
3answers
82 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 <...