Esempio n. 1
0
 public PageInput(Page page, PageInput input)
 {
     TemplateName = input != null && !string.IsNullOrEmpty(input.TemplateName) ? input.TemplateName : page.TemplateName;
     Title        = input != null && !string.IsNullOrEmpty(input.Title) ? input.Title : page.Title;
     Description  = input != null && !string.IsNullOrEmpty(input.Description) ? input.Description : page.Description;
     Slug         = input != null && !string.IsNullOrEmpty(input.Slug) ? input.Slug : page.Slug;
     Published    = input != null && input.Published.HasValue ? input.Published : page.Published;
 }
Esempio n. 2
0
        public PluginPageInput(PageInput pageInput)
        {
            originalInput = pageInput;

            TemplateName = pageInput.TemplateName;
            Title        = pageInput.Title;
            Description  = pageInput.Description;
            Slug         = pageInput.Slug;
            Published    = pageInput.Published.HasValue && pageInput.Published.Value <= DateTime.Now;
            if (Published)
            {
                PublishedDate = pageInput.Published.Value;
            }
        }