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_88e93fe859f14ecbbb59690d95193dce.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 { 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 parms.Add("fullwidth", true); 71 72 switch (layout) 73 { 74 case "align-top-left-text-left": 75 alignment = "text-start justify-content-start align-items-start"; 76 break; 77 case "align-top-center-text-center": 78 alignment = "text-center justify-content-center align-items-start"; 79 break; 80 case "align-top-right-text-right": 81 alignment = "text-end justify-content-end align-items-start"; 82 break; 83 case "align-middle-left-text-left": 84 alignment = "text-start justify-content-start align-items-center"; 85 break; 86 case "align-middle-center-text-center": 87 alignment = "text-center justify-content-center align-items-center"; 88 break; 89 case "align-middle-right-text-right": 90 alignment = "text-end justify-content-end align-items-center"; 91 break; 92 case "align-bottom-left-text-left": 93 alignment = "text-start justify-content-start align-items-end"; 94 break; 95 case "align-bottom-center-text-center": 96 alignment = "text-center justify-content-center align-items-end"; 97 break; 98 case "align-bottom-right-text-right": 99 alignment = "text-end justify-content-end align-items-end"; 100 break; 101 } 102 103 <div class="position-relative h-100@(theme) @(posterHeight) item_@Model.Item.SystemName.ToLower()"> 104 @if (!string.IsNullOrEmpty(groupImage)) 105 { 106 string imageFilter = Model.Item.GetRawValueString("ImageFilter", ""); 107 imageFilter = imageFilter == "no-filter" ? "" : imageFilter; 108 imageFilter = imageFilter == "filter" ? " image-filter" : imageFilter; 109 110 <div class="position-absolute top-0 bottom-0 end-0 start-0@(imageFilter)"> 111 @RenderPartial("Components/Image.cshtml", new FileViewModel { Path = groupImage }, parms) 112 </div> 113 } 114 115 @if (!hideTitle || !hideDescription) 116 { 117 <div class="container-xl h-100 @(contentPadding)"> 118 <div class="h-100 w-100 position-relative d-flex @(alignment)"> 119 <div class="@(maxWidth)"> 120 @if (!hideTitle) 121 { 122 <h1 class="@titleFontSize">@headerName</h1> 123 } 124 125 @if (!hideDescription && !string.IsNullOrEmpty(groupDescription)) 126 { 127 <div class="@descriptionFontSize mb-0-last-child"> 128 @groupDescription 129 </div> 130 } 131 </div> 132 </div> 133 </div> 134 } 135 136 </div> 137 } 138 else if (Pageview.IsVisualEditorMode) 139 { 140 <div class="alert alert-dark m-0" role="alert"> 141 <span>@Translate("Product group poster: The poster paragraph will be shown here, if any")</span> 142 </div> 143 } 144 } 145 else if (Pageview.IsVisualEditorMode) 146 { 147 <div class="alert alert-dark m-0" role="alert"> 148 <span>@Translate("Product group poster: The poster paragraph will be shown here, if any")</span> 149 </div> 150 } 151

Ingredienser

Olaplex NO.9 Bond Protector Nourishing Hair Serum, 90 ml.
Olaplex NO.9 Bond Protector Nourishing Hair Serum, 90 ml.
-35%

Olaplex NO.9 Bond Protector Nourishing Hair Serum, 90 ml.

259,00 kr.
168,00 kr. InStock
M2 Beaute Eyebrow Renewing Serum, 4 ml.
M2 Beaute Eyebrow Renewing Serum, 4 ml.
-55%

M2 Beaute Eyebrow Renewing Serum, 4 ml.

1110,00 kr.
499,00 kr.
InStock
Vita Liberata Sunkissed Glow Tanning Drops Vitamin C, 30 ml.
Vita Liberata Sunkissed Glow Tanning Drops Vitamin C, 30 ml.
-35%

Vita Liberata Sunkissed Glow Tanning Drops Vitamin C, 30 ml.

299,00 kr.
194,00 kr. InStock
Dr.Jart+ Ceramidin Skin Barrier Serum Toner, 150 ml.
Dr.Jart+ Ceramidin Skin Barrier Serum Toner, 150 ml.
-18%

Dr.Jart+ Ceramidin Skin Barrier Serum Toner, 150 ml.

360,00 kr.
296,00 kr.
InStock
Murad Retinol Youth Renewal Serum, 30 ml.
Murad Retinol Youth Renewal Serum, 30 ml.
-43%

