{"id":116886,"date":"2018-03-20T05:25:49","date_gmt":"2018-03-20T05:25:49","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=116886"},"modified":"2024-02-15T13:09:53","modified_gmt":"2024-02-15T13:09:53","slug":"remove-layout-added-js-layout-magento2","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/","title":{"rendered":"Remove Layout added by JS Layout in Magento 2"},"content":{"rendered":"<p>In Magento2, layout on some pages are added by js layout by using ui-components.<\/p>\n<p>So, if you want to remove an component added by js layout then you can use given process:<\/p>\n<p>you need to add these lines in your layout file:<\/p>\n\n\n<pre class=\"EnlighterJSRAW\">&lt;item name=&quot;config&quot; xsi:type=&quot;array&quot;&gt; &lt;item name=&quot;componentDisabled&quot; xsi:type=&quot;boolean&quot;&gt;true&lt;\/item&gt; &lt;\/item&gt;<\/pre>\n\n\n\n<p>This code is written under the component which you want to remove and at the same nesting level.<br>for example: Given example is to remove discount block from checkout page.<br>firstly, i have created checkout_index_index.xml file at path:Webkul\\Test\\view\\frontend\\layout\\checkout_index_index.xml<br>Now add the following code:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?xml version=&quot;1.0&quot;?&gt;\n&lt;page xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:View\/Layout\/etc\/page_configuration.xsd&quot;&gt;\n    &lt;body&gt;\n        &lt;referenceBlock name=&quot;checkout.root&quot;&gt;\n            &lt;arguments&gt;\n                &lt;argument name=&quot;jsLayout&quot; xsi:type=&quot;array&quot;&gt;\n                    &lt;item name=&quot;components&quot; xsi:type=&quot;array&quot;&gt;\n                        &lt;item name=&quot;checkout&quot; xsi:type=&quot;array&quot;&gt;\n                            &lt;item name=&quot;children&quot; xsi:type=&quot;array&quot;&gt;\n                                &lt;item name=&quot;steps&quot; xsi:type=&quot;array&quot;&gt;\n                                    &lt;item name=&quot;children&quot; xsi:type=&quot;array&quot;&gt;\n                                        &lt;item name=&quot;billing-step&quot; xsi:type=&quot;array&quot;&gt;\n                                            &lt;item name=&quot;component&quot; xsi:type=&quot;string&quot;&gt;uiComponent&lt;\/item&gt;\n                                            &lt;item name=&quot;children&quot; xsi:type=&quot;array&quot;&gt;\n                                                &lt;item name=&quot;payment&quot; xsi:type=&quot;array&quot;&gt;\n                                                    &lt;item name=&quot;children&quot; xsi:type=&quot;array&quot;&gt;\n                                                        &lt;item name=&quot;afterMethods&quot; xsi:type=&quot;array&quot;&gt;\n                                                            &lt;item name=&quot;children&quot; xsi:type=&quot;array&quot;&gt;\n                                                                &lt;item name=&quot;discount&quot; xsi:type=&quot;array&quot;&gt;\n                                                                &lt;item name=&quot;config&quot; xsi:type=&quot;array&quot;&gt;\n    &lt;item name=&quot;componentDisabled&quot; xsi:type=&quot;boolean&quot;&gt;true&lt;\/item&gt;\n&lt;\/item&gt;\n                                                                &lt;\/item&gt;\n                                                            &lt;\/item&gt;\n                                                        &lt;\/item&gt;\n                                                    &lt;\/item&gt;\n                                                &lt;\/item&gt;\n                                            &lt;\/item&gt;\n                                        &lt;\/item&gt;\n                                    &lt;\/item&gt;\n                                &lt;\/item&gt;\n                            &lt;\/item&gt;\n                        &lt;\/item&gt;\n                    &lt;\/item&gt;\n                &lt;\/argument&gt;\n            &lt;\/arguments&gt;\n        &lt;\/referenceBlock&gt;\n    &lt;\/body&gt;\n&lt;\/page&gt;<\/pre>\n\n\n\n<p>Here, componentDisabled\u00a0with true value disables the respective component.<br>After this code, discount code component get disabled from checkout page.<br>I hope this blog will help you with Remove Layout added by JS layout in your Magento 2. You can also explore headless eCommerce development\u00a0to develop high-quality interactive websites with the help of JavaScript frameworks.<br>Please reach out to our team via a\u00a0<a href=\"https:\/\/webkul.uvdesk.com\/en\/customer\/create-ticket\/\">support ticket<\/a>\u00a0if you have any queries.<br>Try this and if you have any queries then just comment below \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Magento2, layout on some pages are added by js layout by using ui-components. So, if you want to remove an component added by js layout then you can use given process: you need to add these lines in your layout file: This code is written under the component which you want to remove and <a href=\"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":68,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[302],"tags":[256,2070,6366,6274],"class_list":["post-116886","post","type-post","status-publish","format-standard","hentry","category-magento2","tag-layout","tag-magento2","tag-remove-block-from-js-layout","tag-remove-block-from-page"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Remove Layout added by JS Layout in Magento 2<\/title>\n<meta name=\"description\" content=\"In this blog we&#039;ll discuss How to Remove Layout added by JS layout in Magento 2\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Remove Layout added by JS Layout in Magento 2\" \/>\n<meta property=\"og:description\" content=\"In this blog we&#039;ll discuss How to Remove Layout added by JS layout in Magento 2\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-03-20T05:25:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-15T13:09:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Bulbul\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bulbul\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/\"},\"author\":{\"name\":\"Bulbul\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/c9c6288b3950490ffdb37cb2a526996e\"},\"headline\":\"Remove Layout added by JS Layout in Magento 2\",\"datePublished\":\"2018-03-20T05:25:49+00:00\",\"dateModified\":\"2024-02-15T13:09:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/\"},\"wordCount\":186,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"keywords\":[\"layout\",\"Magento2\",\"remove block from js layout\",\"remove block from page\"],\"articleSection\":[\"Magento2\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/\",\"url\":\"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/\",\"name\":\"Remove Layout added by JS Layout in Magento 2\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"datePublished\":\"2018-03-20T05:25:49+00:00\",\"dateModified\":\"2024-02-15T13:09:53+00:00\",\"description\":\"In this blog we'll discuss How to Remove Layout added by JS layout in Magento 2\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Remove Layout added by JS Layout in Magento 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/c9c6288b3950490ffdb37cb2a526996e\",\"name\":\"Bulbul\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/37ea7175f5ae6557d01bb38e147f6a02a540714ecdb71770d8ec554d4d34c23f?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/37ea7175f5ae6557d01bb38e147f6a02a540714ecdb71770d8ec554d4d34c23f?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g\",\"caption\":\"Bulbul\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/bulbul896\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Remove Layout added by JS Layout in Magento 2","description":"In this blog we'll discuss How to Remove Layout added by JS layout in Magento 2","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/","og_locale":"en_US","og_type":"article","og_title":"Remove Layout added by JS Layout in Magento 2","og_description":"In this blog we'll discuss How to Remove Layout added by JS layout in Magento 2","og_url":"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2018-03-20T05:25:49+00:00","article_modified_time":"2024-02-15T13:09:53+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png","type":"image\/png"}],"author":"Bulbul","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Bulbul","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/"},"author":{"name":"Bulbul","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/c9c6288b3950490ffdb37cb2a526996e"},"headline":"Remove Layout added by JS Layout in Magento 2","datePublished":"2018-03-20T05:25:49+00:00","dateModified":"2024-02-15T13:09:53+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/"},"wordCount":186,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"keywords":["layout","Magento2","remove block from js layout","remove block from page"],"articleSection":["Magento2"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/","url":"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/","name":"Remove Layout added by JS Layout in Magento 2","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"datePublished":"2018-03-20T05:25:49+00:00","dateModified":"2024-02-15T13:09:53+00:00","description":"In this blog we'll discuss How to Remove Layout added by JS layout in Magento 2","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/remove-layout-added-js-layout-magento2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Remove Layout added by JS Layout in Magento 2"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/c9c6288b3950490ffdb37cb2a526996e","name":"Bulbul","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/37ea7175f5ae6557d01bb38e147f6a02a540714ecdb71770d8ec554d4d34c23f?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/37ea7175f5ae6557d01bb38e147f6a02a540714ecdb71770d8ec554d4d34c23f?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Feva.png&r=g","caption":"Bulbul"},"url":"https:\/\/webkul.com\/blog\/author\/bulbul896\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/116886","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=116886"}],"version-history":[{"count":33,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/116886\/revisions"}],"predecessor-version":[{"id":422426,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/116886\/revisions\/422426"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=116886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=116886"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=116886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}