{"id":14185,"date":"2017-09-05T16:38:25","date_gmt":"2017-09-05T13:38:25","guid":{"rendered":"https:\/\/belvg.com\/blog\/?p=14185"},"modified":"2021-02-18T14:17:20","modified_gmt":"2021-02-18T12:17:20","slug":"how-to-customize-magento-theme-using-layout-xml","status":"publish","type":"post","link":"https:\/\/belvg.com\/blog\/how-to-customize-magento-theme-using-layout-xml.html","title":{"rendered":"How To Customize Magento Theme Using Layout XML"},"content":{"rendered":"\n<p><strong>How can I include a custom CSS file on a product detail page for a specific product type (e.g. grouped, downloadable, configurable, etc.)?<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">For adding the custom CSS file (for example, &ldquo;custom_example.css&rdquo;) for various product types, it&rsquo;s necessary to open the layout of directory file in your theme:<!--more--><\/span><br>\n<span style=\"font-weight: 400;\">&ldquo;\/app\/design\/frontend\/our_package\/our_theme\/layout\/catalog.xml&rdquo;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Additionally, we can use the file local.xml: <\/span><br>\n<span style=\"font-weight: 400;\">&ldquo;\/app\/design\/frontend\/our_package\/our_theme\/layout\/local.xml&rdquo;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">And then depending on product type you should add the necessary code:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For <\/span><b>Simple Product Type<\/b><span style=\"font-weight: 400;\">: <\/span><\/p>\n<pre class=\"lang:php decode:true \">&lt;PRODUCT_TYPE_simple translate=\"label\" module=\"catalog\"&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;reference name=\"head\"&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action method=\"addCss\"&gt;&lt;stylesheet&gt;css\/custom_example.css&lt;\/stylesheet&gt;&lt;\/action&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;\/reference&gt;\r\n&lt;\/PRODUCT_TYPE_simple&gt;<\/pre>\n<p><span style=\"font-weight: 400;\">For <\/span><b>Grouped Product Type<\/b><span style=\"font-weight: 400;\">:<\/span><\/p>\n<pre class=\"lang:php decode:true \">&lt;PRODUCT_TYPE_grouped translate=\"label\" module=\"catalog\"&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;reference name=\"head\"&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action method=\"addCss\"&gt;&lt;stylesheet&gt;css\/custom_example.css&lt;\/stylesheet&gt;&lt;\/action&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;\/reference&gt;\r\n&lt;\/PRODUCT_TYPE_grouped&gt;<\/pre>\n<p><span style=\"font-weight: 400;\">For <\/span><b>Configurable Product Type<\/b><span style=\"font-weight: 400;\">:<\/span><\/p>\n<pre class=\"lang:php decode:true \">&lt;PRODUCT_TYPE_configurable translate=\"label\" module=\"catalog\"&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;reference name=\"head\"&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action method=\"addCss\"&gt;&lt;stylesheet&gt;css\/custom_example.css&lt;\/stylesheet&gt;&lt;\/action&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;\/reference&gt;\r\n&lt;\/PRODUCT_TYPE_configurable&gt;<\/pre>\n<p><span style=\"font-weight: 400;\">For <\/span><b>Virtual Product Type<\/b><span style=\"font-weight: 400;\">:<\/span><\/p>\n<pre class=\"lang:php decode:true \">&lt;PRODUCT_TYPE_virtual translate=\"label\" module=\"catalog\"&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;reference name=\"head\"&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action method=\"addCss\"&gt;&lt;stylesheet&gt;css\/custom_example.css&lt;\/stylesheet&gt;&lt;\/action&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;\/reference&gt;\r\n&lt;\/PRODUCT_TYPE_virtual&gt;<\/pre>\n<p><span style=\"font-weight: 400;\">For <\/span><b>Bundle Product Type<\/b><span style=\"font-weight: 400;\">:<\/span><\/p>\n<pre class=\"lang:php decode:true \">&lt;PRODUCT_TYPE_bundle translate=\"label\" module=\"catalog\"&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;reference name='head'&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action method=\"addCss\"&gt;&lt;stylesheet&gt;css\/custom_example.css&lt;\/stylesheet&gt;&lt;\/action&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;\/reference&gt;\r\n&lt;\/PRODUCT_TYPE_bundle&gt;<\/pre>\n<p><span style=\"font-weight: 400;\">For <\/span><b>Downloadable Product Type<\/b><span style=\"font-weight: 400;\">:<\/span><\/p>\n<pre class=\"lang:php decode:true \">&lt;PRODUCT_TYPE_downloadable translate=\"label\" module=\"catalog\"&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;reference name=\"head\"&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action\r\n\r\nmethod=\"addCss\"&gt;&lt;stylesheet&gt;css\/custom_example.css&lt;\/stylesheet&gt;&lt;\/action&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;\/reference&gt;\r\n&lt;\/PRODUCT_TYPE_downloadable&gt;<\/pre>\n<p><span style=\"font-weight: 400;\">Where &ldquo;css\/custom_example.css&rdquo; is the file path in our custom theme. Of course, make sure you have put the custom file on the specified path. In this case, it means the folder with css files of our custom theme: &ldquo;\/skin\/frontend\/our_package\/our_theme\/css&rdquo;.&nbsp;<\/span><span style=\"font-weight: 400;\">Don&rsquo;t forget to clear cache after making changes.<\/span><\/p>\n<p><strong>How can I include a custom CSS file on a CMS page?<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">In order to include the custom file (for example, &ldquo;custom_example.css&rdquo;) for CMS Page, there&rsquo;re two possible ways. But before applying, it&rsquo;s necessary to put the custom file in the folder with CSS files of our custom theme: &ldquo;\/skin\/frontend\/our_package\/our_theme\/css&rdquo;.<\/span><\/p>\n<p><b>The first way:<\/b><br>\n<span style=\"font-weight: 400;\">Get in the admin panel and open CMS Page which the custom css file is applied for. On the tab &ldquo;Design&rdquo; in the field &ldquo;Custom Layout Update XML&rdquo; add the connection code of custom css file: <\/span><\/p>\n<pre class=\"lang:php decode:true\">&lt;reference name=\"head\"&gt;\r\n&lt;action method=\"addCss\"&gt;&lt;stylesheet&gt;css\/custom_example.css&lt;\/stylesheet&gt;&lt;\/action&gt;\r\n&lt;\/reference&gt;<\/pre>\n<p><span style=\"font-weight: 400;\">Where &ldquo;css\/custom_example.css&rdquo; is the file path in our custom theme.<\/span><\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2017\/09\/How-To-Customize-Magento-Theme-Using-Layout-XML_2.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"lazy alignnone size-full wp-image-14189\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2017\/09\/How-To-Customize-Magento-Theme-Using-Layout-XML_2.jpg\" alt=\"How To Customize Magento Theme Using Layout XML_2\" width=\"988\" height=\"700\" title=\"How To Customize Magento Theme Using Layout XML\"><\/a><\/p>\n<p><strong>The second way: <\/strong><br>\n<span style=\"font-weight: 400;\">Open layout file local.xml in your theme: <\/span><br>\n<span style=\"font-weight: 400;\">&ldquo;\/app\/design\/frontend\/our_package\/our_theme\/layout\/local.xml&rdquo;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In this file we should add the following code: <\/span><\/p>\n<pre class=\"lang:php decode:true\">&lt;cms_page page_id=\"8\"&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;reference name=\"head\"&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action method=\"addCss\"&gt;&lt;stylesheet&gt;css\/custom_example.css&lt;\/stylesheet&gt;&lt;\/action&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;\/reference&gt;\r\n&lt;\/cms_page&gt;<\/pre>\n<p><span style=\"font-weight: 400;\">Where the meaning of the attribute &ldquo;page_id&rdquo; is the id of the CMS Page which the custom styles file is going to be applied for; &ldquo;css\/custom_example.css&rdquo; is the file path in our custom theme.&nbsp;<\/span><span style=\"font-weight: 400;\">Don&rsquo;t forget to clear cache after making changes.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">I would add for myself, it&rsquo;s not useful to practice the second way, as it &ldquo;litters&rdquo; the layout file and, as a result, you have to monitor when deleting CMS Page, there&rsquo;s no unused connection code of custom files left.<\/span><\/p>\n<div class=\"module_in_content_container\"><a href=\"https:\/\/belvg.com\/migration-to-magento-2\" class=\"link_to_module\" target=\"_blank\" rel=\"noopener\"><\/a><div class=\"module_content\"><img src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/06\/migration-to-magento-2.png\" width=\"100\" height=\"100\" alt=\"migration to magento 2\" class=\"module_image\" title=\"How To Customize Magento Theme Using Layout XML\"><div class=\"module_content_part\"><h3 class=\"title\">Magento 2 Migration<\/h3><p class=\"module_content_text\">Take your online store to the next level with BelVG Magento 2 Migration<\/p><a href=\"https:\/\/belvg.com\/migration-to-magento-2\" class=\"link_2_to_module\" target=\"_blank\" style=\"display:inline-block\" rel=\"noopener\"><span class=\"read-more\">Visit the page<\/span><\/a><\/div><\/div><\/div>\n<p><b>How can you avoid copying core layout XML files into a custom theme by using the local.xml layout file?<\/b><\/p>\n<p><span style=\"font-weight: 400;\">We can avoid copying core layout XML files into a custom theme by using different handles, directives, and methods in the layout file local.xml. Let&rsquo;s analyze details!<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The general algorithm of working with layout file is following:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Specify the necessary handle (for example, &lt;default&gt; or &lt;page_empty&gt;, so it depends on the pages it will be applied for). <\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Define the necessary directive (for example, &lt;reference name=&rdquo;root&rdquo;&gt; in order to refer to the highest block of the structure).<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Practise necessary methods (for example, the method &ldquo;remove&rdquo; should be used for removing the block from the current position).<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">If you need to learn more information related to directives, handles, and methods, <a href=\"https:\/\/belvg.com\/blog\/layout-xml-directives-handles-block-reference-action-remove-update.html\" target=\"_blank\" rel=\"noopener\">read the <\/a><\/span><span style=\"font-weight: 400;\"><a href=\"https:\/\/belvg.com\/blog\/layout-xml-directives-handles-block-reference-action-remove-update.html\" target=\"_blank\" rel=\"noopener\">article<\/a>.<\/span><br>\n<span style=\"font-weight: 400;\">It was the general algorithm, but let&rsquo;s consider some real examples of standard tasks, which we can cope with in the file local.xml. <\/span><\/p>\n<p><b>Example 1:<\/b><br>\n<span style=\"font-weight: 400;\">Let&rsquo;s add styles file (for example, &ldquo;custom_styles.css&rdquo;) and scripts file (for example, &ldquo;custom_scripts.js&rdquo;) on the home page. So you need to use the following code in the file local.xml<\/span><\/p>\n<pre class=\"lang:php decode:true \">&lt;cms_index_index&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;reference name=\"head\"&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action method=\"addCss\"&gt;&lt;stylesheet&gt;css\/custom_styles.css&lt;\/stylesheet&gt;&lt;\/action&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action method=\"addJs\"&gt;&lt;script&gt;js\/custom_scripts.js&lt;\/script&gt;&lt;\/action&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;\/reference&gt;\r\n&lt;\/cms_index_index&gt;<\/pre>\n<p><span style=\"font-weight: 400;\">Where:<\/span><br>\n<span style=\"font-weight: 400;\"> &lt;cms_index_index&gt; &ndash; handle, which shows that changes contained will refer to the home page only.<\/span><br>\n<span style=\"font-weight: 400;\">&lt;reference name=&rdquo;head&rdquo;&gt; &ndash; directive, which points out that changes will concern the block &ldquo;head&rdquo; on the page.<\/span><br>\n<span style=\"font-weight: 400;\">&lt;action method=&rdquo;addCss&rdquo;&gt; &ndash; method of adding styles files (&ldquo;css\/custom_styles.css&rdquo; &ndash; styles file path).<\/span><br>\n<span style=\"font-weight: 400;\">&lt;action method=&rdquo;addJs&rdquo;&gt; &ndash; method of adding scripts files (&ldquo;js\/custom_scripts.js&rdquo; &ndash; scripts file path).<\/span><\/p>\n<p><b>Example 2: <\/b><br>\n<span style=\"font-weight: 400;\">Let&rsquo;s apply the page template with 2 columns &ndash; content and right sidebar (2columns-right.phtml) for the default category page). So you need to use the following code in the file local.xml<\/span><\/p>\n<pre class=\"lang:php decode:true\">&lt;catalog_category_default&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;reference name=\"root\"&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action method=\"setTemplate\"&gt;&lt;template&gt;page\/2columns-right.phtml&lt;\/template&gt;&lt;\/action&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;\/reference&gt;\r\n&lt;\/catalog_category_default&gt;<\/pre>\n<p><span style=\"font-weight: 400;\">Where:<\/span><br>\n<span style=\"font-weight: 400;\">&lt;catalog_category_default&gt; &ndash; handle, which shows that changes contained will refer to the category page only.<\/span><br>\n<span style=\"font-weight: 400;\">&lt;reference name=&rdquo;root&rdquo;&gt; &ndash; directive, which points out that changes will concern the highest block. <\/span><br>\n<span style=\"font-weight: 400;\">&lt;action method=&rdquo;setTemplate&rdquo;&gt; &ndash; method of using the necessary template.<\/span><br>\n<span style=\"font-weight: 400;\">&ldquo;page\/2columns-right.phtml&rdquo; &ndash; path to the template used.<\/span><\/p>\n<div class=\"module_in_content_container\"><a href=\"https:\/\/belvg.com\/magento-custom-development\" class=\"link_to_module\" target=\"_blank\" rel=\"noopener\"><\/a><div class=\"module_content\"><img src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/01\/magento-custom-development.png\" width=\"120\" height=\"120\" alt=\"magento custom development\" class=\"module_image\" title=\"How To Customize Magento Theme Using Layout XML\"><div class=\"module_content_part\"><h3 class=\"title\">Magento Custom Development<\/h3><p class=\"module_content_text\">Take your online store to the next level with BelVG Magento Custom Development <\/p><a href=\"https:\/\/belvg.com\/magento-custom-development\" class=\"link_2_to_module\" target=\"_blank\" style=\"display:inline-block\" rel=\"noopener\"><span class=\"read-more\">Visit the page<\/span><\/a><\/div><\/div><\/div>\n\n","protected":false},"excerpt":{"rendered":"How can I include a custom CSS file on a product detail page for a &#8230;","protected":false},"author":82,"featured_media":14193,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"_acf_changed":false,"footnotes":""},"categories":[35,14,473,526],"tags":[],"class_list":["post-14185","post","type-post","status-publish","format-image","has-post-thumbnail","hentry","category-certification","category-magento","category-magento-front-end-developer","category-magento-theme","post_format-post-format-image"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.4 - aioseo.com -->\n\t<meta name=\"description\" content=\"Find the answer to the questions to be prepared for Magento Front End Developer Certification. Use layout XML to customize a theme.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Andrey Litvin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/belvg.com\/blog\/how-to-customize-magento-theme-using-layout-xml.html\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.4\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-customize-magento-theme-using-layout-xml.html#article\",\"name\":\"How To Customize Magento Theme Using Layout XML | BelVG Blog\",\"headline\":\"How To Customize Magento Theme Using Layout XML\",\"author\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/How-To-Customize-a-Theme-Using-Layout-XML.jpg\",\"width\":770,\"height\":290,\"caption\":\"How To Customize a Theme Using Layout XML\"},\"datePublished\":\"2017-09-05T16:38:25+02:00\",\"dateModified\":\"2021-02-18T14:17:20+02:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-customize-magento-theme-using-layout-xml.html#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-customize-magento-theme-using-layout-xml.html#webpage\"},\"articleSection\":\"Certification, Magento, Magento Front End Developer, Magento Theme, Image\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-customize-magento-theme-using-layout-xml.html#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento#listItem\",\"name\":\"Magento\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento#listItem\",\"position\":2,\"name\":\"Magento\",\"item\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-customize-magento-theme-using-layout-xml.html#listItem\",\"name\":\"How To Customize Magento Theme Using Layout XML\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-customize-magento-theme-using-layout-xml.html#listItem\",\"position\":3,\"name\":\"How To Customize Magento Theme Using Layout XML\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento#listItem\",\"name\":\"Magento\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\",\"name\":\"BelVG Blog\",\"description\":\"Magento and Prestashop articles\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin\",\"name\":\"Andrey Litvin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-customize-magento-theme-using-layout-xml.html#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e1a6e3c80cb940fddb65016d94b015cd951b4a8a9cd7227565131f28ea95c7a0?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Andrey Litvin\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-customize-magento-theme-using-layout-xml.html#webpage\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-customize-magento-theme-using-layout-xml.html\",\"name\":\"How To Customize Magento Theme Using Layout XML | BelVG Blog\",\"description\":\"Find the answer to the questions to be prepared for Magento Front End Developer Certification. Use layout XML to customize a theme.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-customize-magento-theme-using-layout-xml.html#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/How-To-Customize-a-Theme-Using-Layout-XML.jpg\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-customize-magento-theme-using-layout-xml.html\\\/#mainImage\",\"width\":770,\"height\":290,\"caption\":\"How To Customize a Theme Using Layout XML\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-to-customize-magento-theme-using-layout-xml.html#mainImage\"},\"datePublished\":\"2017-09-05T16:38:25+02:00\",\"dateModified\":\"2021-02-18T14:17:20+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\",\"name\":\"BelVG Blog\",\"description\":\"Magento and Prestashop articles\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How To Customize Magento Theme Using Layout XML | BelVG Blog","description":"Find the answer to the questions to be prepared for Magento Front End Developer Certification. Use layout XML to customize a theme.","canonical_url":"https:\/\/belvg.com\/blog\/how-to-customize-magento-theme-using-layout-xml.html","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/belvg.com\/blog\/how-to-customize-magento-theme-using-layout-xml.html#article","name":"How To Customize Magento Theme Using Layout XML | BelVG Blog","headline":"How To Customize Magento Theme Using Layout XML","author":{"@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author"},"publisher":{"@id":"https:\/\/belvg.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2017\/09\/How-To-Customize-a-Theme-Using-Layout-XML.jpg","width":770,"height":290,"caption":"How To Customize a Theme Using Layout XML"},"datePublished":"2017-09-05T16:38:25+02:00","dateModified":"2021-02-18T14:17:20+02:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/belvg.com\/blog\/how-to-customize-magento-theme-using-layout-xml.html#webpage"},"isPartOf":{"@id":"https:\/\/belvg.com\/blog\/how-to-customize-magento-theme-using-layout-xml.html#webpage"},"articleSection":"Certification, Magento, Magento Front End Developer, Magento Theme, Image"},{"@type":"BreadcrumbList","@id":"https:\/\/belvg.com\/blog\/how-to-customize-magento-theme-using-layout-xml.html#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/belvg.com\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento#listItem","name":"Magento"}},{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento#listItem","position":2,"name":"Magento","item":"https:\/\/belvg.com\/blog\/category\/magento","nextItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/how-to-customize-magento-theme-using-layout-xml.html#listItem","name":"How To Customize Magento Theme Using Layout XML"},"previousItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/how-to-customize-magento-theme-using-layout-xml.html#listItem","position":3,"name":"How To Customize Magento Theme Using Layout XML","previousItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento#listItem","name":"Magento"}}]},{"@type":"Organization","@id":"https:\/\/belvg.com\/blog\/#organization","name":"BelVG Blog","description":"Magento and Prestashop articles","url":"https:\/\/belvg.com\/blog\/"},{"@type":"Person","@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author","url":"https:\/\/belvg.com\/blog\/author\/andrey-litvin","name":"Andrey Litvin","image":{"@type":"ImageObject","@id":"https:\/\/belvg.com\/blog\/how-to-customize-magento-theme-using-layout-xml.html#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/e1a6e3c80cb940fddb65016d94b015cd951b4a8a9cd7227565131f28ea95c7a0?s=96&d=mm&r=g","width":96,"height":96,"caption":"Andrey Litvin"}},{"@type":"WebPage","@id":"https:\/\/belvg.com\/blog\/how-to-customize-magento-theme-using-layout-xml.html#webpage","url":"https:\/\/belvg.com\/blog\/how-to-customize-magento-theme-using-layout-xml.html","name":"How To Customize Magento Theme Using Layout XML | BelVG Blog","description":"Find the answer to the questions to be prepared for Magento Front End Developer Certification. Use layout XML to customize a theme.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/belvg.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/belvg.com\/blog\/how-to-customize-magento-theme-using-layout-xml.html#breadcrumblist"},"author":{"@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author"},"creator":{"@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author"},"image":{"@type":"ImageObject","url":"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2017\/09\/How-To-Customize-a-Theme-Using-Layout-XML.jpg","@id":"https:\/\/belvg.com\/blog\/how-to-customize-magento-theme-using-layout-xml.html\/#mainImage","width":770,"height":290,"caption":"How To Customize a Theme Using Layout XML"},"primaryImageOfPage":{"@id":"https:\/\/belvg.com\/blog\/how-to-customize-magento-theme-using-layout-xml.html#mainImage"},"datePublished":"2017-09-05T16:38:25+02:00","dateModified":"2021-02-18T14:17:20+02:00"},{"@type":"WebSite","@id":"https:\/\/belvg.com\/blog\/#website","url":"https:\/\/belvg.com\/blog\/","name":"BelVG Blog","description":"Magento and Prestashop articles","inLanguage":"en-US","publisher":{"@id":"https:\/\/belvg.com\/blog\/#organization"}}]}},"aioseo_meta_data":{"post_id":"14185","title":"How To Customize Magento Theme Using Layout XML | #site_title","description":"Find the answer to the questions to be prepared for Magento Front End Developer Certification. Use layout XML to customize a theme.","keywords":null,"keyphrases":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_image_url":null,"twitter_title":null,"twitter_description":null,"schema_type":"default","schema_type_options":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null,"created":"2026-11-03 18:37:16","updated":"2026-11-03 18:37:16"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/belvg.com\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/belvg.com\/blog\/category\/magento\" title=\"Magento\">Magento<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow To Customize Magento Theme Using Layout XML\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/belvg.com\/blog\/"},{"label":"Magento","link":"https:\/\/belvg.com\/blog\/category\/magento"},{"label":"How To Customize Magento Theme Using Layout XML","link":"https:\/\/belvg.com\/blog\/how-to-customize-magento-theme-using-layout-xml.html"}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/14185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/users\/82"}],"replies":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/comments?post=14185"}],"version-history":[{"count":1,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/14185\/revisions"}],"predecessor-version":[{"id":24228,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/14185\/revisions\/24228"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media\/14193"}],"wp:attachment":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media?parent=14185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/categories?post=14185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/tags?post=14185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}