Universal WebTech
  • Home
  • About US
    • Our Team
    • Privacy Policy
    • Our Clients
    • Terms of use
  • Service
    • Web Development
    • E-Commerce
    • Android Development
    • UI UX Design
  • Our Portfolio
  • Career
  • Blogs
contact
hamburger

Add top links in magento

Magento is an ecommerce platform built on open source technology and which use MVC system. It is managing all request response using Model, View and Controller. So, all view file call base on controller mapping as per there configuration in layout/*.xml file.

Layout file is use to define phtml file on specific module request. Let’s say if we want to add top link in magento at that time we need to use below code.

Add custom link to top link in magento


<block type="page/template_links" name="top.links" as="topLinks">
<action method="addLink" translate="label title">
<label>Blog</label>
<url>/blog</url>
<title>Blog</title>
<prepare></prepare>
<urlparams></urlparams>
<position>1</position>
</action>
</block>

If you want to open same URL in new tab at that time you can use below code.


<block type="page/template_links" name="top.links" as="topLinks">
<action method="addLink" translate="label title">
<label>Blog</label>
<url>/blog</url>
<title>Blog</title>
<prepare></prepare>
<urlparams></urlparams>
<position>1</position>
<liparams></liparams>
<aparams><!--[CDATA[target="_blank"]]--></aparams>
</action>
</block>

Universal WebTech

Universal WebTech IT Solutions is a leading web and mobile development company in Ahmedabad, India that believes in winning trust of its clients through 100% quality service and time-oriented work.

Company

  • About us
  • Careers
  • FAQs
  • Testimonials
  • Blogs
  • Our team

Service

  • Web Development
  • Android Application Development
  • eCommerce Web Development
  • Open Source Customization
  • UI / UX / Logo Design Services

Copyright © 2025 Universal WebTech

  • Terms of use
  • Privacy Policy