Murad Retinol Youth Renewal Serum, 30 ml.

820,00 kr.
470,00 kr.
InStock
Filorga Age-Purify Fluid, 50 ml.
Filorga Age-Purify Fluid, 50 ml.
-35%

Filorga Age-Purify Fluid, 50 ml.

615,00 kr.
399,00 kr.
InStock
Filorga Global Repair Elixer Flacon, 30 ml.
Filorga Global Repair Elixer Flacon, 30 ml.
-58%

Filorga Global Repair Elixer Flacon, 30 ml.

989,00 kr.
412,00 kr.
InStock
Xlash Sensitive Eyelash Serum, 3 ml.
Xlash Sensitive Eyelash Serum, 3 ml.
-26%

Xlash Sensitive Eyelash Serum, 3 ml.

340,00 kr.
251,00 kr. InStock
VICHY Minéral 89 Eye Brightening Serum, 15 ml.
VICHY Minéral 89 Eye Brightening Serum, 15 ml.
-30%

VICHY Minéral 89 Eye Brightening Serum, 15 ml.

210,00 kr.
146,00 kr. InStock
Fillerina 12SZ Neck and Cleavage Grade 5, 30 ml.
Fillerina 12SZ Neck and Cleavage Grade 5, 30 ml.
-37%

Fillerina 12SZ Neck and Cleavage Grade 5, 30 ml.

799,00 kr.
504,00 kr.
InStock
M2 Beauté Eyebrow Enhancer Color & Care Blonde, 6 ml.
M2 Beauté Eyebrow Enhancer Color & Care Blonde, 6 ml.
-50%

M2 Beauté Eyebrow Enhancer Color & Care Blonde, 6 ml.

350,00 kr.
175,00 kr. InStock
Fillerina 12SZ Cheekbones Grade 5, 15 ml.
Fillerina 12SZ Cheekbones Grade 5, 15 ml.
-65%

Fillerina 12SZ Cheekbones Grade 5, 15 ml.

599,00 kr.
208,00 kr.
InStock
Beauté Pacifique Enriched Moisturizing Creme Dry Skin, 50 ml.
Beauté Pacifique Enriched Moisturizing Creme Dry Skin, 50 ml.
-31%

Beauté Pacifique Enriched Moisturizing Creme Dry Skin, 50 ml.

255,00 kr.
176,00 kr.
InStock
Clarins Hydra-Essentiel Normal To Dry Skin, 50 ml.
Clarins Hydra-Essentiel Normal To Dry Skin, 50 ml.
-30%

Clarins Hydra-Essentiel Normal To Dry Skin, 50 ml.

400,00 kr.
280,00 kr. InStock
StriVectin Tighten & Lift Peptight Tightening Neck Serum Roller, 50 ml.
StriVectin Tighten & Lift Peptight Tightening Neck Serum Roller, 50 ml.
-50%

StriVectin Tighten & Lift Peptight Tightening Neck Serum Roller, 50 ml.

550,00 kr.
277,00 kr.
InStock
Haruharu Wonder Black Rice Hyaluronic Toner, 300 ml.
Haruharu Wonder Black Rice Hyaluronic Toner, 300 ml.
-39%

Haruharu Wonder Black Rice Hyaluronic Toner, 300 ml.

280,00 kr.
171,00 kr.
InStock
Filorga Age-Purify (Mask), 75 ml.
Filorga Age-Purify (Mask), 75 ml.
-45%

Filorga Age-Purify (Mask), 75 ml.

465,00 kr.
258,00 kr.
InStock
Beauté Pacifique Crème Symphonique Daytime, 50 ml.
Beauté Pacifique Crème Symphonique Daytime, 50 ml.
-24%

Beauté Pacifique Crème Symphonique Daytime, 50 ml.

699,00 kr.
530,00 kr.
InStock
Beauty Of Joseon Revive Serum: Ginseng + Snail Mucin, 30 ml.
Beauty Of Joseon Revive Serum: Ginseng + Snail Mucin, 30 ml.
-26%

Beauty Of Joseon Revive Serum: Ginseng + Snail Mucin, 30 ml.

169,00 kr.
125,00 kr. InStock
Olaplex Browbond Serum, 3,5 ml.
Olaplex Browbond Serum, 3,5 ml.
-31%

Olaplex Browbond Serum, 3,5 ml.

