{"id":14905,"date":"2018-01-09T16:05:20","date_gmt":"2018-01-09T13:05:20","guid":{"rendered":"https:\/\/belvg.com\/blog\/?p=14905"},"modified":"2021-02-18T13:15:53","modified_gmt":"2021-02-18T11:15:53","slug":"adding-javascript-via-layout-in-magento","status":"publish","type":"post","link":"https:\/\/belvg.com\/blog\/adding-javascript-via-layout-in-magento.html","title":{"rendered":"Adding JavaScript via Layout in Magento"},"content":{"rendered":"\n<p><span style=\"font-weight: 400;\"><a href=\"https:\/\/u.magento.com\/certification\" target=\"_blank\" rel=\"noopener\">Magento front end developer certification<\/a> is an exam that requires a clear understanding of Magento&rsquo;s components and the ability to operate with them in order to modify the user interface according to the recent trends. By passing the exam, the developer proves his level of knowledge and shows how familiar he is with Magento.<!--more--> <\/span><\/p>\n<p><span style=\"font-weight: 400;\">We represent FAQs about Magento 1 front end components to help developers get knowledgeable about the topic. <\/span><\/p>\n<h2><strong>How to include custom JavaScript on all pages<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">In order to add a custom JS file on all pages, you need to include the script file (for example, test.js) in the local.xml file <strong>app\/design\/frontend\/our_package\/our_theme\/layout\/local.xml<\/strong> with the commands:<\/span><\/p>\n<p>If we add the script for some certain theme, then we use the following command:<\/p>\n<pre class=\"lang:js decode:true \">&lt;action method=\"addItem\"&gt;&lt;type&gt;skin_js&lt;\/type&gt;&lt;name&gt;js\/test.js&lt;\/name&gt;&lt;\/action&gt;<\/pre>\n<p>and the script file must be located in&nbsp;<b>skin\/design\/frontend\/our_package\/our_theme\/js\/test.js<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The file will be as follows:<\/span><\/p>\n<pre class=\"lang:js decode:true \">&lt;?xml version=\"1.0\"?&gt;\r\n&lt;layout version=\"0.1.0\"&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;default&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;reference name=\"root\"&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;reference name=\"head\"&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action method=\"addItem\"&gt;&lt;type&gt;skin_js&lt;\/type&gt;&lt;name&gt;js\/test.js&lt;\/name&gt;&lt;\/action&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/reference&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/reference&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;\/default&gt;\r\n&lt;\/layout&gt;<\/pre>\n<p><span style=\"font-weight: 400;\">Where &ldquo;default&rdquo; is a handle specifying that the file is added to all pages.<\/span><\/p>\n<p>If we add the script globally, then we use the following command:<\/p>\n<pre class=\"lang:js decode:true\">&lt;action method=\"addJs\"&gt;&lt;script&gt;test.js&lt;\/script&gt;&lt;\/action&gt;<\/pre>\n<p>and the script file must be located in <strong>magento&nbsp;root directory\/js\/test.js<\/strong><\/p>\n<h2><strong>How to include custom JavaScript on specific pages<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">In order to add a custom JS file on specific pages, you need to include the script file (for example, test.js) in the local.xml file <strong>app\/design\/frontend\/our_package\/our_theme\/layout\/local.xml<\/strong> with the commands:<\/span><\/p>\n<p>If we add the script for some certain theme, then we use the following command:<\/p>\n<pre class=\"lang:js decode:true \">&lt;action method=\"addItem\"&gt;&lt;type&gt;skin_js&lt;\/type&gt;&lt;name&gt;js\/test.js&lt;\/name&gt;&lt;\/action&gt;<\/pre>\n<p>and the script file must be located in&nbsp;<b>skin\/design\/frontend\/our_package\/our_theme\/js\/test.js<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Here is an example of adding a JS file on the product page:<\/span><\/p>\n<pre class=\"lang:js decode:true \">&lt;?xml version=\"1.0\"?&gt;\r\n&lt;layout version=\"0.1.0\"&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;catalog_product_view&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;reference name=\"root\"&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;reference name=\"head\"&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action method=\"addItem\"&gt;&lt;type&gt;skin_js&lt;\/type&gt;&lt;name&gt;js\/test.js&lt;\/name&gt;&lt;\/action&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/reference&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/reference&gt;\r\n&nbsp;&nbsp;&nbsp;&lt;\/catalog_product_view&gt;\r\n&lt;\/layout&gt;\r\n<\/pre>\n<p><span style=\"font-weight: 400;\">Where &ldquo;catalog_product_view&rdquo; is a handle specifying that the file is added to all product pages.<\/span><\/p>\n<p>If we add the script globally, then we use the following command:<\/p>\n<pre class=\"lang:js decode:true \">&lt;action method=\"addJs\"&gt;&lt;script&gt;test.js&lt;\/script&gt;&lt;\/action&gt;<\/pre>\n<p>and the script file must be located in&nbsp;<strong>magento&nbsp;root directory\/js\/test.js<\/strong><\/p>\n<p><span style=\"font-weight: 400;\">More FAQs you can find in the articles to be published soon. Subscribe to stay tuned.<\/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\/05\/magento-development-services.png\" width=\"481\" height=\"480\" alt=\"magento development services\" class=\"module_image\" title=\"Adding JavaScript via Layout in Magento\"><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<p>Need expert <a href=\"https:\/\/belvg.com\/magento-audit\" target=\"_blank\" rel=\"noopener\">Magento audit<\/a> services? Turn to BelVG!<\/p>\n\n","protected":false},"excerpt":{"rendered":"Magento Front End Developer Certification Exam","protected":false},"author":82,"featured_media":14908,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"_acf_changed":false,"footnotes":""},"categories":[35,14,473,524],"tags":[],"class_list":["post-14905","post","type-post","status-publish","format-image","has-post-thumbnail","hentry","category-certification","category-magento","category-magento-front-end-developer","category-magento-speed-optimization","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=\"Magento front end developer certification is an exam that requires a clear understanding of Magento\u2019s components and the ability to operate with them in order to modify the user interface according to the recent trends.\" \/>\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\/adding-javascript-via-layout-in-magento.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\\\/adding-javascript-via-layout-in-magento.html#article\",\"name\":\"Adding JavaScript via Layout in Magento | BelVG Blog\",\"headline\":\"Adding JavaScript via Layout in Magento\",\"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\\\/2018\\\/01\\\/Adding-JavaScript-via-Layout.jpg\",\"width\":770,\"height\":433,\"caption\":\"Adding JavaScript via Layout\"},\"datePublished\":\"2018-01-09T16:05:20+02:00\",\"dateModified\":\"2021-02-18T13:15:53+02:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/adding-javascript-via-layout-in-magento.html#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/adding-javascript-via-layout-in-magento.html#webpage\"},\"articleSection\":\"Certification, Magento, Magento Front End Developer, Magento Speed Optimization, Image\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/adding-javascript-via-layout-in-magento.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\\\/adding-javascript-via-layout-in-magento.html#listItem\",\"name\":\"Adding JavaScript via Layout in Magento\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/adding-javascript-via-layout-in-magento.html#listItem\",\"position\":3,\"name\":\"Adding JavaScript via Layout in Magento\",\"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\\\/adding-javascript-via-layout-in-magento.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\\\/adding-javascript-via-layout-in-magento.html#webpage\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/adding-javascript-via-layout-in-magento.html\",\"name\":\"Adding JavaScript via Layout in Magento | BelVG Blog\",\"description\":\"Magento front end developer certification is an exam that requires a clear understanding of Magento\\u2019s components and the ability to operate with them in order to modify the user interface according to the recent trends.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/adding-javascript-via-layout-in-magento.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\\\/2018\\\/01\\\/Adding-JavaScript-via-Layout.jpg\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/adding-javascript-via-layout-in-magento.html\\\/#mainImage\",\"width\":770,\"height\":433,\"caption\":\"Adding JavaScript via Layout\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/adding-javascript-via-layout-in-magento.html#mainImage\"},\"datePublished\":\"2018-01-09T16:05:20+02:00\",\"dateModified\":\"2021-02-18T13:15:53+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":"Adding JavaScript via Layout in Magento | BelVG Blog","description":"Magento front end developer certification is an exam that requires a clear understanding of Magento\u2019s components and the ability to operate with them in order to modify the user interface according to the recent trends.","canonical_url":"https:\/\/belvg.com\/blog\/adding-javascript-via-layout-in-magento.html","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/belvg.com\/blog\/adding-javascript-via-layout-in-magento.html#article","name":"Adding JavaScript via Layout in Magento | BelVG Blog","headline":"Adding JavaScript via Layout in Magento","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\/2018\/01\/Adding-JavaScript-via-Layout.jpg","width":770,"height":433,"caption":"Adding JavaScript via Layout"},"datePublished":"2018-01-09T16:05:20+02:00","dateModified":"2021-02-18T13:15:53+02:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/belvg.com\/blog\/adding-javascript-via-layout-in-magento.html#webpage"},"isPartOf":{"@id":"https:\/\/belvg.com\/blog\/adding-javascript-via-layout-in-magento.html#webpage"},"articleSection":"Certification, Magento, Magento Front End Developer, Magento Speed Optimization, Image"},{"@type":"BreadcrumbList","@id":"https:\/\/belvg.com\/blog\/adding-javascript-via-layout-in-magento.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\/adding-javascript-via-layout-in-magento.html#listItem","name":"Adding JavaScript via Layout in Magento"},"previousItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/adding-javascript-via-layout-in-magento.html#listItem","position":3,"name":"Adding JavaScript via Layout in Magento","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\/adding-javascript-via-layout-in-magento.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\/adding-javascript-via-layout-in-magento.html#webpage","url":"https:\/\/belvg.com\/blog\/adding-javascript-via-layout-in-magento.html","name":"Adding JavaScript via Layout in Magento | BelVG Blog","description":"Magento front end developer certification is an exam that requires a clear understanding of Magento\u2019s components and the ability to operate with them in order to modify the user interface according to the recent trends.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/belvg.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/belvg.com\/blog\/adding-javascript-via-layout-in-magento.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\/2018\/01\/Adding-JavaScript-via-Layout.jpg","@id":"https:\/\/belvg.com\/blog\/adding-javascript-via-layout-in-magento.html\/#mainImage","width":770,"height":433,"caption":"Adding JavaScript via Layout"},"primaryImageOfPage":{"@id":"https:\/\/belvg.com\/blog\/adding-javascript-via-layout-in-magento.html#mainImage"},"datePublished":"2018-01-09T16:05:20+02:00","dateModified":"2021-02-18T13:15:53+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":"14905","title":"Adding JavaScript via Layout in Magento | #site_title","description":"Magento front end developer certification is an exam that requires a clear understanding of Magento\u2019s components and the ability to operate with them in order to modify the user interface according to the recent trends.","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:12","updated":"2026-11-03 18:37:12"},"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\tAdding JavaScript via Layout in Magento\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":"Adding JavaScript via Layout in Magento","link":"https:\/\/belvg.com\/blog\/adding-javascript-via-layout-in-magento.html"}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/14905","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=14905"}],"version-history":[{"count":4,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/14905\/revisions"}],"predecessor-version":[{"id":22839,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/14905\/revisions\/22839"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media\/14908"}],"wp:attachment":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media?parent=14905"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/categories?post=14905"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/tags?post=14905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}