Gode råd inden du vælger sikkerhedssko og arbejdssko
Error executing template "Designs/Swift/Paragraph/Swift_Feature.cshtml" System.NullReferenceException: Object reference not set to an instance of an object. at CompiledRazorTemplates.Dynamic.RazorEngine_a9b8de074f504b43a04090c4c23ad181.Execute() in E:\Solutions\Sika.test002.webtester.dk\Files\Templates\Designs\Swift\Paragraph\Swift_Feature.cshtml:line 55 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 Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using System.IO 3 4 @functions 5 { 6 private string RenderCustomCSS(IEnumerable<string> decorations) 7 { 8 var cssClasses = new List<string>(); 9 10 foreach (var itemId in decorations) 11 { 12 var item = Dynamicweb.Content.Services.Items.GetItem("Swift_Css", itemId); 13 item.TryGetValue("Class", out object classes); 14 15 if (classes is null) 16 { 17 continue; 18 } 19 20 var cssString = (string)classes; 21 22 if (cssString.StartsWith("[")) 23 { 24 var cssArray = Dynamicweb.Core.Converter.Deserialize<string[]>(cssString); 25 cssClasses.AddRange(cssArray); 26 } 27 else 28 { 29 cssClasses.Add(cssString.Replace(",", " ")); 30 } 31 } 32 33 return string.Join(" ", cssClasses).Trim(); 34 } 35 } 36 37 @{ 38 string layout = Model.Item.GetRawValueString("Layout", "icon-top"); 39 string contentPadding = Model.Item.GetRawValueString("ContentPadding", string.Empty); 40 contentPadding = contentPadding == "none" ? "" : contentPadding; 41 contentPadding = contentPadding == "small" ? "p-3 p-md-3" : contentPadding; 42 contentPadding = contentPadding == "large" ? "p-5 p-md-5" : contentPadding; 43 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? " theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : string.Empty; 44 var decorations = Model.Item?.GetList("CssDecorations")?.GetRawValue().OfType<string>() ?? Enumerable.Empty<string>(); 45 string css = RenderCustomCSS(decorations); 46 47 string target = Pageview.AreaSettings.GetBoolean("OpenLinksInNewTab") && Model.Item.GetString("Link").Contains("http") ? "target=\"_blank\"" : string.Empty; 48 string rel = Pageview.AreaSettings.GetBoolean("OpenLinksInNewTab") && Model.Item.GetString("Link").Contains("http") ? "rel=\"noopener\"" : string.Empty; 49 string alignment = (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) && !string.IsNullOrEmpty(Model.Item.GetString("Text")) ? "align-items-stretch" : "align-items-center"; 50 51 string iconColor = Model.Item.GetString("iconColor", "text-inherit"); 52 string iconOpacity = Model.Item.GetString("IconOpacity", "opacity-100"); 53 54 string iconSize = Model.Item.GetRawValueString("IconSize", "2"); 55 string imageSrc = !string.IsNullOrEmpty(Model.Item.GetString("Image")) ? Model.Item.GetFile("Image").Path : string.Empty; 56 string flexGrowClass = string.Empty; 57 58 switch (layout) 59 { 60 case "icon-left": 61 case "icon-right": 62 flexGrowClass = "flex-grow-0"; 63 break; 64 } 65 66 string imagePath = imageSrc != string.Empty ? imageSrc : Model.Item.GetRawValueString("Icon", string.Empty); 67 imagePath = Path.GetExtension(imagePath).ToLower() != ".svg" ? "/Admin/Public/GetImage.ashx?image=" + imagePath + "&height=" + iconSize + "&width=" + iconSize + "&Crop=0&format=webp" : imagePath; 68 string imgAltText = Model.Item.GetRawValueString("FeatureAltText", string.Empty); 69 70 string titleFontSize = Model.Item.GetRawValueString("TitleFontSize", "h4"); 71 string titleColor = Model.Item.GetString("TitleColor", "text-inherit"); 72 string titleOpacity = Model.Item.GetString("TitleOpacity", "opacity-100"); 73 string headingLevel = Model.Item.GetString("HeadingLevel", "h2"); 74 string headingLevelStart = $"<{headingLevel} class=\"{titleFontSize} {titleColor} {titleOpacity} m-0\">"; 75 string headingLevelStop = $"</{headingLevel}>"; 76 77 string textColor = Model.Item.GetString("TextColor", "text-inherit"); 78 string textOpacity = Model.Item.GetString("TextOpacity", "opacity-100"); 79 } 80 81 <div class="h-100 @(contentPadding)@(theme) @(css) item_@Model.Item.SystemName.ToLower()"> 82 <div id="@Model.ID" class="user-select-none" style="scroll-margin-top:var(--header-height,150px)"></div> 83 @if (!string.IsNullOrEmpty(Model.Item.GetString("Link"))) 84 { 85 @:<a href="@Model.Item.GetString("Link")" class="text-decoration-none d-block h-100" @target @rel> 86 } 87 88 @switch (layout) 89 { 90 case "icon-top": 91 <div class="d-flex flex-column gap-3 text-center mb-0-last-child"> 92 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 93 {<div class="@flexGrowClass"> 94 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 95 { 96 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 97 } 98 else 99 { 100 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 101 } 102 </div> 103 } 104 105 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 106 { 107 <div class="mb-0-last-child"> 108 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 109 { 110 @headingLevelStart 111 @Model.Item.GetString("Title") 112 @headingLevelStop 113 } 114 115 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 116 { 117 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 118 } 119 </div> 120 } 121 </div> 122 break; 123 case "icon-left": 124 <div class="d-flex flex-row gap-3 h-100 text-start @alignment"> 125 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 126 {<div class="@flexGrowClass"> 127 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 128 { 129 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 130 } 131 else 132 { 133 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 134 } 135 </div> 136 } 137 138 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 139 { 140 <div class="d-flex flex-column flex-grow-1"> 141 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 142 { 143 @headingLevelStart 144 @Model.Item.GetString("Title") 145 @headingLevelStop 146 } 147 148 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 149 { 150 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 151 } 152 </div> 153 } 154 155 </div> 156 break; 157 case "icon-right": 158 <div class="d-flex flex-row gap-3 h-100 text-end @alignment"> 159 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 160 { 161 <div class="d-flex flex-column flex-grow-1"> 162 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 163 { 164 @headingLevelStart 165 @Model.Item.GetString("Title") 166 @headingLevelStop 167 } 168 169 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 170 { 171 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 172 } 173 </div> 174 } 175 176 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 177 {<div class="@flexGrowClass"> 178 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 179 { 180 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 181 } 182 else 183 { 184 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 185 } 186 </div> 187 } 188 </div> 189 break; 190 } 191 192 @if (!string.IsNullOrEmpty(Model.Item.GetString("Link"))) 193 { 194 @:</a> 195 } 196 </div> 197
Vælg arbejdsfodtøj, der passer til dit arbejde
- Brug fodtøj med tåværn, hvis dit arbejde kræver det*
- Brug fodtøj med sømværn, hvis dit arbejde kræver det*
- Brug fodtøj, der giver ekstra beskyttelse, hvis dit arbejde kræver det*
*) I tvivlstilfælde kan du finde yderligere vejledning i Arbejdspladsvurderingen (APV) for din arbejdsplads.
Eksempler på ekstra beskyttelse
| Slid ved knælende arbejde Vælg fodtøj med ekstra tåforstærkning af overlæderet (ProNose). |
|
| Varme Vælg fodtøj, som er HI eller HRO godkendt. |
|
| Kulde Vælg fodtøj, som er CI godkendt og/eller har vinterfór. |
|
| Fugt Vælg fodtøj med vandtæt membran |
|
| Statisk elektricitet Vælg fodtøj, der er ESD-godkendt. Læs mere om ESD her |
Error executing template "Designs/Swift/Paragraph/Swift_Feature.cshtml" System.NullReferenceException: Object reference not set to an instance of an object. at CompiledRazorTemplates.Dynamic.RazorEngine_a9b8de074f504b43a04090c4c23ad181.Execute() in E:\Solutions\Sika.test002.webtester.dk\Files\Templates\Designs\Swift\Paragraph\Swift_Feature.cshtml:line 55 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 Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using System.IO 3 4 @functions 5 { 6 private string RenderCustomCSS(IEnumerable<string> decorations) 7 { 8 var cssClasses = new List<string>(); 9 10 foreach (var itemId in decorations) 11 { 12 var item = Dynamicweb.Content.Services.Items.GetItem("Swift_Css", itemId); 13 item.TryGetValue("Class", out object classes); 14 15 if (classes is null) 16 { 17 continue; 18 } 19 20 var cssString = (string)classes; 21 22 if (cssString.StartsWith("[")) 23 { 24 var cssArray = Dynamicweb.Core.Converter.Deserialize<string[]>(cssString); 25 cssClasses.AddRange(cssArray); 26 } 27 else 28 { 29 cssClasses.Add(cssString.Replace(",", " ")); 30 } 31 } 32 33 return string.Join(" ", cssClasses).Trim(); 34 } 35 } 36 37 @{ 38 string layout = Model.Item.GetRawValueString("Layout", "icon-top"); 39 string contentPadding = Model.Item.GetRawValueString("ContentPadding", string.Empty); 40 contentPadding = contentPadding == "none" ? "" : contentPadding; 41 contentPadding = contentPadding == "small" ? "p-3 p-md-3" : contentPadding; 42 contentPadding = contentPadding == "large" ? "p-5 p-md-5" : contentPadding; 43 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? " theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : string.Empty; 44 var decorations = Model.Item?.GetList("CssDecorations")?.GetRawValue().OfType<string>() ?? Enumerable.Empty<string>(); 45 string css = RenderCustomCSS(decorations); 46 47 string target = Pageview.AreaSettings.GetBoolean("OpenLinksInNewTab") && Model.Item.GetString("Link").Contains("http") ? "target=\"_blank\"" : string.Empty; 48 string rel = Pageview.AreaSettings.GetBoolean("OpenLinksInNewTab") && Model.Item.GetString("Link").Contains("http") ? "rel=\"noopener\"" : string.Empty; 49 string alignment = (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) && !string.IsNullOrEmpty(Model.Item.GetString("Text")) ? "align-items-stretch" : "align-items-center"; 50 51 string iconColor = Model.Item.GetString("iconColor", "text-inherit"); 52 string iconOpacity = Model.Item.GetString("IconOpacity", "opacity-100"); 53 54 string iconSize = Model.Item.GetRawValueString("IconSize", "2"); 55 string imageSrc = !string.IsNullOrEmpty(Model.Item.GetString("Image")) ? Model.Item.GetFile("Image").Path : string.Empty; 56 string flexGrowClass = string.Empty; 57 58 switch (layout) 59 { 60 case "icon-left": 61 case "icon-right": 62 flexGrowClass = "flex-grow-0"; 63 break; 64 } 65 66 string imagePath = imageSrc != string.Empty ? imageSrc : Model.Item.GetRawValueString("Icon", string.Empty); 67 imagePath = Path.GetExtension(imagePath).ToLower() != ".svg" ? "/Admin/Public/GetImage.ashx?image=" + imagePath + "&height=" + iconSize + "&width=" + iconSize + "&Crop=0&format=webp" : imagePath; 68 string imgAltText = Model.Item.GetRawValueString("FeatureAltText", string.Empty); 69 70 string titleFontSize = Model.Item.GetRawValueString("TitleFontSize", "h4"); 71 string titleColor = Model.Item.GetString("TitleColor", "text-inherit"); 72 string titleOpacity = Model.Item.GetString("TitleOpacity", "opacity-100"); 73 string headingLevel = Model.Item.GetString("HeadingLevel", "h2"); 74 string headingLevelStart = $"<{headingLevel} class=\"{titleFontSize} {titleColor} {titleOpacity} m-0\">"; 75 string headingLevelStop = $"</{headingLevel}>"; 76 77 string textColor = Model.Item.GetString("TextColor", "text-inherit"); 78 string textOpacity = Model.Item.GetString("TextOpacity", "opacity-100"); 79 } 80 81 <div class="h-100 @(contentPadding)@(theme) @(css) item_@Model.Item.SystemName.ToLower()"> 82 <div id="@Model.ID" class="user-select-none" style="scroll-margin-top:var(--header-height,150px)"></div> 83 @if (!string.IsNullOrEmpty(Model.Item.GetString("Link"))) 84 { 85 @:<a href="@Model.Item.GetString("Link")" class="text-decoration-none d-block h-100" @target @rel> 86 } 87 88 @switch (layout) 89 { 90 case "icon-top": 91 <div class="d-flex flex-column gap-3 text-center mb-0-last-child"> 92 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 93 {<div class="@flexGrowClass"> 94 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 95 { 96 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 97 } 98 else 99 { 100 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 101 } 102 </div> 103 } 104 105 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 106 { 107 <div class="mb-0-last-child"> 108 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 109 { 110 @headingLevelStart 111 @Model.Item.GetString("Title") 112 @headingLevelStop 113 } 114 115 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 116 { 117 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 118 } 119 </div> 120 } 121 </div> 122 break; 123 case "icon-left": 124 <div class="d-flex flex-row gap-3 h-100 text-start @alignment"> 125 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 126 {<div class="@flexGrowClass"> 127 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 128 { 129 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 130 } 131 else 132 { 133 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 134 } 135 </div> 136 } 137 138 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 139 { 140 <div class="d-flex flex-column flex-grow-1"> 141 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 142 { 143 @headingLevelStart 144 @Model.Item.GetString("Title") 145 @headingLevelStop 146 } 147 148 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 149 { 150 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 151 } 152 </div> 153 } 154 155 </div> 156 break; 157 case "icon-right": 158 <div class="d-flex flex-row gap-3 h-100 text-end @alignment"> 159 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 160 { 161 <div class="d-flex flex-column flex-grow-1"> 162 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 163 { 164 @headingLevelStart 165 @Model.Item.GetString("Title") 166 @headingLevelStop 167 } 168 169 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 170 { 171 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 172 } 173 </div> 174 } 175 176 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 177 {<div class="@flexGrowClass"> 178 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 179 { 180 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 181 } 182 else 183 { 184 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 185 } 186 </div> 187 } 188 </div> 189 break; 190 } 191 192 @if (!string.IsNullOrEmpty(Model.Item.GetString("Link"))) 193 { 194 @:</a> 195 } 196 </div> 197
Minimér risikoen for vridskader, forstuvninger og knoglebrud omkring anklen
✔️ Brug fodtøj, der støtter godt omkring anklen
✔️ Skoene skal snøres godt
✔️ Hælkappen skal være fast og passe om hælen
✔️ En god indlægssål kan stabilisere foden og hindre vridskader
Error executing template "Designs/Swift/Paragraph/Swift_Feature.cshtml" System.NullReferenceException: Object reference not set to an instance of an object. at CompiledRazorTemplates.Dynamic.RazorEngine_a9b8de074f504b43a04090c4c23ad181.Execute() in E:\Solutions\Sika.test002.webtester.dk\Files\Templates\Designs\Swift\Paragraph\Swift_Feature.cshtml:line 55 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 Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using System.IO 3 4 @functions 5 { 6 private string RenderCustomCSS(IEnumerable<string> decorations) 7 { 8 var cssClasses = new List<string>(); 9 10 foreach (var itemId in decorations) 11 { 12 var item = Dynamicweb.Content.Services.Items.GetItem("Swift_Css", itemId); 13 item.TryGetValue("Class", out object classes); 14 15 if (classes is null) 16 { 17 continue; 18 } 19 20 var cssString = (string)classes; 21 22 if (cssString.StartsWith("[")) 23 { 24 var cssArray = Dynamicweb.Core.Converter.Deserialize<string[]>(cssString); 25 cssClasses.AddRange(cssArray); 26 } 27 else 28 { 29 cssClasses.Add(cssString.Replace(",", " ")); 30 } 31 } 32 33 return string.Join(" ", cssClasses).Trim(); 34 } 35 } 36 37 @{ 38 string layout = Model.Item.GetRawValueString("Layout", "icon-top"); 39 string contentPadding = Model.Item.GetRawValueString("ContentPadding", string.Empty); 40 contentPadding = contentPadding == "none" ? "" : contentPadding; 41 contentPadding = contentPadding == "small" ? "p-3 p-md-3" : contentPadding; 42 contentPadding = contentPadding == "large" ? "p-5 p-md-5" : contentPadding; 43 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? " theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : string.Empty; 44 var decorations = Model.Item?.GetList("CssDecorations")?.GetRawValue().OfType<string>() ?? Enumerable.Empty<string>(); 45 string css = RenderCustomCSS(decorations); 46 47 string target = Pageview.AreaSettings.GetBoolean("OpenLinksInNewTab") && Model.Item.GetString("Link").Contains("http") ? "target=\"_blank\"" : string.Empty; 48 string rel = Pageview.AreaSettings.GetBoolean("OpenLinksInNewTab") && Model.Item.GetString("Link").Contains("http") ? "rel=\"noopener\"" : string.Empty; 49 string alignment = (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) && !string.IsNullOrEmpty(Model.Item.GetString("Text")) ? "align-items-stretch" : "align-items-center"; 50 51 string iconColor = Model.Item.GetString("iconColor", "text-inherit"); 52 string iconOpacity = Model.Item.GetString("IconOpacity", "opacity-100"); 53 54 string iconSize = Model.Item.GetRawValueString("IconSize", "2"); 55 string imageSrc = !string.IsNullOrEmpty(Model.Item.GetString("Image")) ? Model.Item.GetFile("Image").Path : string.Empty; 56 string flexGrowClass = string.Empty; 57 58 switch (layout) 59 { 60 case "icon-left": 61 case "icon-right": 62 flexGrowClass = "flex-grow-0"; 63 break; 64 } 65 66 string imagePath = imageSrc != string.Empty ? imageSrc : Model.Item.GetRawValueString("Icon", string.Empty); 67 imagePath = Path.GetExtension(imagePath).ToLower() != ".svg" ? "/Admin/Public/GetImage.ashx?image=" + imagePath + "&height=" + iconSize + "&width=" + iconSize + "&Crop=0&format=webp" : imagePath; 68 string imgAltText = Model.Item.GetRawValueString("FeatureAltText", string.Empty); 69 70 string titleFontSize = Model.Item.GetRawValueString("TitleFontSize", "h4"); 71 string titleColor = Model.Item.GetString("TitleColor", "text-inherit"); 72 string titleOpacity = Model.Item.GetString("TitleOpacity", "opacity-100"); 73 string headingLevel = Model.Item.GetString("HeadingLevel", "h2"); 74 string headingLevelStart = $"<{headingLevel} class=\"{titleFontSize} {titleColor} {titleOpacity} m-0\">"; 75 string headingLevelStop = $"</{headingLevel}>"; 76 77 string textColor = Model.Item.GetString("TextColor", "text-inherit"); 78 string textOpacity = Model.Item.GetString("TextOpacity", "opacity-100"); 79 } 80 81 <div class="h-100 @(contentPadding)@(theme) @(css) item_@Model.Item.SystemName.ToLower()"> 82 <div id="@Model.ID" class="user-select-none" style="scroll-margin-top:var(--header-height,150px)"></div> 83 @if (!string.IsNullOrEmpty(Model.Item.GetString("Link"))) 84 { 85 @:<a href="@Model.Item.GetString("Link")" class="text-decoration-none d-block h-100" @target @rel> 86 } 87 88 @switch (layout) 89 { 90 case "icon-top": 91 <div class="d-flex flex-column gap-3 text-center mb-0-last-child"> 92 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 93 {<div class="@flexGrowClass"> 94 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 95 { 96 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 97 } 98 else 99 { 100 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 101 } 102 </div> 103 } 104 105 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 106 { 107 <div class="mb-0-last-child"> 108 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 109 { 110 @headingLevelStart 111 @Model.Item.GetString("Title") 112 @headingLevelStop 113 } 114 115 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 116 { 117 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 118 } 119 </div> 120 } 121 </div> 122 break; 123 case "icon-left": 124 <div class="d-flex flex-row gap-3 h-100 text-start @alignment"> 125 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 126 {<div class="@flexGrowClass"> 127 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 128 { 129 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 130 } 131 else 132 { 133 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 134 } 135 </div> 136 } 137 138 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 139 { 140 <div class="d-flex flex-column flex-grow-1"> 141 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 142 { 143 @headingLevelStart 144 @Model.Item.GetString("Title") 145 @headingLevelStop 146 } 147 148 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 149 { 150 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 151 } 152 </div> 153 } 154 155 </div> 156 break; 157 case "icon-right": 158 <div class="d-flex flex-row gap-3 h-100 text-end @alignment"> 159 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 160 { 161 <div class="d-flex flex-column flex-grow-1"> 162 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 163 { 164 @headingLevelStart 165 @Model.Item.GetString("Title") 166 @headingLevelStop 167 } 168 169 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 170 { 171 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 172 } 173 </div> 174 } 175 176 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 177 {<div class="@flexGrowClass"> 178 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 179 { 180 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 181 } 182 else 183 { 184 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 185 } 186 </div> 187 } 188 </div> 189 break; 190 } 191 192 @if (!string.IsNullOrEmpty(Model.Item.GetString("Link"))) 193 { 194 @:</a> 195 } 196 </div> 197
Minimér risikoen for forstuvninger, sårskader og knoglebrud omkring fødderne
✔️ Brug fodtøj med tåværn
✔️ Brug fodtøj med sømværn
✔️ Hælkappen skal passe om hælen
✔️ En god indlægssål kan stabilisere foden og hindre vridskader
Error executing template "Designs/Swift/Paragraph/Swift_Feature.cshtml" System.NullReferenceException: Object reference not set to an instance of an object. at CompiledRazorTemplates.Dynamic.RazorEngine_a9b8de074f504b43a04090c4c23ad181.Execute() in E:\Solutions\Sika.test002.webtester.dk\Files\Templates\Designs\Swift\Paragraph\Swift_Feature.cshtml:line 55 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 Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using System.IO 3 4 @functions 5 { 6 private string RenderCustomCSS(IEnumerable<string> decorations) 7 { 8 var cssClasses = new List<string>(); 9 10 foreach (var itemId in decorations) 11 { 12 var item = Dynamicweb.Content.Services.Items.GetItem("Swift_Css", itemId); 13 item.TryGetValue("Class", out object classes); 14 15 if (classes is null) 16 { 17 continue; 18 } 19 20 var cssString = (string)classes; 21 22 if (cssString.StartsWith("[")) 23 { 24 var cssArray = Dynamicweb.Core.Converter.Deserialize<string[]>(cssString); 25 cssClasses.AddRange(cssArray); 26 } 27 else 28 { 29 cssClasses.Add(cssString.Replace(",", " ")); 30 } 31 } 32 33 return string.Join(" ", cssClasses).Trim(); 34 } 35 } 36 37 @{ 38 string layout = Model.Item.GetRawValueString("Layout", "icon-top"); 39 string contentPadding = Model.Item.GetRawValueString("ContentPadding", string.Empty); 40 contentPadding = contentPadding == "none" ? "" : contentPadding; 41 contentPadding = contentPadding == "small" ? "p-3 p-md-3" : contentPadding; 42 contentPadding = contentPadding == "large" ? "p-5 p-md-5" : contentPadding; 43 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? " theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : string.Empty; 44 var decorations = Model.Item?.GetList("CssDecorations")?.GetRawValue().OfType<string>() ?? Enumerable.Empty<string>(); 45 string css = RenderCustomCSS(decorations); 46 47 string target = Pageview.AreaSettings.GetBoolean("OpenLinksInNewTab") && Model.Item.GetString("Link").Contains("http") ? "target=\"_blank\"" : string.Empty; 48 string rel = Pageview.AreaSettings.GetBoolean("OpenLinksInNewTab") && Model.Item.GetString("Link").Contains("http") ? "rel=\"noopener\"" : string.Empty; 49 string alignment = (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) && !string.IsNullOrEmpty(Model.Item.GetString("Text")) ? "align-items-stretch" : "align-items-center"; 50 51 string iconColor = Model.Item.GetString("iconColor", "text-inherit"); 52 string iconOpacity = Model.Item.GetString("IconOpacity", "opacity-100"); 53 54 string iconSize = Model.Item.GetRawValueString("IconSize", "2"); 55 string imageSrc = !string.IsNullOrEmpty(Model.Item.GetString("Image")) ? Model.Item.GetFile("Image").Path : string.Empty; 56 string flexGrowClass = string.Empty; 57 58 switch (layout) 59 { 60 case "icon-left": 61 case "icon-right": 62 flexGrowClass = "flex-grow-0"; 63 break; 64 } 65 66 string imagePath = imageSrc != string.Empty ? imageSrc : Model.Item.GetRawValueString("Icon", string.Empty); 67 imagePath = Path.GetExtension(imagePath).ToLower() != ".svg" ? "/Admin/Public/GetImage.ashx?image=" + imagePath + "&height=" + iconSize + "&width=" + iconSize + "&Crop=0&format=webp" : imagePath; 68 string imgAltText = Model.Item.GetRawValueString("FeatureAltText", string.Empty); 69 70 string titleFontSize = Model.Item.GetRawValueString("TitleFontSize", "h4"); 71 string titleColor = Model.Item.GetString("TitleColor", "text-inherit"); 72 string titleOpacity = Model.Item.GetString("TitleOpacity", "opacity-100"); 73 string headingLevel = Model.Item.GetString("HeadingLevel", "h2"); 74 string headingLevelStart = $"<{headingLevel} class=\"{titleFontSize} {titleColor} {titleOpacity} m-0\">"; 75 string headingLevelStop = $"</{headingLevel}>"; 76 77 string textColor = Model.Item.GetString("TextColor", "text-inherit"); 78 string textOpacity = Model.Item.GetString("TextOpacity", "opacity-100"); 79 } 80 81 <div class="h-100 @(contentPadding)@(theme) @(css) item_@Model.Item.SystemName.ToLower()"> 82 <div id="@Model.ID" class="user-select-none" style="scroll-margin-top:var(--header-height,150px)"></div> 83 @if (!string.IsNullOrEmpty(Model.Item.GetString("Link"))) 84 { 85 @:<a href="@Model.Item.GetString("Link")" class="text-decoration-none d-block h-100" @target @rel> 86 } 87 88 @switch (layout) 89 { 90 case "icon-top": 91 <div class="d-flex flex-column gap-3 text-center mb-0-last-child"> 92 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 93 {<div class="@flexGrowClass"> 94 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 95 { 96 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 97 } 98 else 99 { 100 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 101 } 102 </div> 103 } 104 105 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 106 { 107 <div class="mb-0-last-child"> 108 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 109 { 110 @headingLevelStart 111 @Model.Item.GetString("Title") 112 @headingLevelStop 113 } 114 115 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 116 { 117 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 118 } 119 </div> 120 } 121 </div> 122 break; 123 case "icon-left": 124 <div class="d-flex flex-row gap-3 h-100 text-start @alignment"> 125 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 126 {<div class="@flexGrowClass"> 127 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 128 { 129 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 130 } 131 else 132 { 133 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 134 } 135 </div> 136 } 137 138 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 139 { 140 <div class="d-flex flex-column flex-grow-1"> 141 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 142 { 143 @headingLevelStart 144 @Model.Item.GetString("Title") 145 @headingLevelStop 146 } 147 148 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 149 { 150 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 151 } 152 </div> 153 } 154 155 </div> 156 break; 157 case "icon-right": 158 <div class="d-flex flex-row gap-3 h-100 text-end @alignment"> 159 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle") || !string.IsNullOrEmpty(Model.Item.GetString("Text"))) 160 { 161 <div class="d-flex flex-column flex-grow-1"> 162 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title")) && !Model.Item.GetBoolean("HideTitle")) 163 { 164 @headingLevelStart 165 @Model.Item.GetString("Title") 166 @headingLevelStop 167 } 168 169 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 170 { 171 <p class="@textColor @textOpacity m-0">@Model.Item.GetString("Text")</p> 172 } 173 </div> 174 } 175 176 @if (!string.IsNullOrEmpty(Model.Item.GetString("Image")) || !imagePath.ToLower().Contains("none") && imagePath != string.Empty) 177 {<div class="@flexGrowClass"> 178 @if (Path.GetExtension(imagePath).ToLower() == ".svg") 179 { 180 <div class="icon-auto @iconColor @iconOpacity" style="height: @(iconSize)px; width: @(iconSize)px;">@ReadFile(imagePath)</div> 181 } 182 else 183 { 184 <img loading="lazy" src="@imagePath" alt="@imgAltText" title="@Model.Item.GetString("Title")" style="height: @(iconSize)px; width: @(iconSize)px;"> 185 } 186 </div> 187 } 188 </div> 189 break; 190 } 191 192 @if (!string.IsNullOrEmpty(Model.Item.GetString("Link"))) 193 { 194 @:</a> 195 } 196 </div> 197
Undgå ømme fødder
✔️ Brug fodtøj med stødabsoberende såler
✔️ Brug fodtøj, der sidder godt fast på foden
✔️ Indlægssåler med svangstøtte, skal passe til din fod
✔️ Husk! Sko skal passe – ikke gåes til!