More in this section

Forums / Developing with Sitefinity / Insert Link Relative Path

Insert Link Relative Path

2 posts, 1 answered
  1. mcpdinkansas
    mcpdinkansas avatar
    102 posts
    Registered:
    22 Mar 2007
    30 Jun 2010
    Link to this post
    When editing a link in Generic Content Control, if link's current href is relative, Insert Link pop-up automatically adds the Sitefinity admin url to the front.

    Original Link Url:              href="Page.aspx"
    Insert Link Override:        href="http://somesite.com/Sitefinity/Admin/Page.aspx"

    How can I turn this feature off? This happens in all browsers.

    Thanks
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    01 Jul 2010
    Link to this post
    Hi mcpdinkansas,

    Most probably you are using Sitefinity's Insert link that is supposed to work only with dynamic data.

    You could modify the js inside initDialog method defined in Sitefinity\Admin\ControlTemplates\Pages\Dialogs\LinksEditorDialog.ascx

    function initDialog() //called when the dialog is initialized
    {
        var clientParameters = getRadWindow().ClientParameters; //return the arguments supplied from the parent page
       
     
       if (clientParameters.nodeName && typeof(clientParameters.nodeName) != "undefined" && clientParameters.nodeName == "A")
       {
           currentElement = clientParameters;
       
     
               ....
                      ....
     
           else if (currentElement.href != "") {
           var replaced = currentElement.href.replace("/sitefinity/admin/", "/");
           urlTxt.value = replaced;

    or return an empty string, because this is not a dynamic link.


    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
2 posts, 1 answered