{"id":168,"date":"2011-12-06T01:00:23","date_gmt":"2011-12-06T07:00:23","guid":{"rendered":"http:\/\/www.evermoretechnologies.com\/blog\/?p=168"},"modified":"2011-12-06T01:00:23","modified_gmt":"2011-12-06T07:00:23","slug":"adding-a-link-to-top-links-in-magento","status":"publish","type":"post","link":"https:\/\/www.evermoretechnologies.com\/blog\/2011\/12\/adding-a-link-to-top-links-in-magento\/","title":{"rendered":"Adding a link to top.links in magento."},"content":{"rendered":"<p>I often need to add cms pages to the top links section of magento&#8217;s cms.<\/p>\n<p>The best way I&#8217;ve found to do this is in the page.xml document for your theme. \u00a0Where it says:<\/p>\n<p>[code language=&#8221;xml&#8221;]<br \/>\n    &lt;block type=&quot;page\/template_links&quot; name=&quot;top.links&quot; as=&quot;topLinks&quot;\/&gt;<br \/>\n[\/code]<\/p>\n<p>Simply change it to:<\/p>\n<p>[code language=&#8221;xml&#8221;]<br \/>\n    &lt;block type=&quot;page\/template_links&quot; name=&quot;top.links&quot; as=&quot;topLinks&quot;&gt;<br \/>\n        &lt;action method=&quot;addLink&quot; translate=&quot;label title&quot;&gt;&lt;label&gt;Home&lt;\/label&gt;&lt;url&gt;\/&lt;\/url&gt;&lt;title&gt;Home&lt;\/title&gt;&lt;prepare\/&gt;&lt;urlParams\/&gt;&lt;position&gt;1&lt;\/position&gt;&lt;\/action&gt;<br \/>\n        &lt;action method=&quot;addLink&quot; translate=&quot;label title&quot;&gt;&lt;label&gt;Contact&lt;\/label&gt;&lt;url&gt;\/contact-us&lt;\/url&gt;&lt;title&gt;Contact&lt;\/title&gt;&lt;prepare\/&gt;&lt;urlParams\/&gt;&lt;position&gt;1000&lt;\/position&gt;&lt;\/action&gt;<br \/>\n    &lt;\/block&gt;<br \/>\n[\/code]<\/p>\n<p>The actions can be as many or few as you need for your theme.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I often need to add cms pages to the top links section of magento&#8217;s cms. The best way I&#8217;ve found to do this is in the page.xml document for your&#8230; <a href=\"https:\/\/www.evermoretechnologies.com\/blog\/2011\/12\/adding-a-link-to-top-links-in-magento\/\">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":[29,22,7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/168"}],"collection":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=168"}],"version-history":[{"count":0,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/168\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}