locked
Relatives url in sitemap RRS feed

  • Question

  • Hi,

    I'm using CRM4 and i have some custom pages added in the sitemap. My problem is that i have to add the entire url to make CRM works, so when i want to install to another environment, i need to change the server name. I try to set the page name with a relative url, but in that case it doesn't work.

    Does anyone know a way to do this?

    Thanks
    Monday, January 19, 2009 11:39 AM

Answers

  • I suggest creating a loader page that receives the target url as parameters and appends the orgname from the parent frame.

     

    In the Sitemap add a reference to a page called loader.html e.g. “/isv/loader.html?target=/isv/target.aspx”;

     

    In the loader onload event add the following code.

     

    Code Snippet

     

    function OnLoaderLoad()
    {

          var targeturl = location.search.split(‘=’)[1];
          var url = location.protocol + “//” + location.host + “/” + top.ORG_UNIQUE_NAME + targeturl;

          location.href = url;
    }

     

     

    Adi

     

    Monday, January 19, 2009 7:32 PM

All replies

  • Relative URLs can be map to work, but CRM will insert the Organisation Name in the URL, so you have to make your URLs work with this

     

    Monday, January 19, 2009 11:45 AM
    Moderator
  • I suggest creating a loader page that receives the target url as parameters and appends the orgname from the parent frame.

     

    In the Sitemap add a reference to a page called loader.html e.g. “/isv/loader.html?target=/isv/target.aspx”;

     

    In the loader onload event add the following code.

     

    Code Snippet

     

    function OnLoaderLoad()
    {

          var targeturl = location.search.split(‘=’)[1];
          var url = location.protocol + “//” + location.host + “/” + top.ORG_UNIQUE_NAME + targeturl;

          location.href = url;
    }

     

     

    Adi

     

    Monday, January 19, 2009 7:32 PM