Error executing template "Designs/identity_v2/ecom/productlist/partials/navigation.cshtml" System.NullReferenceException: Object reference not set to an instance of an object. at CompiledRazorTemplates.Dynamic.RazorEngine_db2d80569ca640ac8e027e7435665751.Execute() in D:\dynamicweb.net\Solutions\staging-id.espresso4.dk-e5\Files\Templates\Designs\identity_v2\ecom\productlist\partials\navigation.cshtml:line 70 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 ViewModelTemplate< ModuleModel > 2 @using Co3.Espresso.Website.Models.FrontEnd.Paragraphs 3 @using Co3.Espresso.Website.Services 4 @using Dynamicweb.Frontend 5 @using Dynamicweb.Rendering 6 @using Dynamicweb.Rendering.Translation 7 8 @if ( Model.Item.NavigationShow == "True" ) 9 { 10 int currentPageParentId = PageView.Current().Page.ParentPageId; 11 string navigationParentId = string.IsNullOrEmpty( Model.Item.NavigationParentPage ) == false ? Model.Item.NavigationParentPage : Model.Page.ID; 12 string navigationBackLinkHref = string.Empty; 13 string navigationBackLinkText = string.Empty; 14 if ( Model.Item.NavigationBackLinkShow == "True" ) 15 { 16 if ( !string.IsNullOrEmpty( Model.Item.NavigationBackLinkHref ) ) 17 { 18 navigationBackLinkHref = Model.Item.NavigationBackLinkHref; 19 } 20 else 21 { 22 navigationBackLinkHref = string.Format( "/Default.aspx?ID={0}", currentPageParentId != 0 ? currentPageParentId.ToString() : navigationParentId ); 23 } 24 if ( !string.IsNullOrEmpty( Model.Item.NavigationBackLinkText ) ) 25 { 26 navigationBackLinkText = Model.Item.NavigationBackLinkText; 27 } 28 else 29 { 30 string navigationBackLinkPageIdAsString = navigationBackLinkHref.Split( new string[] {"ID="}, StringSplitOptions.None ).LastOrDefault(); 31 int navigationBackLinkPageIdAsInt; 32 if ( int.TryParse( navigationBackLinkPageIdAsString, out navigationBackLinkPageIdAsInt ) ) 33 { 34 navigationBackLinkText = PageService.Instance.GetPage( navigationBackLinkPageIdAsInt )?.MenuText; 35 } 36 if ( string.IsNullOrEmpty( navigationBackLinkText ) ) 37 { 38 navigationBackLinkText = Translate( "Navigation - Back link - Text", "Back" ); 39 } 40 } 41 } 42 43 <div class="e-productlist-filters-group js-e-productlist-filters-group d-none d-lg-block border-bottom-0"> 44 <p class="e-productlist-filters-group-header small mb-0 py-1" style="margin-top: .425em;"> 45 @if ( Model.Item.NavigationBackLinkShow == "True" ) 46 { 47 <a class="arrow-left e-nav-local-back-link pt-2 small" href="@navigationBackLinkHref"> 48 <span class="e-nav-pagename">@navigationBackLinkText</span> 49 </a> 50 } 51 52 <span class="e-productlist-filters-group-name h3 m-0"> 53 @Model.Item.NavigationHeading 54 </span> 55 </p> 56 <fieldset id="e-productlist-filters-group-navigation" class="e-productlist-filters-group-options small mt-1"> 57 <div class="e-nav-local e-nav-local-vertical mb-2"> 58 <nav class="e-nav-local-container"> 59 <ul class="nav flex-column"> 60 @RenderNavigation( new {id = "dwnav-local-" + Model.Id, parentid = navigationParentId, template = "local-vertical.xslt", startlevel = Model.Item.NavigationLevelStart, endlevel = Model.Item.NavigationLevelEnd, expandmode = "path"} ) 61 </ul> 62 </nav> 63 </div> 64 </fieldset> 65 </div> 66 67 } 68 69 70 @if ( (bool)PageView.Current().Area.Item["BrandMenuShow"] == true ) 71 { 72 string secondaryParentPageId = PageView.Current().Area.Item["BrandMenuParentPage"].ToString(); 73 74 <div class="e-productlist-filters-group js-e-productlist-filters-group d-none d-lg-block"> 75 <p class="e-productlist-filters-group-header small mb-0 py-1" style="margin-top: .425em;"> 76 <span class="e-productlist-filters-group-name h3 m-0"> 77 @((string)PageView.Current().Area.Item["BrandMenuHeading"]) 78 </span> 79 </p> 80 <fieldset id="e-productlist-filters-group-navigation" class="e-productlist-filters-group-options small mt-1"> 81 <div class="e-nav-local e-nav-local-vertical mb-2"> 82 <nav class="e-nav-local-container"> 83 <ul class="nav flex-column"> 84 @RenderNavigation( new {id = "dwnav-local-" + Model.Id + "2", parentid = secondaryParentPageId, template = "local-vertical.xslt", startlevel = 1, endlevel = 2, expandmode = "path"} ) 85 </ul> 86 </nav> 87 </div> 88 </fieldset> 89 </div> 90 91 } 92
0 Produkty
Potrzebujesz pomocy w znakowaniu odzieży?
Odzież korporacyjna z logo firmy pomaga jeszcze skuteczniej wzmacniać wizerunek marki na rynku. Pomożemy w wykonaniu nadruku.
Zobacz więcejNo. 0312 T-shirt PRO Wear | damski
No. 0312 T-shirt PRO Wear | damski
zł 67,50 ( bez VAT )
+ 13 kolory
{"item_name":"T-shirt PRO Wear | damski","item_id":"PROD837","price":"67.50","item_brand":"PW","item_category":"T-shirty","item_variant":"Dusty pink"}
No. 0311 T-shirt PRO Wear | z długim rękawem
No. 0311 T-shirt PRO Wear | z długim rękawem
zł 87,50 ( bez VAT )
+ 6 kolory
{"item_name":"T-shirt PRO Wear | z długim rękawem","item_id":"PROD836","price":"87.50","item_brand":"PW","item_category":"T-shirty","item_variant":"Grey melange"}
No. 0310 T-shirt PRO Wear | light
No. 0310 T-shirt PRO Wear | light
zł 62,00 ( bez VAT )
+ 10 kolory
{"item_name":"T-shirt PRO Wear | light","item_id":"PROD835","price":"62.00","item_brand":"PW","item_category":"T-shirty","item_variant":"Dusty aqua"}
No. 0302 T-shirt PRO Wear | kontrast
No. 0302 T-shirt PRO Wear | kontrast
zł 81,00 ( bez VAT )
+ 5 kolory
{"item_name":"T-shirt PRO Wear | kontrast","item_id":"PROD834","price":"81.00","item_brand":"PW","item_category":"T-shirty","item_variant":"White"}
{"item_name":"T-shirt PRO Wear","item_id":"PROD833","price":"67.50","item_brand":"PW","item_category":"T-shirty","item_variant":"Silver grey"}
{"item_name":"Koszula robocza | poliester / bawełna","item_id":"PROD812","price":"0.00","item_brand":"ID","item_category":"Koszule","item_variant":"Navy"}
{"item_name":"Koszula robocza | bawełna","item_id":"PROD811","price":"0.00","item_brand":"ID","item_category":"Koszule","item_variant":"Navy"}
{"item_name":"Czapka | stretch","item_id":"PROD793","price":"40.00","item_brand":"ID","item_category":"Akcesoria","item_variant":"Black"}
{"item_name":"Komin | stretch","item_id":"PROD794","price":"36.00","item_brand":"ID","item_category":"Akcesoria","item_variant":"Black"}
{"item_name":"Ręcznik kąpielowy 70x140","item_id":"PROD789","price":"92.50","item_brand":"ID","item_category":"Akcesoria","item_variant":"Navy"}
Potrzebujesz pomocy w znakowaniu odzieży?
Odzież korporacyjna z logo firmy pomaga jeszcze skuteczniej wzmacniać wizerunek marki na rynku. Pomożemy w wykonaniu nadruku.
Zobacz więcej