Swift

All bikes

Error executing template "Designs/Swift-v2/Paragraph/Swift-v2_ProductListGroupImage.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_f35259b651d8410a9e8b5ef9b5d84dda.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) in /_/src/Application/Providers/Dynamicweb.Rendering.Providers.NetCore/Razor/RazorTemplateRenderingProvider.cs:line 68
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) in C:\dwxa1\_w\1\s\src\Core\Dynamicweb.Core\Rendering\TemplateRenderingService.cs:line 14
   at Dynamicweb.Rendering.Template.RenderRazorTemplate() in C:\dwxa1\_w\1\s\src\Core\Dynamicweb.Core\Rendering\Template.cs:line 805

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 } 14 15 @if (productList is object) { 16 string groupImage = productList?.Group?.Assets != null ? productList.Group.Assets.FirstOrDefault(x => x.Name == "LargeImage").Value : string.Empty; 17 if (groupImage.StartsWith("/") && !groupImage.StartsWith("/Files", StringComparison.OrdinalIgnoreCase)) 18 { 19 groupImage = $"/Files{groupImage}"; 20 } 21 22 string groupName = productList?.Group?.Name != null ? productList.Group.Name : string.Empty; 23 24 string ratio = Model.Item.GetRawValueString("ImageAspectRatio", string.Empty); 25 ratio = ratio != "0" ? ratio : string.Empty; 26 string ratioCssClass = ratio != string.Empty && ratio != "fill" ? " ratio" : string.Empty; 27 string ratioVariable = ratio != string.Empty ? "style=\"--bs-aspect-ratio: " + ratio + "\"" : string.Empty; 28 string fillClass = ratio == "fill" ? " h-100" : ""; 29 30 var parms = new Dictionary<string, object>(); 31 parms.Add("loading", "lazy"); 32 parms.Add("columns", Model.GridRowColumnCount); 33 34 if (ratio == "fill") { 35 parms.Add("cssClass", "w-100 h-100"); 36 } 37 else 38 { 39 parms.Add("cssClass", "mw-100 mh-100"); 40 } 41 42 parms.Add("style", string.Empty); 43 parms.Add("alt", groupName); 44 45 if (!string.IsNullOrEmpty(groupImage)) { 46 <div class="item_@Model.Item.SystemName.ToLower()" data-dw-colorscheme="@Model.ColorScheme?.Id"> 47 <figure class="m-0@(ratioCssClass)@(fillClass)" @ratioVariable> 48 @RenderPartial("Components/Image.cshtml", new FileViewModel { Path = groupImage }, parms) 49 </figure> 50 </div> 51 } else if (Pageview.IsVisualEditorMode) { 52 <div class="alert alert-dark m-0" role="alert"> 53 <span>@Translate("Product list group image: The image will be shown here, if any")</span> 54 </div> 55 } 56 } else if (Pageview.IsVisualEditorMode) 57 { 58 <div class="alert alert-dark m-0" role="alert"> 59 <span>@Translate("Product list group image: The image will be shown here, if any")</span> 60 </div> 61 } 62 63
K2 Mod 3.0 Road Bike
K2 Mod 3.0 Road Bike

K2 Mod 3.0 Road Bike

5.993,33 kr. excl. VAT På lager
K2 T:Nine Twister Ladies Road Bike cc
K2 T:Nine Twister Ladies Road Bike cc

K2 T:Nine Twister Ladies Road Bike cc

5.660,00 kr. excl. VAT Ikke på lager
GTw Avalanche 3.0 Disc Ladies
GTw Avalanche 3.0 Disc Ladies

GTw Avalanche 3.0 Disc Ladies

2.526,67 kr. excl. VAT Ikke på lager
Mongoose Ritual Dirt-Hi Mountain Bike (T5)
Mongoose Ritual Dirt-Hi Mountain Bike (T5)

Mongoose Ritual Dirt-Hi Mountain Bike (T5)

5.326,67 kr. excl. VAT På lager
Scattante CFR Elite
Scattante CFR Elite

Scattante CFR Elite

11.993,33 kr. excl. VAT Ikke på lager
GT GTR Series Three Road Bike
GT GTR Series Three Road Bike

GT GTR Series Three Road Bike

3.993,33 kr. excl. VAT På lager
GT GTR Type CX Road Bike
GT GTR Type CX Road Bike

GT GTR Type CX Road Bike

8.993,33 kr. excl. VAT Ikke på lager
SCULTURA 9000-E
SCULTURA 9000-E

SCULTURA 9000-E

55.233,33 kr. excl. VAT Ikke på lager
Copy of Scattante CFR Elite
Copy of Scattante CFR Elite

Copy of Scattante CFR Elite

11.993,33 kr. excl. VAT Ikke på lager
Mongoose Tyax Comp Disc (T3)
Mongoose Tyax Comp Disc (T3)

Mongoose Tyax Comp Disc (T3)

66.713,33 kr. excl. VAT På lager
Mongoose Canaan Comp (T4)
Mongoose Canaan Comp (T4)

Mongoose Canaan Comp (T4)

79.973,33 kr. excl. VAT Ikke på lager
K2 T:Nine Alliance Ladies Road Bike cc
K2 T:Nine Alliance Ladies Road Bike cc

K2 T:Nine Alliance Ladies Road Bike cc

6.660,00 kr. excl. VAT Ikke på lager
12 ud af 43 produkter
Hent flere produkter

All bikes