599,00 kr.
412,00 kr.
InStock
StriVectin Double Fix for Lips Plumping & Vertical Line Treatment, 5 ml. + 5 ml.
StriVectin Double Fix for Lips Plumping & Vertical Line Treatment, 5 ml. + 5 ml.
-41%

StriVectin Double Fix for Lips Plumping & Vertical Line Treatment, 5 ml. + 5 ml.

255,00 kr.
151,00 kr.
InStock
Embryolisse Smooth Radiant Complexion, 40 ml.
Embryolisse Smooth Radiant Complexion, 40 ml.
-48%

Embryolisse Smooth Radiant Complexion, 40 ml.

235,00 kr.
123,00 kr.
InStock
Filorga Neocica, 40 ml.
Filorga Neocica, 40 ml.
-54%

Filorga Neocica, 40 ml.

399,00 kr.
184,00 kr.
InStock
Filorga Oxygen-Glow Cream, 50 ml.
Filorga Oxygen-Glow Cream, 50 ml.
-35%

Filorga Oxygen-Glow Cream, 50 ml.

435,00 kr.
282,00 kr.
InStock
Filorga Skin-Unify Radiance, 15 ml.
Filorga Skin-Unify Radiance, 15 ml.
-59%

Filorga Skin-Unify Radiance, 15 ml.

395,00 kr.
160,00 kr.
InStock
Beauté Pacifique Oil-Free Moisturizer, 40 ml.
Beauté Pacifique Oil-Free Moisturizer, 40 ml.
-27%

Beauté Pacifique Oil-Free Moisturizer, 40 ml.

249,00 kr.
183,00 kr.
InStock
Nuxe Nuxuriance Ultra Fluid, 50 ml.
Nuxe Nuxuriance Ultra Fluid, 50 ml.
-48%

Nuxe Nuxuriance Ultra Fluid, 50 ml.

535,00 kr.
279,00 kr.
InStock
COSRX Oil Free Ultra Moisturizing Lotion with Birch Sap, 100 ml.
COSRX Oil Free Ultra Moisturizing Lotion with Birch Sap, 100 ml.
-30%

COSRX Oil Free Ultra Moisturizing Lotion with Birch Sap, 100 ml.

199,00 kr.
139,00 kr. InStock
Shiseido Concentrate Facial Moisturising Lotion, 100 ml.
Shiseido Concentrate Facial Moisturising Lotion, 100 ml.
-44%

Shiseido Concentrate Facial Moisturising Lotion, 100 ml.

639,00 kr.
356,00 kr.
InStock
Mixsoon Master Serum, 60 ml.
Mixsoon Master Serum, 60 ml.
-40%

Mixsoon Master Serum, 60 ml.

339,00 kr.
203,00 kr. InStock
Mixsoon Bean Toner Pad, 70 pcs.
Mixsoon Bean Toner Pad, 70 pcs.
-40%

Mixsoon Bean Toner Pad, 70 pcs.

239,00 kr.
143,00 kr. InStock
Marc Inbane Tander Natural Tanning Mousse + Exfoliating Mitt, 150 ml.
Marc Inbane Tander Natural Tanning Mousse + Exfoliating Mitt, 150 ml.
-27%

Marc Inbane Tander Natural Tanning Mousse + Exfoliating Mitt, 150 ml.

379,00 kr.
278,00 kr.
InStock
Fillerina 12SZ Cheekbones Grade 4, 15 ml.
Fillerina 12SZ Cheekbones Grade 4, 15 ml.
-75%

Fillerina 12SZ Cheekbones Grade 4, 15 ml.

499,00 kr.
126,00 kr.
InStock
Filorga NCEF-Essence Lotion, 150 ml.
Filorga NCEF-Essence Lotion, 150 ml.
-35%

Filorga NCEF-Essence Lotion, 150 ml.

455,00 kr.
295,00 kr.
InStock
Filorga NCEF-Reverse Mat, 50 ml.
Filorga NCEF-Reverse Mat, 50 ml.
-35%

Filorga NCEF-Reverse Mat, 50 ml.

795,00 kr.
516,00 kr.
InStock
Filorga Global-Repair Intensive Serum, 30 ml.
Filorga Global-Repair Intensive Serum, 30 ml.
-35%

Filorga Global-Repair Intensive Serum, 30 ml.

885,00 kr.
575,00 kr.
InStock
36 ud af 48 produkter
Hent flere produkter