public MetaTitle GetHeader(IPublishedContent node = null)
        {
            var page = node == null?_contentHelper.CurrentPage <MetaTagHeader>() : node.As <MetaTagHeader>();

            var model = new MetaTitle
            {
                Title = !string.IsNullOrEmpty(page.MetaTitle) ?
                        page.MetaTitle : _pageService.Title,
                Description = !string.IsNullOrEmpty(page.MetaDescription) ?
                              page.MetaDescription : _pageService.Summary
            };

            return(model);
        }
Example #2
0
        public MetaData(IPublishedContent content)
        {
            MetaTitle = content.HasValue(Constants.SkyConstants.Properties.SeoTitle) && !string.IsNullOrEmpty(content.GetPropertyValue <string>(Constants.SkyConstants.Properties.SeoTitle))
                                ? content.GetPropertyValue <string>(Constants.SkyConstants.Properties.SeoTitle)
                                : (content.HasValue(Constants.SkyConstants.Properties.Title) && !string.IsNullOrEmpty(content.GetPropertyValue <string>(Constants.SkyConstants.Properties.Title))
                                        ? content.GetPropertyValue <string>("title") : content.Name);

            MetaTitle = MetaTitle.Replace("*", "") + " - " + SkyContext.Current.Site.Content.GetPropertyValue <string>(Constants.SkyConstants.Properties.SiteName);

            MetaDescription = content.HasValue(Constants.SkyConstants.Properties.SeoMetaDescription) && !string.IsNullOrEmpty(content.GetPropertyValue <string>(Constants.SkyConstants.Properties.SeoMetaDescription))
                                ? content.GetPropertyValue <string>(Constants.SkyConstants.Properties.SeoMetaDescription)
                                : (content.HasValue(Constants.SkyConstants.Properties.Teaser) && !string.IsNullOrEmpty(content.GetPropertyValue <string>(Constants.SkyConstants.Properties.Teaser))
                                        ? content.GetPropertyValue <string>(Constants.SkyConstants.Properties.Teaser) : "");

            HideFromSearch = content.HasProperty(Constants.SkyConstants.Properties.HideFromSearch) && content.GetPropertyValue <bool>(Constants.SkyConstants.Properties.HideFromSearch);
        }
Example #3
0
        public SkyMaster(IPublishedContent content)
        {
            Content   = content;
            MetaTitle = content.HasValue("seoTitle") && !string.IsNullOrEmpty(content.GetPropertyValue <string>("seoTitle"))
                ? content.GetPropertyValue <string>("seoTitle")
                : (content.HasValue("title") && !string.IsNullOrEmpty(content.GetPropertyValue <string>("title"))
                    ? content.GetPropertyValue <string>("title")
                    : content.Name);

            MetaTitle       = MetaTitle.Replace("*", "");
            MetaDescription = content.HasValue("seoMetaDescription") && !string.IsNullOrEmpty(content.GetPropertyValue <string>("seoMetaDescription"))
             ? content.GetPropertyValue <string>("seoMetaDescription")
             : (content.HasValue("teaser") && !string.IsNullOrEmpty(content.GetPropertyValue <string>("teaser"))
                ? content.GetPropertyValue <string>("teaser")
                : "");

            HideFromNavigation = content.GetPropertyValue <bool>("umbracoNaviHide");
            HideFromSearch     = content.HasProperty("hideFromSearch") && content.GetPropertyValue <bool>("hideFromSearch");
        }
 protected override ChurchInfo Parse()
 {
     return(new ChurchInfo
     {
         SimbahanID = ToInt(SimbahanID),
         StreetNo = ToInt(StreetNo),
         StreetName = StreetName.ToString(),
         Barangay = Barangay.ToString(),
         StateProvince = StateOrProvince.ToString(),
         City = City.ToString(),
         ZipCode = ZipCode.ToString(),
         CompleteAddress = CompleteAddress.ToString(),
         Diocese = Diocese.ToString(),
         Parish = Parish.ToString(),
         Priest = ParishPriest.ToString(),
         Vicariate = Vicariate.ToString(),
         DateEstablished = DateEstablished.ToString(),
         LastUpdate = ToDateTime(LastUpdate),
         FeastDay = FeastDay.ToString(),
         ContactNo = ContactNo.ToString(),
         Latitude = ToDouble(Latitude),
         Longitude = ToDouble(Longitude),
         HasAdorationChapel = ToBoolean(HasAdorationChapel),
         ChurchHistory = ChurchHistory.ToString(),
         OfficeHours = OfficeHours.ToString(),
         ChurchTypeID = ToInt(ChurchTypeID),
         Website = Website.ToString(),
         EmailAddress = EmailAddress.ToString(),
         DevotionSchedule = DevotionSchedule.ToString(),
         LocationID = ToInt(LocationID),
         ChurchCode = ChurchCode.ToString(),
         MaskData = MaskingData.ToString(),
         MetaTitle = MetaTitle.ToString(),
         MetaDescription = MetaDescription.ToString()
     });
 }