{"id":157,"date":"2010-04-26T08:34:13","date_gmt":"2010-04-26T08:34:13","guid":{"rendered":"http:\/\/mahenderpal.wordpress.com\/?p=157"},"modified":"2010-04-26T08:34:13","modified_gmt":"2010-04-26T08:34:13","slug":"rearrange-navigation-items-in-left-navigation-bar","status":"publish","type":"post","link":"https:\/\/himbap.com\/blog\/?p=157","title":{"rendered":"Rearrange Navigation Items in Left Navigation Bar"},"content":{"rendered":"<p>Some time we need to rearrange left navigation item of left navigation bar, we can do this easily using JS \u201cinsertBefore()\u201d function. Just we need to get element id of the left navigation items. We can use IE dev toolbar to do this; also if you are using IE 8 then IE dev toolbar will not work, as Microsoft has provided inbuilt developer tools in IE 8 (Tools-&gt;Developer Tools).<\/p>\n<p>For e.g if we want to insert \u00a0\u201cRelationships\u201d navigation item before \u201cContact\u201d navigation item in Details navigation bar in account form.<\/p>\n<p>\u00a0<a href=\"http:\/\/mahenderpal.files.wordpress.com\/2010\/04\/rearrange.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-158\" title=\"Rearrange\" src=\"http:\/\/mahenderpal.files.wordpress.com\/2010\/04\/rearrange.jpg\" alt=\"\" width=\"177\" height=\"180\" \/><\/a><\/p>\n<p>Just paste this code on onload event of Account form<\/p>\n<p>var _ContactsNavItem = document.getElementById(&#8220;navContacts&#8221;).parentNode;<\/p>\n<p>var _RelationshipNavItem = document.getElementById(&#8220;navRelationships&#8221;).parentNode;<\/p>\n<p>_RelationshipNavItem.insertBefore(_ContactsNavItem);<\/p>\n<p>And you will get result like below<\/p>\n<p>\u00a0<a href=\"http:\/\/mahenderpal.files.wordpress.com\/2010\/04\/newararange.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-160\" title=\"NewArarange\" src=\"http:\/\/mahenderpal.files.wordpress.com\/2010\/04\/newararange.jpg\" alt=\"\" width=\"177\" height=\"181\" \/><\/a><\/p>\n<p>Hope it will help somebody !!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some time we need to rearrange left navigation item of left navigation bar, we can do this easily using JS \u201cinsertBefore()\u201d function. Just we need to get element id of the left navigation items. We can use IE dev toolbar to do this; also if you are using IE 8 then IE dev toolbar will not work, as Microsoft has&#8230; <a href=\"https:\/\/himbap.com\/blog\/?p=157\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10,26],"tags":[],"_links":{"self":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/157"}],"collection":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=157"}],"version-history":[{"count":0,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/157\/revisions"}],"wp:attachment":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}