Ladda ner bilder

Error executing template "Designs/Swift/Paragraph/Swift_ProductListGroupImage.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_7e9282e7c7234fcfa840a334b5885508.ExecuteAsync()
   at RazorEngine.Templating.TemplateBase.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.DynamicWrapperService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass23_0.<Run>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag)
   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 @using Dynamicweb.Frontend.Navigation 3 @using Dynamicweb.Ecommerce.ProductCatalog 4 @using Dynamicweb.Environment 5 @using Dynamicweb.Frontend 6 7 @{ 8 ProductListViewModel productList = null; 9 if (Dynamicweb.Context.Current.Items.Contains("ProductList")) 10 { 11 productList = (ProductListViewModel)Dynamicweb.Context.Current.Items["ProductList"]; 12 } 13 else if (Pageview.Page.Item["DummyProductGroup"] != null && Pageview.IsVisualEditorMode) 14 { 15 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 16 ProductListViewModel groupList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 17 18 if (groupList?.Products is object) 19 { 20 productList = groupList; 21 } 22 } 23 } 24 25 @if (productList is object) { 26 string groupImage = productList?.Group?.Assets != null ? productList.Group.Assets.FirstOrDefault(x => x.Name == "LargeImage").Value : string.Empty; 27 if (groupImage.StartsWith("/") && !groupImage.StartsWith("/Files", StringComparison.OrdinalIgnoreCase)) 28 { 29 groupImage = $"/Files{groupImage}"; 30 } 31 32 string groupName = productList?.Group?.Name != null ? productList.Group.Name : string.Empty; 33 34 string ratio = Model.Item.GetRawValueString("ImageAspectRatio", string.Empty); 35 ratio = ratio != "0" ? ratio : string.Empty; 36 string ratioCssClass = ratio != string.Empty && ratio != "fill" ? " ratio" : string.Empty; 37 string ratioVariable = ratio != string.Empty ? "style=\"--bs-aspect-ratio: " + ratio + "\"" : string.Empty; 38 string fillClass = ratio == "fill" ? " h-100" : ""; 39 40 var parms = new Dictionary<string, object>(); 41 parms.Add("loading", "lazy"); 42 parms.Add("columns", Model.GridRowColumnCount); 43 44 if (ratio == "fill") { 45 parms.Add("cssClass", "w-100 h-100"); 46 } 47 else 48 { 49 parms.Add("cssClass", "mw-100 mh-100"); 50 } 51 52 parms.Add("style", string.Empty); 53 parms.Add("alt", groupName); 54 55 if (!string.IsNullOrEmpty(groupImage)) { 56 <div class="item_@Model.Item.SystemName.ToLower()"> 57 <figure class="m-0@(ratioCssClass)@(fillClass)" @ratioVariable> 58 @RenderPartial("Components/Image.cshtml", new FileViewModel { Path = groupImage }, parms) 59 </figure> 60 </div> 61 } else if (Pageview.IsVisualEditorMode) { 62 <div class="alert alert-dark m-0" role="alert"> 63 <span>@Translate("Product list group image: The image will be shown here, if any")</span> 64 </div> 65 } 66 } else if (Pageview.IsVisualEditorMode) 67 { 68 <div class="alert alert-dark m-0" role="alert"> 69 <span>@Translate("Product list group image: The image will be shown here, if any")</span> 70 </div> 71 } 72 73

Navigering

Sortering

Unyckel - 34 x 275 mm

Unyckel - 34 x 275 mm

2426403401
Unyckel - 34 x 275 mm
Unyckel 95 x 845 mm

Unyckel 95 x 845 mm

2426409507
Unyckel 95 x 845 mm
Unyckel 90 x 695 mm

Unyckel 90 x 695 mm

2426409007
Unyckel 90 x 695 mm
Unyckel - 75 x 610 mm

Unyckel - 75 x 610 mm

2426407501
Unyckel - 75 x 610 mm
Unyckel 65 x 510 mm

Unyckel 65 x 510 mm

2426406501
Unyckel 65 x 510 mm
Unyckel 60 x 477 mm

Unyckel 60 x 477 mm

2426406001
Unyckel 60 x 477 mm
Unyckel 55 x 440 mm

Unyckel 55 x 440 mm

2426405501
Unyckel 55 x 440 mm
Unyckel 50 x 410 mm

Unyckel 50 x 410 mm

2426405001
Unyckel 50 x 410 mm
Unyckel 46 x 380 mm

Unyckel 46 x 380 mm

2426404601
Unyckel 46 x 380 mm
Unyckel 41 x 340 mm

Unyckel 41 x 340 mm

2426404101
Unyckel 41 x 340 mm
Unyckel 38 x 305 mm

Unyckel 38 x 305 mm

2426403801
Unyckel 38 x 305 mm
Unyckel 36 x 305 mm

Unyckel 36 x 305 mm

2426403601
Unyckel 36 x 305 mm
Unyckel 32 x 275 mm

Unyckel 32 x 275 mm

2426403201
Unyckel 32 x 275 mm
Unyckel 30 x 260 mm

Unyckel 30 x 260 mm

2426403001
Unyckel 30 x 260 mm
Unyckel 27 x 240 mm

Unyckel 27 x 240 mm

2426402701
Unyckel 27 x 240 mm
Unyckel 24 x 215 mm

Unyckel 24 x 215 mm

2426402401
Unyckel 24 x 215 mm
Unyckel 22 x 195 mm

Unyckel 22 x 195 mm

2426402201
Unyckel 22 x 195 mm
Unyckel - 21 x 195 mm

Unyckel - 21 x 195 mm

2426402101
Unyckel - 21 x 195 mm
Unyckel 19 x 170 mm

Unyckel 19 x 170 mm

2426401901
Unyckel 19 x 170 mm
Unyckel 16 x 145 mm

Unyckel 16 x 145 mm

2426401601
Unyckel 16 x 145 mm
Unyckel 14 x 140 mm

Unyckel 14 x 140 mm

2426401401
Unyckel 14 x 140 mm
Unyckel 125 x 1000 mm

Unyckel 125 x 1000 mm

2426412507
Unyckel 125 x 1000 mm
Unyckel 120 x 1000 mm

Unyckel 120 x 1000 mm

2426412007
Unyckel 120 x 1000 mm
Unyckel 115 x 1000 mm

Unyckel 115 x 1000 mm

2426411507
Unyckel 115 x 1000 mm
Unyckel 110 x 1000 mm

Unyckel 110 x 1000 mm

2426411007
Unyckel 110 x 1000 mm
Unyckel 105 x 1000 mm

Unyckel 105 x 1000 mm

2426410507
Unyckel 105 x 1000 mm
Unyckel 100 x 850 mm

Unyckel 100 x 850 mm

2426410007
Unyckel 100 x 850 mm
27 ut ur 27 Produkter
By clicking 'Accept All' you consent that we may collect information about you for various purposes, including: Statistics and Marketing