Exemplo n.º 1
0
        public PageItemView(PageItem page)
        {
            Require.NotNull(page, "page");

            Id = page.Id;
            DisplayName = page.DisplayName;
            UrlSegment = page.UrlSegment;
            Layout = page.Layout.DisplayName.Localize();
            LayoutPreviewImage = page.Layout.PreviewImageVirtualPath;
            AspxVirtualPath = page.Layout.AspxVirtualPath;
            PagePath = page.GetPagePath();
            IsDeletable = page.IsDeletable;
            Skin = String.Empty;
            SkinPreviewImage = String.Empty;

            if (page.Skin != null)
            {
                Skin = page.Skin.DisplayName.Localize();
                SkinPreviewImage = page.Skin.PreviewImageVirtualPath;
            }

            CreatedTime = page.CreatedTime.ToString(CultureInfo.CurrentCulture);
            LastModifiedTime = page.ModifiedTime.ToString(CultureInfo.CurrentCulture);
        }
Exemplo n.º 2
0
        public static string GetPageUrl(string targetCulture, PageItem page)
        {
            Require.NotNull(page, "page");

            return GetFullUrl(targetCulture, page.GetPagePath());
        }