Пример #1
0
    private bool TryGetUrl(out string url)
    {
        try
        {
            var queryStringParameters = GetQueryStringParameters();
            url = PageBuilderHelper.GetPreviewLink(Node, MembershipContext.AuthenticatedUser.UserName, queryStringParameters);
        }
        catch (InvalidOperationException ex)
        {
            LogAndShowError("PageEdit", "PreviewLinkGeneration", ex);
            url = null;
            return(false);
        }

        if (url == null)
        {
            url = URLHelper.ResolveUrl(AdministrationUrlHelper.GetInformationUrl("document.nopreviewavailable"));
            return(false);
        }

        if (DocumentManager.AllowSave)
        {
            url = PageBuilderHelper.AddEditModeParameter(url);
        }

        if (dataPropagated)
        {
            url = PageBuilderHelper.AddClearPageCacheParameter(url);
        }

        return(true);
    }
Пример #2
0
    private bool TryGetUrl(out string url)
    {
        try
        {
            var queryStringParameters = GetQueryStringParameters();
            url = PageBuilderHelper.GetPreviewModeUrl(Node, MembershipContext.AuthenticatedUser.UserGUID, queryStringParameters);
        }
        catch (InvalidOperationException ex)
        {
            LogAndShowError("PageEdit", "PreviewLinkGeneration", ex);
            url = null;
            return(false);
        }

        if (url == null)
        {
            url = DocumentUIHelper.GetPageNotAvailableUrl();
            return(false);
        }

        if (DocumentManager.AllowSave)
        {
            url = PageBuilderHelper.AddEditModeParameter(url);
        }

        if (dataPropagated)
        {
            url = PageBuilderHelper.AddClearPageCacheParameter(url);
        }

        return(true);
    }
Пример #3
0
    private bool TryGetUrl(out string url)
    {
        url = PageBuilderHelper.GetPreviewLink(Node, MembershipContext.AuthenticatedUser.UserName);
        if (url == null)
        {
            url = URLHelper.ResolveUrl(AdministrationUrlHelper.GetInformationUrl("document.nopreviewavailable"));
            return(false);
        }

        if (DocumentManager.AllowSave)
        {
            url = PageBuilderHelper.AddEditModeParameter(url);
        }

        if (dataPropagated)
        {
            url = PageBuilderHelper.AddClearPageCacheParameter(url);
        }

        return(true);
    }