@using System.Reflection @using Dynamicweb.Rapido.Blocks.Components @using Dynamicweb.Rapido.Blocks.Components.Articles @using Dynamicweb.Rapido.Blocks @using Dynamicweb.Rapido.Blocks.Components.General @using Dynamicweb.Frontend @using Dynamicweb.Core @using Dynamicweb.Core.Helpers @using System.Linq @using Dynamicweb.Content @using Dynamicweb.Security.UserManagement @using Dynamicweb.Rapido.Blocks.Extensibility @helper RenderSchemaMarkup() { @*SCHEMA MARKUP FOR NEWS ARTICLES*@ var testhest = PageView.Current().Page.ID; if (testhest != 10) { var image = Model.Item.GetFile("Image"); string fullBackgroundImage = image != null ? "background-image:url(/Admin/Public/GetImage.ashx?width=2500&height=1100&crop=0&Compression=85&DoNotUpscale=true&image=" + image.PathUrlEncoded + "); background-position: center center; background-size: cover; " : ""; string image1x1 = image != null ? Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host + "/Admin/Public/GetImage.ashx?width=1920&height=1920&crop=5&Compression=85&DoNotUpscale=true&image=" + image.Path : ""; string image4x3 = image != null ? Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host + "/Admin/Public/GetImage.ashx?width=1920&height=1440&crop=5&Compression=85&DoNotUpscale=true&image=" + image.Path : ""; string image16x9 = image != null ? Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host + "/Admin/Public/GetImage.ashx?width=1920&height=1080&crop=5&Compression=85&DoNotUpscale=true&image=" + image.Path : ""; string eventName = Model.Item.GetString("Title"); DateTime startDate = Model.Item.GetDateTime("Date"); var endDateVar = new Dynamicweb.Forms.Field(); DateTime endDate = endDateVar.UpdatedDate; var eventLocation = Model.Item.GetItem("Location"); string eventStreetAddress = ""; string eventAddressLocality = ""; string eventAddressRegion = ""; string eventPostalCode = ""; string eventAddressCountry = ""; string eventLocationName = ""; string siteURL = Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host; string siteCanonical = Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host; string businessName = Model.Area.Item.GetItem("Settings").GetString("BusinessName"); string businessPhotoPath = Model.Area.Item.GetItem("Settings").GetFile("BusinessPhoto") != null ? Model.Area.Item.GetItem("Settings").GetFile("BusinessPhoto").Path : ""; string author = Model.Item.GetString("Author"); string summary = Model.Item.GetString("Summary"); if (eventLocation != null) { eventStreetAddress = eventLocation.GetString("StreetAddress"); eventAddressLocality = eventLocation.GetString("City"); eventAddressRegion = eventLocation.GetString("Region"); eventPostalCode = eventLocation.GetString("PostalCode"); eventAddressCountry = eventLocation.GetString("Country"); eventLocationName = eventLocation.GetString("Name"); } } else { } }