Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7838105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:58:48+00:00 2026-06-02T14:58:48+00:00

I’ve created a menu in page.xml and it looks like this: <reference name=primary.menu> <action

  • 0

I’ve created a menu in page.xml and it looks like this:

<reference name="primary.menu">
<action method="addLink" translate="label title">
<label>Test</label>
<url>test.html</url>
<title>Test</title>
<prepare>1</prepare>
<urlParams/>
<position>10</position>
<liParams>dark-gray</liParams>
<aParams></aParams>
<beforeText></beforeText>
<afterText></afterText>
</action>
...................

The class used for the primary.menu block is extending the Mage_Page_Block_Template_Links class from Magento’s core.

The problem is, that when I click this link it goes to ‘www.mydomain.com/test.html/’ which is not working. My question is what should I do in order to stop the last ‘/’ from showing in the url?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T14:58:49+00:00Added an answer on June 2, 2026 at 2:58 pm

    I think that <prepare>1</prepare> is building your URL query (in the absence of a dedicated helper to supply the URL) and as a result is prefixing your URL with the domain (which is what you want), but it is also appending a trailing slash (which is what you don’t want)

    1. Either create a helper to supply the "proper" URL.
    2. If the page is a Magento CMS page, use that helper (preferred)
    3. Use <prepare/> and <url>/test.html</url> (hack alert!)

    To use a Magento CMS helper to add a link

    <action method="addLink" translate="label title before_text" module="cms">
      <label>Test</label>
      <url helper="cms/page/getPageUrl">
        <page_id>1</page_id>
      </url>
      <title>Test</title>
      <prepare/>
      <urlParams/>
      <position>10</position>
      <li/>
      <a/>
      <before_text/>
      <after_text/>
    </action>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an XML Sitemap like this <?xml version=1.0 encoding=utf-8 ?> <Menu> <MenuItem Name=Page
In some page, my side menu is created dynamically like this. <div id=tree class=treeview>
i created a custom menu called top-navigation. Now I'd like to style it with
I created a custom menu called sub-top-nav and now I'd like to override the
I recently created a menu for a web page where buttons are DIV elements.
I have created user control for menu bar and loading in Master page. User
Hello i have created menu using ULs, LIs and CSS styles. On my page
I created a menu which changes as per the role logged in. So, this
I have created drop down menu, but it is not showing in home page
I have created an asp.net MVC application.I created a asp:menu in the master page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.