Stack Exchange Network

Stack Exchange network consists of 174 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
0answers
12 views

Broken reference Error log in Layout magento 2?

Actually i am facing this error due to layout mistake.please guide me. [2019-02-18 06:28:17] main.INFO: Broken reference: the 'breadcrumbs' tries to reorder itself towards 'category.cms', but ...
2
votes
0answers
12 views

How to deal with multiple extensions overriding the same template file?

I have two extensions which load their own template for the block with name customer_form_register in customer_account_create The first extensions overrides the template to add a new field to the ...
1
vote
0answers
21 views

Moving Block on product page Magento 2.2.7

I fairly new to this but I am trying to move a brand logo on my product page from below the product title to below the gallery image. Normally I would be able to achieve this using my themes ...
1
vote
2answers
43 views

Magento 2 - Get country name from country code

I want to get country name from country code, in Magento 1.9 I use the code like this to get country name: $countryCollection = Mage::getModel('directory/country_api')->items(); foreach($...
0
votes
1answer
14 views

Magento 2: Errors displaying on setting devolper mode

On setting developer mode this error is displaying want to find the files which are causing this error what should I do remove this error. [2019-02-14 12:58:34] main.INFO: Cache file with merged ...
1
vote
0answers
14 views

Magento 2 move page main title into div with product_list_toolbar

I want to move the page main title on the category list page into custom div and also include the product_list_toolbar into that div. The problem I face is that I can not simply move the ...
1
vote
1answer
19 views

Remove Register top.link

I know how to do this in a general sense, except for whatever reason, I can't get it to work properly on a second website. My second website is merely a subdomain of my main, so https://second....
0
votes
1answer
33 views

Add custom button on add/edit product page

How to add a custom button, in add/edit product page (magento2). I need to open popup on clicking of the button.
1
vote
2answers
54 views

Remove block from layout depends on condition

I want to remove block product.info.addtocart from layout depends on some conditions
0
votes
0answers
23 views

catalog_category_view.xml just target no anchor pages

I'm trying to create a different layout for non anchor category pages in Magento 2.3 (1 column, big masthead category image, move page title and breadcrumbs down). Where should I put these changes so ...
1
vote
1answer
26 views

How to add custom button in sales orders grid page in admin magento 2

I want to add a new custom button to the sales order grid pageactions, i was trying creating Plugin for "Magento\Backend\Block\Widget\Button\Toolbar" but in the grid containers this block is not used, ...
0
votes
0answers
11 views

Adding Google Tag manager <noscript> tag after body tag

I need to place noscript tag of gtm just after closing body tag.
0
votes
1answer
29 views

Magento2 render custom block in adminhtml layout.xml

I can not render my custom block within my custom template, Point is on newsletter subscriber, I extend newsletter_subscriber_form.xml, Add container within my block but it says that template is ...
0
votes
1answer
20 views

Magento 2 Block class instantiate issue

I am using Magento 2.2.6. In my custom module I add catalog_category_view.xml add a block <?xml version="1.0" ?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
1
vote
1answer
22 views

How to duplicate category title and move description below product grid

I'm just diving into template/block/layout customization in Magento 2.2 and I'd like to move my category title from being left aligned to being aligned above the description. Currently it's like this:...
0
votes
1answer
26 views

How add a country selector in the header section?

I need add a country selector in the header section, next to the currency selector. How is the right way to do this?
2
votes
1answer
26 views

Remove price filter for specific category

I can remove all filters in category with this line: <referenceContainer name="catalog.leftnav" remove="true" /> But, I need to remove only price filter for specific category. Can I do this ...
0
votes
0answers
34 views

Magento 2.3 - Extend layout to add new custom block after existing block from another module

What I hope to accomplish is adding a new option to an existing menu of options in category edit page, specifically adding a new option below the "Match products by rule" switch toggle. This menu is ...
0
votes
1answer
11 views

Magento 2 add div around compare in header

I want to add a div container with class around the compare ul in the header. How can I achieve that inside my custom default.xml file?
0
votes
0answers
24 views

Magento2 top header section change layout

Currently in my site display this I need search section move to top as look wise below If anyone idea reply me how to search section move in magento2
0
votes
1answer
28 views

Solved: Magento 2 move productpage title around div

I want to move the product page title around a container div. I added the following to my catalog_product_view.xml file, but that does not add the div with class container. What am I missing? <...
0
votes
0answers
23 views

Install layouts and templates from the theme divante

I installed the theme https://github.com/DivanteLtd/magento2-rapid-theme, the theme got up, everything is in order, I don’t understand how to set the main page to make it as an example. The topic has ...
0
votes
1answer
35 views

Show Separate product detail page based on attribute value in Magento 2

Shall we load separate product detail page based on the product attribute value in magento2 ? I have created the attribute product called "type_of_product" If this attribute value is "Test 2", I ...
0
votes
1answer
33 views

Solve warning “User Agent Exception override product and CMS pages rules”

I'm Trying to create a dynamic grid containing multiple fields using this code in my ui_component <fieldset name="multi_answer"> <settings> <collapsible>true</collapsible>...
0
votes
1answer
25 views

How to change layout of catalog search page if results are empty

Wanted to change from two columns to the one column xml when catalog search results returns zero counts. Using Magento 2.3 version of the community. Showing empty sidebar on the left side.
0
votes
2answers
54 views

Load Custom Template file with argument as product id or sku in magento2

I have created a custom module and calling that template file from the CMS page as like below. {{block class="Vendor\Module\Block\Custom" template="Vendor_Module::custom.phtml"}} In templates/...
0
votes
0answers
21 views

Magento2.3 - Layout Updates in Child Theme don't work

Please also find updates on the bottom I want to get rid of all the product compare features on my website. Unfortunately everything I found so far, doesn't work. Here's what I tried: We are using ...
0
votes
2answers
35 views

Add custom block below cart summary page magento 2

Dears, How can I add my custom block to cart summary page? I checked the checkout_cart_index.xml file but couldn't find exact location so could you guys provide me any solution? Thanks, Max
0
votes
0answers
10 views

Remove tinymce4Adapter script on empty page

I've created a empty page on an M2 installation, and removed page.wrapper like this: <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
0
votes
0answers
26 views

Changing product price from Incl. tax to Excl. tax and showing both. Magento 2.3

I have Magento 2.3 and I would like to change the layout of the product price. We will sell products to company's so this B2B. That's why I need to show Excl price as first and BIG, than the price ...
0
votes
1answer
13 views

Understanding prepareLayout

I know that magento uses .phtml "template" files for the view. Each template has a block class where we can prepare some values or make some checks which we then can use in the view, e.g. check if the ...
0
votes
1answer
25 views

Adding custom layout handle for layouts (1 column, 2column etc) set via product admin page

I want separate layout handles defined for products dependent on their layout set via the layout options for product within admin (1 column, 2 column left, 2 column right). I need to set additional ...
0
votes
1answer
21 views

Magento 2 : custom template file for different categories

I want to set custom template file for different categories. How to set custom phtml file for different categories using XML file? Any help would be appreciated.
1
vote
0answers
27 views

Magento 2 - CMS Specific page_layout XML and Dedicated page_layouts in general?

I'm looking for some BEST PRACTICES insight into using page_layout.xml. Is it a good idea to try and decouple the non-shared resources on Product Pages, Category Pages and CMS Pages? If so, what's the ...
0
votes
0answers
20 views

How to move topmenu to left sidebar in rwd theme?

I am creating my first custom theme based on the rwd theme. I want the topmenu navigation to appear vertically in the left sidebar (the layout is 2columns-left). I tried to add this to my local.xml: ...
0
votes
3answers
57 views

Magento 2 override cacheable=“false” with own theme

I'm trying to override a Magento default xml layout file vendor/magento/module-review/view/frontend/layout/customer_account_index.xml <referenceContainer name="content"> <block class="...
1
vote
3answers
40 views

How to add jss and css in magento2

I have created a block and called it in my phtml file then I call that block in my cms page like this {{block class="Abc\Custom\Block\Product" template="Abc_Custom::product.phtml"}} and some HTML ...
0
votes
1answer
13 views

Block loads on configurable product page but not on simple product page

I created an extension to show the price split in parcels on product page but it only renders on configurable products not on simple products. Here are all the files of my extension: /app/code/local/...
0
votes
0answers
16 views

Change My Account side bar <li> links to a dropdown

I have to change the sidebar links to my own dropdown, How would I achieve that, I have to remove the sidebar from mobile view and add dropdown of those same data of sidebar. How to achieve that, ...
0
votes
1answer
24 views

Custom layout extending 2columns-left.xml problem

I'm trying to create a custom layout based on 2columns-left.xml. The layout was created correctly and I can select it from the Admin. This is what I did so far: I created the layouts.xml file THEME/...
0
votes
0answers
21 views

How to update checkout page's layout according to specific condition?

I wanto to add my custom block to checkout, if the conditions in cart are satisfied. Which steps should I follow?
0
votes
1answer
21 views

Editing `My Account` sidebar in magento 2

How can I edit sidebar and delete few nav links I turned on the debugger hint, which shows me the various path, but I am not able to figure out how can I edit those nav links Closest I came to ...
4
votes
1answer
60 views

How to change product detail page layout according to product price range?

I want to change product detail page layout according to product specific price range I know it is possible for using product_id and product_sku like below. <catalog_product_view_id_productid> ...
0
votes
1answer
16 views

Mageno 2 - Invalid template file in catalog_category_view.xml

I have a custom template for category page list.phtml in my theme. list.phtml was addressed in catalog_category_view.xml as <?xml version="1.0"?> <!-- /** * Copyright © 2013-...
0
votes
1answer
52 views

override wysiwyg_images.files

I try to override Magento_Cms::browser/content/files.phtml but when i test , the block is dont display , and i dont know why i have the next extructure <Vendor>_<Module> ├── <Stuff&...
0
votes
1answer
34 views

Magento 2 how can i add block in core layout

I am trying to load my block and template in my custom layout file as per below script but it's not rendering Core Layout sales_order_create_index.xml :- <body> <referenceContainer ...
0
votes
1answer
15 views

Custom Layout Update on product not working for description and short description

We're using Magento 2.2.6. If we create a custom layout update for the description and short description of a product nothing happens in frontend. Still the old fields are outputted. How can we ...
0
votes
0answers
27 views

Move element is not working as expected in magento 2.1

In category_catelog_view.xml I need to move a custom layered navigation above the product grid. I tried all of the listed below <move element="custom.left.layered_nav" destination="content" before=...
1
vote
2answers
178 views

Load custom block in category list page magento2

I am trying to add custom template file in category list page. app/design/frontend/Vendor/Theme/Magento_Catalog/layout/catalog_category_view.xml <referenceContainer name="content"> <...
0
votes
0answers
27 views

Change Module position in xml

I used a module Product Videos in Magento 1. I like to show a videos in description tab ? It is possible ?