Error executing template "Designs/Swift/Paragraph/Swift_ProductListGroupPoster.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_b0ee975905314fea9ad4e772bc6df36d.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 99
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) in E:\A10\_w\2\s\src\Core\Dynamicweb.Core\Rendering\TemplateRenderingService.cs:line 21
   at Dynamicweb.Rendering.Template.RenderRazorTemplate() in E:\A10\_w\2\s\src\Core\Dynamicweb.Core\Rendering\Template.cs:line 749

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 { 27 string layout = Model.Item.GetRawValueString("Layout", "align-middle-center-text-center"); 28 string alignment = ""; 29 30 string searchParameter = Dynamicweb.Context.Current.Request.GetString("q"); 31 32 bool hideTitle = Model.Item.GetBoolean("HideGroupTitle"); 33 string titleFontSize = Model.Item.GetRawValueString("TitleFontSize", "display-4"); 34 35 string groupName = productList?.Group?.Name != null ? productList.Group.Name : ""; 36 string headerName = searchParameter != "" ? Translate("Search results for") + ": " + searchParameter : groupName; 37 38 bool hideDescription = Model.Item.GetBoolean("HideGroupDescription"); 39 string groupDescription = productList?.Group?.Description != null ? productList.Group.Description : ""; 40 string descriptionFontSize = Model.Item.GetRawValueString("DescriptionFontSize", "fs-6"); 41 42 string groupImage = productList?.Group?.Assets != null ? productList.Group.Assets.FirstOrDefault(x => x.Name == "LargeImage").Value : ""; 43 if (groupImage.StartsWith("/") && !groupImage.StartsWith("/Files", StringComparison.OrdinalIgnoreCase)) 44 { 45 groupImage = $"/Files{groupImage}"; 46 } 47 48 string posterHeight = Model.Item.GetRawValueString("PosterHeight", ""); 49 posterHeight = posterHeight == "small" ? "min-vh-25" : posterHeight; 50 posterHeight = posterHeight == "medium" ? "min-vh-50" : posterHeight; 51 posterHeight = posterHeight == "large" ? "min-vh-75" : posterHeight; 52 53 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 54 contentPadding = contentPadding == "none" ? "p-3 px-xl-3 py-xl-4" : contentPadding; 55 contentPadding = contentPadding == "small" ? "p-3 p-xl-4" : contentPadding; 56 contentPadding = contentPadding == "large" ? "p-4 p-xl-5" : contentPadding; 57 58 string maxWidth = Model.Item.GetRawValueString("TextReadability", "max-width-on"); 59 maxWidth = maxWidth == "max-width-on" ? " mw-75ch" : maxWidth; 60 maxWidth = maxWidth == "max-width-off" ? "" : maxWidth; 61 62 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? " theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 63 64 if (!string.IsNullOrEmpty(groupImage)) 65 { 66 var parms = new Dictionary<string, object>(); 67 parms.Add("cssClass", "h-100 w-100"); 68 parms.Add("columns", Model.GridRowColumnCount); 69 70 switch (layout) 71 { 72 case "align-top-left-text-left": 73 alignment = "text-start justify-content-start align-items-start"; 74 break; 75 case "align-top-center-text-center": 76 alignment = "text-center justify-content-center align-items-start"; 77 break; 78 case "align-top-right-text-right": 79 alignment = "text-end justify-content-end align-items-start"; 80 break; 81 case "align-middle-left-text-left": 82 alignment = "text-start justify-content-start align-items-center"; 83 break; 84 case "align-middle-center-text-center": 85 alignment = "text-center justify-content-center align-items-center"; 86 break; 87 case "align-middle-right-text-right": 88 alignment = "text-end justify-content-end align-items-center"; 89 break; 90 case "align-bottom-left-text-left": 91 alignment = "text-start justify-content-start align-items-end"; 92 break; 93 case "align-bottom-center-text-center": 94 alignment = "text-center justify-content-center align-items-end"; 95 break; 96 case "align-bottom-right-text-right": 97 alignment = "text-end justify-content-end align-items-end"; 98 break; 99 } 100 101 <div class="position-relative h-100@(theme) @(posterHeight) item_@Model.Item.SystemName.ToLower()"> 102 @if (!string.IsNullOrEmpty(groupImage)) 103 { 104 string imageFilter = Model.Item.GetRawValueString("ImageFilter", ""); 105 imageFilter = imageFilter == "no-filter" ? "" : imageFilter; 106 imageFilter = imageFilter == "filter" ? " image-filter" : imageFilter; 107 108 <div class="position-absolute top-0 bottom-0 end-0 start-0@(imageFilter)"> 109 @RenderPartial("Components/Image.cshtml", new FileViewModel { Path = groupImage }, parms) 110 </div> 111 } 112 113 @if (!hideTitle || !hideDescription) 114 { 115 <div class="container-xl h-100 @(contentPadding)"> 116 <div class="h-100 w-100 position-relative d-flex @(alignment)"> 117 <div class="@(maxWidth)"> 118 @if (!hideTitle) 119 { 120 <h1 class="@titleFontSize">@headerName</h1> 121 } 122 123 @if (!hideDescription && !string.IsNullOrEmpty(groupDescription)) 124 { 125 <div class="@descriptionFontSize mb-0-last-child"> 126 @groupDescription 127 </div> 128 } 129 </div> 130 </div> 131 </div> 132 } 133 134 </div> 135 } 136 else if (Pageview.IsVisualEditorMode) 137 { 138 <div class="alert alert-dark m-0" role="alert"> 139 <span>@Translate("Product group poster: The poster paragraph will be shown here, if any")</span> 140 </div> 141 } 142 } 143 else if (Pageview.IsVisualEditorMode) 144 { 145 <div class="alert alert-dark m-0" role="alert"> 146 <span>@Translate("Product group poster: The poster paragraph will be shown here, if any")</span> 147 </div> 148 } 149

Sort by

Gender

Colour

Gear

Campaign

60 out of 89 products
Load more products
New newest product

New newest product

3535 Many in stock.

3535 Many in stock.

£13.68
New newest product 2

New newest product 2

354 Many in stock.

354 Many in stock.

£27.36
Product with discount

Product with discount

001

22 Many in stock.

22 Many in stock.

£100.00
Product with discount (buy 2)

Product with discount (buy 2)

002

65735 Many in stock.

65735 Many in stock.

£1,000.00
Newest product

Newest product

1111111

2344 Many in stock.

2344 Many in stock.

£151.96
F-Si Carbon 3 Cross Country Bike MAINs

F-Si Carbon 3 Cross Country Bike MAINs

can001

79525 Many in stock.

79525 Many in stock.

£1,000.00
F-Si Carbon 4 Cross Country Bike MainUK

F-Si Carbon 4 Cross Country Bike MainUK

can002m

2 Hurry! Limited stock!

2 Hurry! Limited stock!

£382.85
Habit 3 Trail Bike MAIN

Habit 3 Trail Bike MAIN

can003

1 Hurry! Limited stock!

1 Hurry! Limited stock!

£451.24
Habit 4 Trail Bike

Habit 4 Trail Bike

can004

1993 Many in stock.

1993 Many in stock.

£355.50
Habit 5 Full Suspension Mountain Bike

Habit 5 Full Suspension Mountain Bike

can005

997 Many in stock.

997 Many in stock.

£300.78
Trail Neo S Mountain Bike

Trail Neo S Mountain Bike

can008

996 Many in stock.

996 Many in stock.

£519.63
F-Si Carbon 3 Cross Country Bike Red

F-Si Carbon 3 Cross Country Bike Red (Red)

can001

79525 Many in stock.

79525 Many in stock.

£1,000.00
F-Si Carbon 3 Cross Country Bike black

F-Si Carbon 3 Cross Country Bike black (Black)

can001

79525 Many in stock.

79525 Many in stock.

£1,000.00
F-Si Carbon 4 Cross Country Bike BlackUK

F-Si Carbon 4 Cross Country Bike BlackUK (Black)

can002b

1 Hurry! Limited stock!

1 Hurry! Limited stock!

£382.85
F-Si Carbon 4 Cross Country Bike OrangeUK

F-Si Carbon 4 Cross Country Bike OrangeUK (Orange)

can002

1 Hurry! Limited stock!

1 Hurry! Limited stock!

£382.85
Habit 4 Trail Bike

Habit 4 Trail Bike (Blue)

can

996 Many in stock.

996 Many in stock.

£355.50
Habit 4 Trail Bike

Habit 4 Trail Bike (Green)

can

997 Many in stock.

997 Many in stock.

£355.50
Habit 3 Trail Bike red

Habit 3 Trail Bike red (Red)

can

Out of stock.

Out of stock.

£451.24
Habit 5 Full Suspension Mountain Bike

Habit 5 Full Suspension Mountain Bike (Black)

can

997 Many in stock.

997 Many in stock.

£300.78
Trail Neo S Mountain Bike

Trail Neo S Mountain Bike (Green)

can

996 Many in stock.

996 Many in stock.

£519.63
Cujo 1

Cujo 1

can012

999 Many in stock.

999 Many in stock.

£0.00
Cujo 1

Cujo 1 (Brown)

999 Many in stock.

999 Many in stock.

£0.00
F-Si Carbon 3 Cross Country Bike

F-Si Carbon 3 Cross Country Bike (Green)

can001

79525 Many in stock.

79525 Many in stock.

£1,000.00
F-Si Carbon 3 Cross Country Bike

F-Si Carbon 3 Cross Country Bike (Yellow)

can001

79525 Many in stock.

79525 Many in stock.

£1,000.00
Habit Neo 2 Bike x

Habit Neo 2 Bike x

can006

1973 Many in stock.

1973 Many in stock.

£861.59
Moterra Neo Carbon 2 Mountain Bike

Moterra Neo Carbon 2 Mountain Bike

can007

1994 Many in stock.

1994 Many in stock.

£0.00
CAAD Optimo 1 Road Bike MAIN

CAAD Optimo 1 Road Bike MAIN

can009M

1990 Many in stock.

1990 Many in stock.

£177.68
CAAD Optimo 1 RED

CAAD Optimo 1 RED (Red)

can009R

996 Many in stock.

996 Many in stock.

£177.68
CAAD Optimo 1 BLUE

CAAD Optimo 1 BLUE (Blue)

can009B

991 Many in stock.

991 Many in stock.

£177.68
Habit Neo 2 red

Habit Neo 2 red (Red)

can006

1973 Many in stock.

1973 Many in stock.

£861.59
Habit Neo 2 grey

Habit Neo 2 grey (Grey)

can006

1973 Many in stock.

1973 Many in stock.

£861.59
CAAD Optimo Sora  Bike

CAAD Optimo Sora Bike

can010

997 Many in stock.

997 Many in stock.

£136.64
Moterra Neo Carbon 2 Mountain Bike

Moterra Neo Carbon 2 Mountain Bike (Blue)

can

996 Many in stock.

996 Many in stock.

£0.00
Moterra Neo Carbon 2 Mountain Bike

Moterra Neo Carbon 2 Mountain Bike (Grey)

can

997 Many in stock.

997 Many in stock.

£0.00
Hi-MOD Women's Ultegra Di2 Bike

Hi-MOD Women's Ultegra Di2 Bike

can011

Out of stock.

Out of stock.

£0.00
Hi-MOD Women's Ultegra Di2

Hi-MOD Women's Ultegra Di2 (Pink)

can

Out of stock.

Out of stock.

£0.00
CAAD Optimo Sora

CAAD Optimo Sora (White)

can

994 Many in stock.

994 Many in stock.

£136.64
Townie Path Go! 10D EQ Step-Thru

Townie Path Go! 10D EQ Step-Thru

567655 Many in stock.

567655 Many in stock.

£136.78
Townie Path Go! 10D EQ Step-Thru grey

Townie Path Go! 10D EQ Step-Thru grey (Grey)

Out of stock.

Out of stock.

£136.78
Townie Path Go! 10D EQ Step-Thru green

Townie Path Go! 10D EQ Step-Thru green (Green)

Out of stock.

Out of stock.

£136.78
Slash 7 Bike

Slash 7 Bike

trek002

996 Many in stock.

996 Many in stock.

£2,735.63 £2,188.50
Slash 7 (red variant)

Slash 7 (red variant) (Red)

Out of stock.

Out of stock.

£2,735.63 £2,188.50
Slash 7 (green variant)

Slash 7 (green variant) (Green)

998 Many in stock.

998 Many in stock.

£2,735.63 £2,188.50
Supercaliber 9.7 Bike

Supercaliber 9.7 Bike

trek003

2995 Many in stock.

2995 Many in stock.

£547.13
Supercaliber 9.7

Supercaliber 9.7 (Red)

998 Many in stock.

998 Many in stock.

£547.13
Supercaliber 9.7

Supercaliber 9.7 (Black)

998 Many in stock.

998 Many in stock.

£547.13
Supercaliber 9.7

Supercaliber 9.7 (Green)

999 Many in stock.

999 Many in stock.

£547.13
Precaliber 16 Girl Bike

Precaliber 16 Girl Bike

trek004

1997 Many in stock.

1997 Many in stock.

£44.45
Precaliber 16 Girl

Precaliber 16 Girl (Violet)

998 Many in stock.

998 Many in stock.

£44.45
Precaliber 16 Girl

Precaliber 16 Girl (Pink)

998 Many in stock.

998 Many in stock.

£44.45
Precaliber 20 7-speed Bike

Precaliber 20 7-speed Bike

trek005

1999 Many in stock.

1999 Many in stock.

£52.66
Precaliber 20 7-speed

Precaliber 20 7-speed (Black)

998 Many in stock.

998 Many in stock.

£52.66
Precaliber 20 7-speed

Precaliber 20 7-speed (Blue)

998 Many in stock.

998 Many in stock.

£52.66
Wahoo 24 Girl Bike MAIN

Wahoo 24 Girl Bike MAIN

trek006

3000 Many in stock.

3000 Many in stock.

£76.87
Wahoo 24 Girl (grey variant)

Wahoo 24 Girl (grey variant) (Grey)

1000 Many in stock.

1000 Many in stock.

£76.87
Wahoo 24 Girl (purple variant)

Wahoo 24 Girl (purple variant) (Purple)

1000 Many in stock.

1000 Many in stock.

£76.87
Wahoo 24 Girl (red variant)

Wahoo 24 Girl (red variant) (Red)

1000 Many in stock.

1000 Many in stock.

£76.87
Domane Women's SL 6 MAIN

Domane Women's SL 6 MAIN

trek0077

3000 Many in stock.

3000 Many in stock.

£578.72
Domane SL 6 (red variant)

Domane SL 6 (red variant) (Red)

1000 Many in stock.

1000 Many in stock.

£578.72
Domane SL 6 (black variant)

Domane SL 6 (black variant) (Black)

1000 Many in stock.

1000 Many in stock.

£578.72
60 out of 89 products
Load more products
60 out of 89 products
Load more products
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_17c1c3f82337485c8ace68af01afddd2.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 99
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) in E:\A10\_w\2\s\src\Core\Dynamicweb.Core\Rendering\TemplateRenderingService.cs:line 21
   at Dynamicweb.Rendering.Template.RenderRazorTemplate() in E:\A10\_w\2\s\src\Core\Dynamicweb.Core\Rendering\Template.cs:line 749

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
Error executing template "Designs/Swift/Paragraph/Swift_ProductListGroupPoster.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_b0ee975905314fea9ad4e772bc6df36d.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 99
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) in E:\A10\_w\2\s\src\Core\Dynamicweb.Core\Rendering\TemplateRenderingService.cs:line 21
   at Dynamicweb.Rendering.Template.RenderRazorTemplate() in E:\A10\_w\2\s\src\Core\Dynamicweb.Core\Rendering\Template.cs:line 749

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 { 27 string layout = Model.Item.GetRawValueString("Layout", "align-middle-center-text-center"); 28 string alignment = ""; 29 30 string searchParameter = Dynamicweb.Context.Current.Request.GetString("q"); 31 32 bool hideTitle = Model.Item.GetBoolean("HideGroupTitle"); 33 string titleFontSize = Model.Item.GetRawValueString("TitleFontSize", "display-4"); 34 35 string groupName = productList?.Group?.Name != null ? productList.Group.Name : ""; 36 string headerName = searchParameter != "" ? Translate("Search results for") + ": " + searchParameter : groupName; 37 38 bool hideDescription = Model.Item.GetBoolean("HideGroupDescription"); 39 string groupDescription = productList?.Group?.Description != null ? productList.Group.Description : ""; 40 string descriptionFontSize = Model.Item.GetRawValueString("DescriptionFontSize", "fs-6"); 41 42 string groupImage = productList?.Group?.Assets != null ? productList.Group.Assets.FirstOrDefault(x => x.Name == "LargeImage").Value : ""; 43 if (groupImage.StartsWith("/") && !groupImage.StartsWith("/Files", StringComparison.OrdinalIgnoreCase)) 44 { 45 groupImage = $"/Files{groupImage}"; 46 } 47 48 string posterHeight = Model.Item.GetRawValueString("PosterHeight", ""); 49 posterHeight = posterHeight == "small" ? "min-vh-25" : posterHeight; 50 posterHeight = posterHeight == "medium" ? "min-vh-50" : posterHeight; 51 posterHeight = posterHeight == "large" ? "min-vh-75" : posterHeight; 52 53 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 54 contentPadding = contentPadding == "none" ? "p-3 px-xl-3 py-xl-4" : contentPadding; 55 contentPadding = contentPadding == "small" ? "p-3 p-xl-4" : contentPadding; 56 contentPadding = contentPadding == "large" ? "p-4 p-xl-5" : contentPadding; 57 58 string maxWidth = Model.Item.GetRawValueString("TextReadability", "max-width-on"); 59 maxWidth = maxWidth == "max-width-on" ? " mw-75ch" : maxWidth; 60 maxWidth = maxWidth == "max-width-off" ? "" : maxWidth; 61 62 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? " theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 63 64 if (!string.IsNullOrEmpty(groupImage)) 65 { 66 var parms = new Dictionary<string, object>(); 67 parms.Add("cssClass", "h-100 w-100"); 68 parms.Add("columns", Model.GridRowColumnCount); 69 70 switch (layout) 71 { 72 case "align-top-left-text-left": 73 alignment = "text-start justify-content-start align-items-start"; 74 break; 75 case "align-top-center-text-center": 76 alignment = "text-center justify-content-center align-items-start"; 77 break; 78 case "align-top-right-text-right": 79 alignment = "text-end justify-content-end align-items-start"; 80 break; 81 case "align-middle-left-text-left": 82 alignment = "text-start justify-content-start align-items-center"; 83 break; 84 case "align-middle-center-text-center": 85 alignment = "text-center justify-content-center align-items-center"; 86 break; 87 case "align-middle-right-text-right": 88 alignment = "text-end justify-content-end align-items-center"; 89 break; 90 case "align-bottom-left-text-left": 91 alignment = "text-start justify-content-start align-items-end"; 92 break; 93 case "align-bottom-center-text-center": 94 alignment = "text-center justify-content-center align-items-end"; 95 break; 96 case "align-bottom-right-text-right": 97 alignment = "text-end justify-content-end align-items-end"; 98 break; 99 } 100 101 <div class="position-relative h-100@(theme) @(posterHeight) item_@Model.Item.SystemName.ToLower()"> 102 @if (!string.IsNullOrEmpty(groupImage)) 103 { 104 string imageFilter = Model.Item.GetRawValueString("ImageFilter", ""); 105 imageFilter = imageFilter == "no-filter" ? "" : imageFilter; 106 imageFilter = imageFilter == "filter" ? " image-filter" : imageFilter; 107 108 <div class="position-absolute top-0 bottom-0 end-0 start-0@(imageFilter)"> 109 @RenderPartial("Components/Image.cshtml", new FileViewModel { Path = groupImage }, parms) 110 </div> 111 } 112 113 @if (!hideTitle || !hideDescription) 114 { 115 <div class="container-xl h-100 @(contentPadding)"> 116 <div class="h-100 w-100 position-relative d-flex @(alignment)"> 117 <div class="@(maxWidth)"> 118 @if (!hideTitle) 119 { 120 <h1 class="@titleFontSize">@headerName</h1> 121 } 122 123 @if (!hideDescription && !string.IsNullOrEmpty(groupDescription)) 124 { 125 <div class="@descriptionFontSize mb-0-last-child"> 126 @groupDescription 127 </div> 128 } 129 </div> 130 </div> 131 </div> 132 } 133 134 </div> 135 } 136 else if (Pageview.IsVisualEditorMode) 137 { 138 <div class="alert alert-dark m-0" role="alert"> 139 <span>@Translate("Product group poster: The poster paragraph will be shown here, if any")</span> 140 </div> 141 } 142 } 143 else if (Pageview.IsVisualEditorMode) 144 { 145 <div class="alert alert-dark m-0" role="alert"> 146 <span>@Translate("Product group poster: The poster paragraph will be shown here, if any")</span> 147 </div> 148 } 149

All bikes

89 products

All bikes

89 products

All bikes

New newest product

New newest product

3535 Many in stock.

£13.68

3535 Many in stock.

£13.68
New newest product 2

New newest product 2

354 Many in stock.

£27.36

354 Many in stock.

£27.36
Product with discount

Product with discount

001

22 Many in stock.

£100.00

22 Many in stock.

£100.00
Product with discount (buy 2)

Product with discount (buy 2)

002

65735 Many in stock.

£1,000.00

65735 Many in stock.

£1,000.00
Newest product

Newest product

1111111

2344 Many in stock.

£151.96

2344 Many in stock.

£151.96
F-Si Carbon 3 Cross Country Bike MAINs

F-Si Carbon 3 Cross Country Bike MAINs

can001

79525 Many in stock.

£1,000.00

79525 Many in stock.

£1,000.00
F-Si Carbon 4 Cross Country Bike MainUK

F-Si Carbon 4 Cross Country Bike MainUK

can002m

2 Hurry! Limited stock!

£382.85

2 Hurry! Limited stock!

£382.85
Habit 3 Trail Bike MAIN

Habit 3 Trail Bike MAIN

can003

1 Hurry! Limited stock!

£451.24

1 Hurry! Limited stock!

£451.24
Habit 4 Trail Bike

Habit 4 Trail Bike

can004

1993 Many in stock.

£355.50

1993 Many in stock.

£355.50
Habit 5 Full Suspension Mountain Bike

Habit 5 Full Suspension Mountain Bike

can005

997 Many in stock.

£300.78

997 Many in stock.

£300.78
Trail Neo S Mountain Bike

Trail Neo S Mountain Bike

can008

996 Many in stock.

£519.63

996 Many in stock.

£519.63
F-Si Carbon 3 Cross Country Bike Red

F-Si Carbon 3 Cross Country Bike Red (Red)

can001

79525 Many in stock.

£1,000.00

79525 Many in stock.

£1,000.00
F-Si Carbon 3 Cross Country Bike black

F-Si Carbon 3 Cross Country Bike black (Black)

can001

79525 Many in stock.

£1,000.00

79525 Many in stock.

£1,000.00
F-Si Carbon 4 Cross Country Bike BlackUK

F-Si Carbon 4 Cross Country Bike BlackUK (Black)

can002b

1 Hurry! Limited stock!

£382.85

1 Hurry! Limited stock!

£382.85
F-Si Carbon 4 Cross Country Bike OrangeUK

F-Si Carbon 4 Cross Country Bike OrangeUK (Orange)

can002

1 Hurry! Limited stock!

£382.85

1 Hurry! Limited stock!

£382.85
Habit 4 Trail Bike

Habit 4 Trail Bike (Blue)

can

996 Many in stock.

£355.50

996 Many in stock.

£355.50
Habit 4 Trail Bike

Habit 4 Trail Bike (Green)

can

997 Many in stock.

£355.50

997 Many in stock.

£355.50
Habit 3 Trail Bike red

Habit 3 Trail Bike red (Red)

can

Out of stock.

£451.24

Out of stock.

£451.24
Habit 5 Full Suspension Mountain Bike

Habit 5 Full Suspension Mountain Bike (Black)

can

997 Many in stock.

£300.78

997 Many in stock.

£300.78
Trail Neo S Mountain Bike

Trail Neo S Mountain Bike (Green)

can

996 Many in stock.

£519.63

996 Many in stock.

£519.63
Cujo 1

Cujo 1

can012

999 Many in stock.

£0.00

999 Many in stock.

£0.00
Cujo 1

Cujo 1 (Brown)

999 Many in stock.

£0.00

999 Many in stock.

£0.00
F-Si Carbon 3 Cross Country Bike

F-Si Carbon 3 Cross Country Bike (Green)

can001

79525 Many in stock.

£1,000.00

79525 Many in stock.

£1,000.00
F-Si Carbon 3 Cross Country Bike

F-Si Carbon 3 Cross Country Bike (Yellow)

can001

79525 Many in stock.

£1,000.00

79525 Many in stock.

£1,000.00
Habit Neo 2 Bike x

Habit Neo 2 Bike x

can006

1973 Many in stock.

£861.59

1973 Many in stock.

£861.59
Moterra Neo Carbon 2 Mountain Bike

Moterra Neo Carbon 2 Mountain Bike

can007

1994 Many in stock.

£0.00

1994 Many in stock.

£0.00
CAAD Optimo 1 Road Bike MAIN

CAAD Optimo 1 Road Bike MAIN

can009M

1990 Many in stock.

£177.68

1990 Many in stock.

£177.68
CAAD Optimo 1 RED

CAAD Optimo 1 RED (Red)

can009R

996 Many in stock.

£177.68

996 Many in stock.

£177.68
CAAD Optimo 1 BLUE

CAAD Optimo 1 BLUE (Blue)

can009B

991 Many in stock.

£177.68

991 Many in stock.

£177.68
Habit Neo 2 red

Habit Neo 2 red (Red)

can006

1973 Many in stock.

£861.59

1973 Many in stock.

£861.59
Habit Neo 2 grey

Habit Neo 2 grey (Grey)

can006

1973 Many in stock.

£861.59

1973 Many in stock.

£861.59
CAAD Optimo Sora  Bike

CAAD Optimo Sora Bike

can010

997 Many in stock.

£136.64

997 Many in stock.

£136.64
Moterra Neo Carbon 2 Mountain Bike

Moterra Neo Carbon 2 Mountain Bike (Blue)

can

996 Many in stock.

£0.00

996 Many in stock.

£0.00
Moterra Neo Carbon 2 Mountain Bike

Moterra Neo Carbon 2 Mountain Bike (Grey)

can

997 Many in stock.

£0.00

997 Many in stock.

£0.00
Hi-MOD Women's Ultegra Di2 Bike

Hi-MOD Women's Ultegra Di2 Bike

can011

Out of stock.

£0.00

Out of stock.

£0.00
Hi-MOD Women's Ultegra Di2

Hi-MOD Women's Ultegra Di2 (Pink)

can

Out of stock.

£0.00

Out of stock.

£0.00
CAAD Optimo Sora

CAAD Optimo Sora (White)

can

994 Many in stock.

£136.64

994 Many in stock.

£136.64
Townie Path Go! 10D EQ Step-Thru

Townie Path Go! 10D EQ Step-Thru

567655 Many in stock.

£136.78

567655 Many in stock.

£136.78
Townie Path Go! 10D EQ Step-Thru grey

Townie Path Go! 10D EQ Step-Thru grey (Grey)

Out of stock.

£136.78

Out of stock.

£136.78
Townie Path Go! 10D EQ Step-Thru green

Townie Path Go! 10D EQ Step-Thru green (Green)

Out of stock.

£136.78

Out of stock.

£136.78
Slash 7 Bike

Slash 7 Bike

trek002

996 Many in stock.

£2,735.63 £2,188.50

996 Many in stock.

£2,735.63 £2,188.50
Slash 7 (red variant)

Slash 7 (red variant) (Red)

Out of stock.

£2,735.63 £2,188.50

Out of stock.

£2,735.63 £2,188.50
Slash 7 (green variant)

Slash 7 (green variant) (Green)

998 Many in stock.

£2,735.63 £2,188.50

998 Many in stock.

£2,735.63 £2,188.50
Supercaliber 9.7 Bike

Supercaliber 9.7 Bike

trek003

2995 Many in stock.

£547.13

2995 Many in stock.

£547.13
Supercaliber 9.7

Supercaliber 9.7 (Red)

998 Many in stock.

£547.13

998 Many in stock.

£547.13
Supercaliber 9.7

Supercaliber 9.7 (Black)

998 Many in stock.

£547.13

998 Many in stock.

£547.13
Supercaliber 9.7

Supercaliber 9.7 (Green)

999 Many in stock.

£547.13

999 Many in stock.

£547.13
Precaliber 16 Girl Bike

Precaliber 16 Girl Bike

trek004

1997 Many in stock.

£44.45

1997 Many in stock.

£44.45
Precaliber 16 Girl

Precaliber 16 Girl (Violet)

998 Many in stock.

£44.45

998 Many in stock.

£44.45
Precaliber 16 Girl

Precaliber 16 Girl (Pink)

998 Many in stock.

£44.45

998 Many in stock.

£44.45
Precaliber 20 7-speed Bike

Precaliber 20 7-speed Bike

trek005

1999 Many in stock.

£52.66

1999 Many in stock.

£52.66
Precaliber 20 7-speed

Precaliber 20 7-speed (Black)

998 Many in stock.

£52.66

998 Many in stock.

£52.66
Precaliber 20 7-speed

Precaliber 20 7-speed (Blue)

998 Many in stock.

£52.66

998 Many in stock.

£52.66
Wahoo 24 Girl Bike MAIN

Wahoo 24 Girl Bike MAIN

trek006

3000 Many in stock.

£76.87

3000 Many in stock.

£76.87
Wahoo 24 Girl (grey variant)

Wahoo 24 Girl (grey variant) (Grey)

1000 Many in stock.

£76.87

1000 Many in stock.

£76.87
Wahoo 24 Girl (purple variant)

Wahoo 24 Girl (purple variant) (Purple)

1000 Many in stock.

£76.87

1000 Many in stock.

£76.87
Wahoo 24 Girl (red variant)

Wahoo 24 Girl (red variant) (Red)

1000 Many in stock.

£76.87

1000 Many in stock.

£76.87
Domane Women's SL 6 MAIN

Domane Women's SL 6 MAIN

trek0077

3000 Many in stock.

£578.72

3000 Many in stock.

£578.72
Domane SL 6 (red variant)

Domane SL 6 (red variant) (Red)

1000 Many in stock.

£578.72

1000 Many in stock.

£578.72
Domane SL 6 (black variant)

Domane SL 6 (black variant) (Black)

1000 Many in stock.

£578.72

1000 Many in stock.

£578.72
60 out of 89 products
Load more products

Section header

Vertical navigation

By clicking 'Accept All' you consent that we may collect information about you for various purposes, including: Statistics and Marketing