/// <summary>
    /// Returns Correct URL of the path selection dialog.
    /// </summary>
    private string GetSelectionDialogUrl()
    {
        string url = CMSDialogHelper.GetDialogUrl(Config, IsLiveSite, false, null, false);

        url = URLHelper.RemoveParameterFromUrl(url, "hash");

        // Set single path mode
        if (SinglePathMode)
        {
            url = URLHelper.AddParameterToUrl(url, "selectionmode", "single");
        }

        // Recreate correct hash string to secure input
        string query = CMSDialogHelper.EncodeQueryString(URLHelper.GetQuery(url));

        url = URLHelper.AddParameterToUrl(url, "hash", QueryHelper.GetHash(query));

        return(url);
    }