Error executing template "Designs/ProNails_generated/Paragraph/FooterWidgetLogo.cshtml" System.NullReferenceException: Object reference not set to an instance of an object. at CompiledRazorTemplates.Dynamic.RazorEngine_dcbd79ed562b4ea9aa9d9d50c1714233.Execute() in D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\FooterWidgetLogo.cshtml:line 35 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 3 @using System.Web; 4 @using Dynamicweb; 5 6 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 7 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend; 8 9 10 @{ 11 12 var paragraphID = Model.ItemId; 13 FooterWidgetLogo _data = Dynamicweb.Services.Items.GetItem("FooterWidgetLogo", paragraphID).ToCodeFirstItem<FooterWidgetLogo>(); 14 15 BaseSettingsObj BaseSettings = (BaseSettingsObj)HttpContext.Current.Session["BaseSettings"]; 16 17 string LogoDesktopImage = (!string.IsNullOrWhiteSpace(_data.LogoDesktopImage.ToString())) ? _data.LogoDesktopImage.ToString() : ""; 18 19 /*** Desktop logo Settings ***/ 20 string footer_logo__top = _data.LogoTop.ToString(); 21 footer_logo__top = !string.IsNullOrWhiteSpace(footer_logo__top) ? footer_logo__top + "px" : "auto"; 22 23 string footer_logo__left = _data.LogoLeft.ToString(); 24 footer_logo__left = !string.IsNullOrWhiteSpace(footer_logo__left) ? footer_logo__left + "px" : "auto"; 25 26 string footer_logo__width = _data.LogoWidth.ToString(); 27 footer_logo__width = !string.IsNullOrWhiteSpace(footer_logo__width) && footer_logo__width != "0" ? footer_logo__width + "px" : "auto"; 28 29 string footer_logo__container_width = _data.LogoContainerWidth.ToString(); 30 footer_logo__container_width = !string.IsNullOrWhiteSpace(footer_logo__container_width) && footer_logo__container_width != "0" ? footer_logo__container_width + "px" : "auto"; 31 32 string footer_logo__height = _data.LogoHeight.ToString(); 33 footer_logo__height = !string.IsNullOrWhiteSpace(footer_logo__height) && footer_logo__height != "0" ? footer_logo__height + "px" : "auto"; 34 35 string footer_desktop__logo = _data.LogoDesktopImage.ToString(); 36 37 } 38 39 <figure class="Footer__logo Footer__logo--@paragraphID @_data.CssClass"> 40 <a href="@BaseSettings.System.HomepageLink" aria-label="Logo"> 41 <img src="@footer_desktop__logo" alt="" /> 42 </a> 43 </figure> 44 45 <style> 46 47 .Footer__logo { 48 top: var(--Top); 49 left: var(--Left); 50 } 51 52 .Footer__logo, 53 .Footer__logo img { 54 width: var(--Width); 55 height: var(--Height); 56 } 57 58 .Footer__logo--@paragraphID { 59 --Top: @footer_logo__top; 60 --Left: @footer_logo__left; 61 --Width: @footer_logo__container_width; 62 } 63 64 .Footer__logo--@paragraphID { 65 --Height: 100%; 66 --Width: @footer_logo__width; 67 } 68 69 .Footer__logo--@paragraphID img { 70 --Height: @footer_logo__height; 71 --Width: @footer_logo__width; 72 } 73 74 </style> 75
Error executing template "Designs/ProNails_generated/Paragraph/FooterWidgetDescription.cshtml" System.NullReferenceException: Object reference not set to an instance of an object. at CompiledRazorTemplates.Dynamic.RazorEngine_fcbc34af63cd430bb866e0049262218c.Execute() in D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\FooterWidgetDescription.cshtml:line 16 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 3 @using System.Web; 4 @using Dynamicweb; 5 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 6 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend; 7 8 9 @{ 10 string paragraphID = Model.ItemId; 11 FooterWidgetDescription _data = Dynamicweb.Services.Items.GetItem("FooterWidgetDescription", paragraphID).ToCodeFirstItem<FooterWidgetDescription>(); 12 13 BaseSettingsObj BaseSettings = (BaseSettingsObj)HttpContext.Current.Session["BaseSettings"]; 14 } 15 16 @if (!string.IsNullOrWhiteSpace(BaseSettings.CorporateSettings.FooterDescription)) 17 { 18 <div class="footer__description footer__description--@paragraphID @_data.CssClass"> 19 @BaseSettings.CorporateSettings.FooterDescription 20 </div> 21 } 22