Valgresultat til Hedeselskabets kredsvalg 2025

Der har været afviklet kredsvalg i Hedeselskabet. Se resultatet af valget i de fem regioner herunder. Ved spørgsmål omkring valget, kontakt Peter Koch Hansen, pkh@hedeselskabet.dk

Udgivet den 11. april 2025
Error executing template "/Designs/Swift/Grid/Page/RowTemplates/Dalgas_Table.cshtml"
System.IO.IOException: There is not enough space on the disk.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.FileStream.FlushWrite(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at System.IO.StreamWriter.Dispose(Boolean disposing)
   at System.IO.TextWriter.Dispose()
   at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
   at RazorEngine.Roslyn.CSharp.RoslynCompilerServiceBase.CompileType(TypeContext context)
   at RazorEngine.Templating.RazorEngineCore.CreateTemplateType(ITemplateSource razorTemplate, Type modelType)
   at RazorEngine.Templating.RazorEngineCore.Compile(ITemplateKey key, Type modelType)
   at RazorEngine.Templating.RazorEngineService.CompileAndCacheInternal(ITemplateKey key, Type modelType)
   at RazorEngine.Templating.RazorEngineService.GetCompiledTemplate(ITemplateKey key, Type modelType, Boolean compileOnCacheMiss)
   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 @using System 2 @using System.Collections.Generic 3 @using System.Linq 4 @using Dynamicweb.Content 5 @using Dynamicweb.Frontend 6 @using Dalgas.Custom.Services 7 @using Dynamicweb.Core.Json 8 @using Dynamicweb.Ecommerce.ProductCatalog 9 @using Dynamicweb.Indexing.Querying 10 @using Dynamicweb.Indexing.Querying.Faceting 11 @using Dynamicweb.Indexing.Querying.Sorting 12 @using Dynamicweb.Modules 13 @using ParagraphService = Dalgas.Custom.Services.ParagraphService 14 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.GridRowViewModel> 15 16 @using System 17 @using System.Collections.Generic 18 @using System.Linq 19 @using Dalgas.Custom.ViewModels.UI 20 @using Dynamicweb.Content 21 @using Dynamicweb.Ecommerce.ProductCatalog 22 @using Dynamicweb.Frontend 23 @using ParagraphService = Dalgas.Custom.Services.ParagraphService 24 25 @*TODO: Move these functions onto the model *@ 26 27 @functions 28 { 29 30 public string GetSectionClassList(GridRowViewModel model, string overwriteTheme = "") 31 { 32 var returnValues = new List<string> 33 { 34 $"item_{model.Item.SystemName.ToLower()}" 35 }; 36 37 if (Services.Grids.GetGridRowById(model.Id).Sort == 1) 38 { 39 returnValues.Add("dalgas-section-first-on-page"); 40 } 41 42 var sectionBackgroundTheme = model.Item.GetItem("ColorScheme")?.GetString("ColorScheme") ?? string.Empty; 43 44 if (!string.IsNullOrEmpty(overwriteTheme)) 45 { 46 sectionBackgroundTheme = overwriteTheme; 47 } 48 49 // Add theme class if it exists 50 if (!string.IsNullOrWhiteSpace(sectionBackgroundTheme)) 51 { 52 if (sectionBackgroundTheme.Contains("default")) 53 { 54 returnValues.Add("theme theme-light"); 55 } 56 else 57 { 58 returnValues.Add($"theme {sectionBackgroundTheme.Replace(" ", "").Trim().ToLower()}"); 59 } 60 } 61 62 // Determine if top padding should be removed 63 64 string removeTopPadding = model.Item.GetItem("ColorScheme")?.GetString("RemoveTopPadding"); 65 66 returnValues.Add("pb-6"); 67 if (removeTopPadding != "enable") 68 { 69 returnValues.Add("pt-6"); 70 } 71 72 return string.Join(" ", returnValues); 73 } 74 75 } 76 77 78 @{ 79 IEnumerable<HeadingViewModel> headings = ParagraphService.Instance.GetHeadingsByItems(Model.Item?.GetItem("Paragraph_Text")?.GetItems("Headings")); 80 string text = Model.Item.GetItem("Paragraph_Text")?.GetString("Text"); 81 string lead = Model.Item.GetItem("Paragraph_Text")?.GetString("Lead"); 82 IEnumerable<ButtonViewModel> buttons = ParagraphService.Instance.GetButtonsByItems(Model.Item?.GetItem("Paragraph_Text")?.GetItems("Buttons")); 83 84 bool hasImage = Model.Item.GetItem("Paragraph_Image")?.GetFile("Image") != null; 85 bool hasText = !string.IsNullOrEmpty(Model.Item?.GetItem("Paragraph_Text")?.GetString("Text")); 86 bool hasLead = !string.IsNullOrEmpty(Model.Item?.GetItem("Paragraph_Text")?.GetString("Lead")); 87 bool hasHeading = headings.Any(); 88 bool hasButton = buttons.Any(); 89 90 var theme = Model.Item.GetItem("ColorScheme")?.GetString("ColorScheme"); 91 var fifthElementTheme = "fifth-element-color-" + Model.Item?.GetItem("ColorScheme")?.GetString("FifthElementColor"); 92 93 var sectionClassList = GetSectionClassList(Model); 94 95 var image = string.Empty; 96 var imageParameters = new Dictionary<string, object>(); 97 98 string layout = string.Empty; 99 Boolean enableFifthElement = false; 100 if (Model?.Item != null) 101 { 102 var paragraphLayout = Model.Item.GetItem("Paragraph_Layout"); 103 104 if (paragraphLayout != null) 105 { 106 layout = paragraphLayout.GetString("Layout"); 107 108 enableFifthElement = !string.IsNullOrEmpty(paragraphLayout.GetString("Layout_FifthElement")); 109 } 110 } 111 112 if (!string.IsNullOrEmpty(Model.Item?.GetItem("Paragraph_Image")?.GetFile("Image")?.Path)) 113 { 114 image = Model.Item.GetItem("Paragraph_Image").GetFile("Image").Path; 115 imageParameters.Add("alt", Model.Item.GetItem("Paragraph_Image")?.GetString("ImageAltText")); 116 int xPos = Model.Item.GetItem("Paragraph_Image").GetFile("Image")?.FocalPositionFromLeft ?? 50; 117 int yPos = Model.Item.GetItem("Paragraph_Image").GetFile("Image")?.FocalPositionFromTop ?? 50; 118 string cssPosition = $"{xPos}% {yPos}%"; 119 imageParameters.Add("style", "object-position:" + cssPosition); 120 } 121 122 LinkViewModel imageLink = new LinkViewModel(); 123 if (Model.Item?.GetItem("Paragraph_Image")?.GetItem("Link") != null && !string.IsNullOrEmpty(Model?.Item?.GetItem("Paragraph_Image")?.GetItem("Link").GetString("ButtonLink"))) 124 { 125 imageLink = ParagraphService.Instance.GetLinkByItem(Model?.Item?.GetItem("Paragraph_Image")?.GetItem("Link")); 126 } 127 128 string fifthElementIconPath = "/Files/Templates/Designs/Swift/Assets/Images/DalgasFifthElements/"; 129 } 130 131 132 @{ 133 } 134 135 <section id="section-@Model.Id" class="@sectionClassList" data-swift-gridrow> 136 <div class=""> 137 138 @if (!string.IsNullOrEmpty(Model.Item.GetItem("Content").GetString("Table"))) 139 { 140 <div class="container-xl"> 141 <div class="row"> 142 <div class="col-12 col-lg-10 mx-auto"> 143 <div class="row"> 144 145 <div class="col-12"> 146 147 @if (!string.IsNullOrEmpty(Model.Item.GetItem("Content").GetString("Header"))) 148 { 149 <h2 class="mb-4">@Model.Item.GetItem("Content").GetString("Header")</h2> 150 } 151 152 <div class="table-responsive"> 153 @Model.Item.GetItem("Content").GetString("Table") 154 </div> 155 </div> 156 </div> 157 </div> 158 </div> 159 </div> 160 } 161 else 162 { 163 if (Pageview.IsVisualEditorMode) 164 { 165 <div class="container-xl alert alert-danger" role="alert"> 166 This <strong>@Model.Item.SystemName</strong> is empty 167 </div> 168 } 169 } 170 </div> 171 </section> 172
Error executing template "/Designs/Swift/Grid/Page/RowTemplates/Dalgas_Table.cshtml"
System.IO.IOException: There is not enough space on the disk.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.FileStream.FlushWrite(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at System.IO.StreamWriter.Dispose(Boolean disposing)
   at System.IO.TextWriter.Dispose()
   at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
   at RazorEngine.Roslyn.CSharp.RoslynCompilerServiceBase.CompileType(TypeContext context)
   at RazorEngine.Templating.RazorEngineCore.CreateTemplateType(ITemplateSource razorTemplate, Type modelType)
   at RazorEngine.Templating.RazorEngineCore.Compile(ITemplateKey key, Type modelType)
   at RazorEngine.Templating.RazorEngineService.CompileAndCacheInternal(ITemplateKey key, Type modelType)
   at RazorEngine.Templating.RazorEngineService.GetCompiledTemplate(ITemplateKey key, Type modelType, Boolean compileOnCacheMiss)
   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 @using System 2 @using System.Collections.Generic 3 @using System.Linq 4 @using Dynamicweb.Content 5 @using Dynamicweb.Frontend 6 @using Dalgas.Custom.Services 7 @using Dynamicweb.Core.Json 8 @using Dynamicweb.Ecommerce.ProductCatalog 9 @using Dynamicweb.Indexing.Querying 10 @using Dynamicweb.Indexing.Querying.Faceting 11 @using Dynamicweb.Indexing.Querying.Sorting 12 @using Dynamicweb.Modules 13 @using ParagraphService = Dalgas.Custom.Services.ParagraphService 14 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.GridRowViewModel> 15 16 @using System 17 @using System.Collections.Generic 18 @using System.Linq 19 @using Dalgas.Custom.ViewModels.UI 20 @using Dynamicweb.Content 21 @using Dynamicweb.Ecommerce.ProductCatalog 22 @using Dynamicweb.Frontend 23 @using ParagraphService = Dalgas.Custom.Services.ParagraphService 24 25 @*TODO: Move these functions onto the model *@ 26 27 @functions 28 { 29 30 public string GetSectionClassList(GridRowViewModel model, string overwriteTheme = "") 31 { 32 var returnValues = new List<string> 33 { 34 $"item_{model.Item.SystemName.ToLower()}" 35 }; 36 37 if (Services.Grids.GetGridRowById(model.Id).Sort == 1) 38 { 39 returnValues.Add("dalgas-section-first-on-page"); 40 } 41 42 var sectionBackgroundTheme = model.Item.GetItem("ColorScheme")?.GetString("ColorScheme") ?? string.Empty; 43 44 if (!string.IsNullOrEmpty(overwriteTheme)) 45 { 46 sectionBackgroundTheme = overwriteTheme; 47 } 48 49 // Add theme class if it exists 50 if (!string.IsNullOrWhiteSpace(sectionBackgroundTheme)) 51 { 52 if (sectionBackgroundTheme.Contains("default")) 53 { 54 returnValues.Add("theme theme-light"); 55 } 56 else 57 { 58 returnValues.Add($"theme {sectionBackgroundTheme.Replace(" ", "").Trim().ToLower()}"); 59 } 60 } 61 62 // Determine if top padding should be removed 63 64 string removeTopPadding = model.Item.GetItem("ColorScheme")?.GetString("RemoveTopPadding"); 65 66 returnValues.Add("pb-6"); 67 if (removeTopPadding != "enable") 68 { 69 returnValues.Add("pt-6"); 70 } 71 72 return string.Join(" ", returnValues); 73 } 74 75 } 76 77 78 @{ 79 IEnumerable<HeadingViewModel> headings = ParagraphService.Instance.GetHeadingsByItems(Model.Item?.GetItem("Paragraph_Text")?.GetItems("Headings")); 80 string text = Model.Item.GetItem("Paragraph_Text")?.GetString("Text"); 81 string lead = Model.Item.GetItem("Paragraph_Text")?.GetString("Lead"); 82 IEnumerable<ButtonViewModel> buttons = ParagraphService.Instance.GetButtonsByItems(Model.Item?.GetItem("Paragraph_Text")?.GetItems("Buttons")); 83 84 bool hasImage = Model.Item.GetItem("Paragraph_Image")?.GetFile("Image") != null; 85 bool hasText = !string.IsNullOrEmpty(Model.Item?.GetItem("Paragraph_Text")?.GetString("Text")); 86 bool hasLead = !string.IsNullOrEmpty(Model.Item?.GetItem("Paragraph_Text")?.GetString("Lead")); 87 bool hasHeading = headings.Any(); 88 bool hasButton = buttons.Any(); 89 90 var theme = Model.Item.GetItem("ColorScheme")?.GetString("ColorScheme"); 91 var fifthElementTheme = "fifth-element-color-" + Model.Item?.GetItem("ColorScheme")?.GetString("FifthElementColor"); 92 93 var sectionClassList = GetSectionClassList(Model); 94 95 var image = string.Empty; 96 var imageParameters = new Dictionary<string, object>(); 97 98 string layout = string.Empty; 99 Boolean enableFifthElement = false; 100 if (Model?.Item != null) 101 { 102 var paragraphLayout = Model.Item.GetItem("Paragraph_Layout"); 103 104 if (paragraphLayout != null) 105 { 106 layout = paragraphLayout.GetString("Layout"); 107 108 enableFifthElement = !string.IsNullOrEmpty(paragraphLayout.GetString("Layout_FifthElement")); 109 } 110 } 111 112 if (!string.IsNullOrEmpty(Model.Item?.GetItem("Paragraph_Image")?.GetFile("Image")?.Path)) 113 { 114 image = Model.Item.GetItem("Paragraph_Image").GetFile("Image").Path; 115 imageParameters.Add("alt", Model.Item.GetItem("Paragraph_Image")?.GetString("ImageAltText")); 116 int xPos = Model.Item.GetItem("Paragraph_Image").GetFile("Image")?.FocalPositionFromLeft ?? 50; 117 int yPos = Model.Item.GetItem("Paragraph_Image").GetFile("Image")?.FocalPositionFromTop ?? 50; 118 string cssPosition = $"{xPos}% {yPos}%"; 119 imageParameters.Add("style", "object-position:" + cssPosition); 120 } 121 122 LinkViewModel imageLink = new LinkViewModel(); 123 if (Model.Item?.GetItem("Paragraph_Image")?.GetItem("Link") != null && !string.IsNullOrEmpty(Model?.Item?.GetItem("Paragraph_Image")?.GetItem("Link").GetString("ButtonLink"))) 124 { 125 imageLink = ParagraphService.Instance.GetLinkByItem(Model?.Item?.GetItem("Paragraph_Image")?.GetItem("Link")); 126 } 127 128 string fifthElementIconPath = "/Files/Templates/Designs/Swift/Assets/Images/DalgasFifthElements/"; 129 } 130 131 132 @{ 133 } 134 135 <section id="section-@Model.Id" class="@sectionClassList" data-swift-gridrow> 136 <div class=""> 137 138 @if (!string.IsNullOrEmpty(Model.Item.GetItem("Content").GetString("Table"))) 139 { 140 <div class="container-xl"> 141 <div class="row"> 142 <div class="col-12 col-lg-10 mx-auto"> 143 <div class="row"> 144 145 <div class="col-12"> 146 147 @if (!string.IsNullOrEmpty(Model.Item.GetItem("Content").GetString("Header"))) 148 { 149 <h2 class="mb-4">@Model.Item.GetItem("Content").GetString("Header")</h2> 150 } 151 152 <div class="table-responsive"> 153 @Model.Item.GetItem("Content").GetString("Table") 154 </div> 155 </div> 156 </div> 157 </div> 158 </div> 159 </div> 160 } 161 else 162 { 163 if (Pageview.IsVisualEditorMode) 164 { 165 <div class="container-xl alert alert-danger" role="alert"> 166 This <strong>@Model.Item.SystemName</strong> is empty 167 </div> 168 } 169 } 170 </div> 171 </section> 172
Error executing template "/Designs/Swift/Grid/Page/RowTemplates/Dalgas_Table.cshtml"
System.IO.IOException: There is not enough space on the disk.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.FileStream.FlushWrite(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at System.IO.StreamWriter.Dispose(Boolean disposing)
   at System.IO.TextWriter.Dispose()
   at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
   at RazorEngine.Roslyn.CSharp.RoslynCompilerServiceBase.CompileType(TypeContext context)
   at RazorEngine.Templating.RazorEngineCore.CreateTemplateType(ITemplateSource razorTemplate, Type modelType)
   at RazorEngine.Templating.RazorEngineCore.Compile(ITemplateKey key, Type modelType)
   at RazorEngine.Templating.RazorEngineService.CompileAndCacheInternal(ITemplateKey key, Type modelType)
   at RazorEngine.Templating.RazorEngineService.GetCompiledTemplate(ITemplateKey key, Type modelType, Boolean compileOnCacheMiss)
   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 @using System 2 @using System.Collections.Generic 3 @using System.Linq 4 @using Dynamicweb.Content 5 @using Dynamicweb.Frontend 6 @using Dalgas.Custom.Services 7 @using Dynamicweb.Core.Json 8 @using Dynamicweb.Ecommerce.ProductCatalog 9 @using Dynamicweb.Indexing.Querying 10 @using Dynamicweb.Indexing.Querying.Faceting 11 @using Dynamicweb.Indexing.Querying.Sorting 12 @using Dynamicweb.Modules 13 @using ParagraphService = Dalgas.Custom.Services.ParagraphService 14 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.GridRowViewModel> 15 16 @using System 17 @using System.Collections.Generic 18 @using System.Linq 19 @using Dalgas.Custom.ViewModels.UI 20 @using Dynamicweb.Content 21 @using Dynamicweb.Ecommerce.ProductCatalog 22 @using Dynamicweb.Frontend 23 @using ParagraphService = Dalgas.Custom.Services.ParagraphService 24 25 @*TODO: Move these functions onto the model *@ 26 27 @functions 28 { 29 30 public string GetSectionClassList(GridRowViewModel model, string overwriteTheme = "") 31 { 32 var returnValues = new List<string> 33 { 34 $"item_{model.Item.SystemName.ToLower()}" 35 }; 36 37 if (Services.Grids.GetGridRowById(model.Id).Sort == 1) 38 { 39 returnValues.Add("dalgas-section-first-on-page"); 40 } 41 42 var sectionBackgroundTheme = model.Item.GetItem("ColorScheme")?.GetString("ColorScheme") ?? string.Empty; 43 44 if (!string.IsNullOrEmpty(overwriteTheme)) 45 { 46 sectionBackgroundTheme = overwriteTheme; 47 } 48 49 // Add theme class if it exists 50 if (!string.IsNullOrWhiteSpace(sectionBackgroundTheme)) 51 { 52 if (sectionBackgroundTheme.Contains("default")) 53 { 54 returnValues.Add("theme theme-light"); 55 } 56 else 57 { 58 returnValues.Add($"theme {sectionBackgroundTheme.Replace(" ", "").Trim().ToLower()}"); 59 } 60 } 61 62 // Determine if top padding should be removed 63 64 string removeTopPadding = model.Item.GetItem("ColorScheme")?.GetString("RemoveTopPadding"); 65 66 returnValues.Add("pb-6"); 67 if (removeTopPadding != "enable") 68 { 69 returnValues.Add("pt-6"); 70 } 71 72 return string.Join(" ", returnValues); 73 } 74 75 } 76 77 78 @{ 79 IEnumerable<HeadingViewModel> headings = ParagraphService.Instance.GetHeadingsByItems(Model.Item?.GetItem("Paragraph_Text")?.GetItems("Headings")); 80 string text = Model.Item.GetItem("Paragraph_Text")?.GetString("Text"); 81 string lead = Model.Item.GetItem("Paragraph_Text")?.GetString("Lead"); 82 IEnumerable<ButtonViewModel> buttons = ParagraphService.Instance.GetButtonsByItems(Model.Item?.GetItem("Paragraph_Text")?.GetItems("Buttons")); 83 84 bool hasImage = Model.Item.GetItem("Paragraph_Image")?.GetFile("Image") != null; 85 bool hasText = !string.IsNullOrEmpty(Model.Item?.GetItem("Paragraph_Text")?.GetString("Text")); 86 bool hasLead = !string.IsNullOrEmpty(Model.Item?.GetItem("Paragraph_Text")?.GetString("Lead")); 87 bool hasHeading = headings.Any(); 88 bool hasButton = buttons.Any(); 89 90 var theme = Model.Item.GetItem("ColorScheme")?.GetString("ColorScheme"); 91 var fifthElementTheme = "fifth-element-color-" + Model.Item?.GetItem("ColorScheme")?.GetString("FifthElementColor"); 92 93 var sectionClassList = GetSectionClassList(Model); 94 95 var image = string.Empty; 96 var imageParameters = new Dictionary<string, object>(); 97 98 string layout = string.Empty; 99 Boolean enableFifthElement = false; 100 if (Model?.Item != null) 101 { 102 var paragraphLayout = Model.Item.GetItem("Paragraph_Layout"); 103 104 if (paragraphLayout != null) 105 { 106 layout = paragraphLayout.GetString("Layout"); 107 108 enableFifthElement = !string.IsNullOrEmpty(paragraphLayout.GetString("Layout_FifthElement")); 109 } 110 } 111 112 if (!string.IsNullOrEmpty(Model.Item?.GetItem("Paragraph_Image")?.GetFile("Image")?.Path)) 113 { 114 image = Model.Item.GetItem("Paragraph_Image").GetFile("Image").Path; 115 imageParameters.Add("alt", Model.Item.GetItem("Paragraph_Image")?.GetString("ImageAltText")); 116 int xPos = Model.Item.GetItem("Paragraph_Image").GetFile("Image")?.FocalPositionFromLeft ?? 50; 117 int yPos = Model.Item.GetItem("Paragraph_Image").GetFile("Image")?.FocalPositionFromTop ?? 50; 118 string cssPosition = $"{xPos}% {yPos}%"; 119 imageParameters.Add("style", "object-position:" + cssPosition); 120 } 121 122 LinkViewModel imageLink = new LinkViewModel(); 123 if (Model.Item?.GetItem("Paragraph_Image")?.GetItem("Link") != null && !string.IsNullOrEmpty(Model?.Item?.GetItem("Paragraph_Image")?.GetItem("Link").GetString("ButtonLink"))) 124 { 125 imageLink = ParagraphService.Instance.GetLinkByItem(Model?.Item?.GetItem("Paragraph_Image")?.GetItem("Link")); 126 } 127 128 string fifthElementIconPath = "/Files/Templates/Designs/Swift/Assets/Images/DalgasFifthElements/"; 129 } 130 131 132 @{ 133 } 134 135 <section id="section-@Model.Id" class="@sectionClassList" data-swift-gridrow> 136 <div class=""> 137 138 @if (!string.IsNullOrEmpty(Model.Item.GetItem("Content").GetString("Table"))) 139 { 140 <div class="container-xl"> 141 <div class="row"> 142 <div class="col-12 col-lg-10 mx-auto"> 143 <div class="row"> 144 145 <div class="col-12"> 146 147 @if (!string.IsNullOrEmpty(Model.Item.GetItem("Content").GetString("Header"))) 148 { 149 <h2 class="mb-4">@Model.Item.GetItem("Content").GetString("Header")</h2> 150 } 151 152 <div class="table-responsive"> 153 @Model.Item.GetItem("Content").GetString("Table") 154 </div> 155 </div> 156 </div> 157 </div> 158 </div> 159 </div> 160 } 161 else 162 { 163 if (Pageview.IsVisualEditorMode) 164 { 165 <div class="container-xl alert alert-danger" role="alert"> 166 This <strong>@Model.Item.SystemName</strong> is empty 167 </div> 168 } 169 } 170 </div> 171 </section> 172
Error executing template "/Designs/Swift/Grid/Page/RowTemplates/Dalgas_Table.cshtml"
System.IO.IOException: There is not enough space on the disk.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.FileStream.FlushWrite(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at System.IO.StreamWriter.Dispose(Boolean disposing)
   at System.IO.TextWriter.Dispose()
   at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
   at RazorEngine.Roslyn.CSharp.RoslynCompilerServiceBase.CompileType(TypeContext context)
   at RazorEngine.Templating.RazorEngineCore.CreateTemplateType(ITemplateSource razorTemplate, Type modelType)
   at RazorEngine.Templating.RazorEngineCore.Compile(ITemplateKey key, Type modelType)
   at RazorEngine.Templating.RazorEngineService.CompileAndCacheInternal(ITemplateKey key, Type modelType)
   at RazorEngine.Templating.RazorEngineService.GetCompiledTemplate(ITemplateKey key, Type modelType, Boolean compileOnCacheMiss)
   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 @using System 2 @using System.Collections.Generic 3 @using System.Linq 4 @using Dynamicweb.Content 5 @using Dynamicweb.Frontend 6 @using Dalgas.Custom.Services 7 @using Dynamicweb.Core.Json 8 @using Dynamicweb.Ecommerce.ProductCatalog 9 @using Dynamicweb.Indexing.Querying 10 @using Dynamicweb.Indexing.Querying.Faceting 11 @using Dynamicweb.Indexing.Querying.Sorting 12 @using Dynamicweb.Modules 13 @using ParagraphService = Dalgas.Custom.Services.ParagraphService 14 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.GridRowViewModel> 15 16 @using System 17 @using System.Collections.Generic 18 @using System.Linq 19 @using Dalgas.Custom.ViewModels.UI 20 @using Dynamicweb.Content 21 @using Dynamicweb.Ecommerce.ProductCatalog 22 @using Dynamicweb.Frontend 23 @using ParagraphService = Dalgas.Custom.Services.ParagraphService 24 25 @*TODO: Move these functions onto the model *@ 26 27 @functions 28 { 29 30 public string GetSectionClassList(GridRowViewModel model, string overwriteTheme = "") 31 { 32 var returnValues = new List<string> 33 { 34 $"item_{model.Item.SystemName.ToLower()}" 35 }; 36 37 if (Services.Grids.GetGridRowById(model.Id).Sort == 1) 38 { 39 returnValues.Add("dalgas-section-first-on-page"); 40 } 41 42 var sectionBackgroundTheme = model.Item.GetItem("ColorScheme")?.GetString("ColorScheme") ?? string.Empty; 43 44 if (!string.IsNullOrEmpty(overwriteTheme)) 45 { 46 sectionBackgroundTheme = overwriteTheme; 47 } 48 49 // Add theme class if it exists 50 if (!string.IsNullOrWhiteSpace(sectionBackgroundTheme)) 51 { 52 if (sectionBackgroundTheme.Contains("default")) 53 { 54 returnValues.Add("theme theme-light"); 55 } 56 else 57 { 58 returnValues.Add($"theme {sectionBackgroundTheme.Replace(" ", "").Trim().ToLower()}"); 59 } 60 } 61 62 // Determine if top padding should be removed 63 64 string removeTopPadding = model.Item.GetItem("ColorScheme")?.GetString("RemoveTopPadding"); 65 66 returnValues.Add("pb-6"); 67 if (removeTopPadding != "enable") 68 { 69 returnValues.Add("pt-6"); 70 } 71 72 return string.Join(" ", returnValues); 73 } 74 75 } 76 77 78 @{ 79 IEnumerable<HeadingViewModel> headings = ParagraphService.Instance.GetHeadingsByItems(Model.Item?.GetItem("Paragraph_Text")?.GetItems("Headings")); 80 string text = Model.Item.GetItem("Paragraph_Text")?.GetString("Text"); 81 string lead = Model.Item.GetItem("Paragraph_Text")?.GetString("Lead"); 82 IEnumerable<ButtonViewModel> buttons = ParagraphService.Instance.GetButtonsByItems(Model.Item?.GetItem("Paragraph_Text")?.GetItems("Buttons")); 83 84 bool hasImage = Model.Item.GetItem("Paragraph_Image")?.GetFile("Image") != null; 85 bool hasText = !string.IsNullOrEmpty(Model.Item?.GetItem("Paragraph_Text")?.GetString("Text")); 86 bool hasLead = !string.IsNullOrEmpty(Model.Item?.GetItem("Paragraph_Text")?.GetString("Lead")); 87 bool hasHeading = headings.Any(); 88 bool hasButton = buttons.Any(); 89 90 var theme = Model.Item.GetItem("ColorScheme")?.GetString("ColorScheme"); 91 var fifthElementTheme = "fifth-element-color-" + Model.Item?.GetItem("ColorScheme")?.GetString("FifthElementColor"); 92 93 var sectionClassList = GetSectionClassList(Model); 94 95 var image = string.Empty; 96 var imageParameters = new Dictionary<string, object>(); 97 98 string layout = string.Empty; 99 Boolean enableFifthElement = false; 100 if (Model?.Item != null) 101 { 102 var paragraphLayout = Model.Item.GetItem("Paragraph_Layout"); 103 104 if (paragraphLayout != null) 105 { 106 layout = paragraphLayout.GetString("Layout"); 107 108 enableFifthElement = !string.IsNullOrEmpty(paragraphLayout.GetString("Layout_FifthElement")); 109 } 110 } 111 112 if (!string.IsNullOrEmpty(Model.Item?.GetItem("Paragraph_Image")?.GetFile("Image")?.Path)) 113 { 114 image = Model.Item.GetItem("Paragraph_Image").GetFile("Image").Path; 115 imageParameters.Add("alt", Model.Item.GetItem("Paragraph_Image")?.GetString("ImageAltText")); 116 int xPos = Model.Item.GetItem("Paragraph_Image").GetFile("Image")?.FocalPositionFromLeft ?? 50; 117 int yPos = Model.Item.GetItem("Paragraph_Image").GetFile("Image")?.FocalPositionFromTop ?? 50; 118 string cssPosition = $"{xPos}% {yPos}%"; 119 imageParameters.Add("style", "object-position:" + cssPosition); 120 } 121 122 LinkViewModel imageLink = new LinkViewModel(); 123 if (Model.Item?.GetItem("Paragraph_Image")?.GetItem("Link") != null && !string.IsNullOrEmpty(Model?.Item?.GetItem("Paragraph_Image")?.GetItem("Link").GetString("ButtonLink"))) 124 { 125 imageLink = ParagraphService.Instance.GetLinkByItem(Model?.Item?.GetItem("Paragraph_Image")?.GetItem("Link")); 126 } 127 128 string fifthElementIconPath = "/Files/Templates/Designs/Swift/Assets/Images/DalgasFifthElements/"; 129 } 130 131 132 @{ 133 } 134 135 <section id="section-@Model.Id" class="@sectionClassList" data-swift-gridrow> 136 <div class=""> 137 138 @if (!string.IsNullOrEmpty(Model.Item.GetItem("Content").GetString("Table"))) 139 { 140 <div class="container-xl"> 141 <div class="row"> 142 <div class="col-12 col-lg-10 mx-auto"> 143 <div class="row"> 144 145 <div class="col-12"> 146 147 @if (!string.IsNullOrEmpty(Model.Item.GetItem("Content").GetString("Header"))) 148 { 149 <h2 class="mb-4">@Model.Item.GetItem("Content").GetString("Header")</h2> 150 } 151 152 <div class="table-responsive"> 153 @Model.Item.GetItem("Content").GetString("Table") 154 </div> 155 </div> 156 </div> 157 </div> 158 </div> 159 </div> 160 } 161 else 162 { 163 if (Pageview.IsVisualEditorMode) 164 { 165 <div class="container-xl alert alert-danger" role="alert"> 166 This <strong>@Model.Item.SystemName</strong> is empty 167 </div> 168 } 169 } 170 </div> 171 </section> 172
Error executing template "/Designs/Swift/Grid/Page/RowTemplates/Dalgas_Table.cshtml"
System.IO.IOException: There is not enough space on the disk.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.FileStream.FlushWrite(Boolean calledFromFinalizer)
   at System.IO.FileStream.Dispose(Boolean disposing)
   at System.IO.Stream.Close()
   at System.IO.StreamWriter.Dispose(Boolean disposing)
   at System.IO.TextWriter.Dispose()
   at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
   at RazorEngine.Roslyn.CSharp.RoslynCompilerServiceBase.CompileType(TypeContext context)
   at RazorEngine.Templating.RazorEngineCore.CreateTemplateType(ITemplateSource razorTemplate, Type modelType)
   at RazorEngine.Templating.RazorEngineCore.Compile(ITemplateKey key, Type modelType)
   at RazorEngine.Templating.RazorEngineService.CompileAndCacheInternal(ITemplateKey key, Type modelType)
   at RazorEngine.Templating.RazorEngineService.GetCompiledTemplate(ITemplateKey key, Type modelType, Boolean compileOnCacheMiss)
   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 @using System 2 @using System.Collections.Generic 3 @using System.Linq 4 @using Dynamicweb.Content 5 @using Dynamicweb.Frontend 6 @using Dalgas.Custom.Services 7 @using Dynamicweb.Core.Json 8 @using Dynamicweb.Ecommerce.ProductCatalog 9 @using Dynamicweb.Indexing.Querying 10 @using Dynamicweb.Indexing.Querying.Faceting 11 @using Dynamicweb.Indexing.Querying.Sorting 12 @using Dynamicweb.Modules 13 @using ParagraphService = Dalgas.Custom.Services.ParagraphService 14 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.GridRowViewModel> 15 16 @using System 17 @using System.Collections.Generic 18 @using System.Linq 19 @using Dalgas.Custom.ViewModels.UI 20 @using Dynamicweb.Content 21 @using Dynamicweb.Ecommerce.ProductCatalog 22 @using Dynamicweb.Frontend 23 @using ParagraphService = Dalgas.Custom.Services.ParagraphService 24 25 @*TODO: Move these functions onto the model *@ 26 27 @functions 28 { 29 30 public string GetSectionClassList(GridRowViewModel model, string overwriteTheme = "") 31 { 32 var returnValues = new List<string> 33 { 34 $"item_{model.Item.SystemName.ToLower()}" 35 }; 36 37 if (Services.Grids.GetGridRowById(model.Id).Sort == 1) 38 { 39 returnValues.Add("dalgas-section-first-on-page"); 40 } 41 42 var sectionBackgroundTheme = model.Item.GetItem("ColorScheme")?.GetString("ColorScheme") ?? string.Empty; 43 44 if (!string.IsNullOrEmpty(overwriteTheme)) 45 { 46 sectionBackgroundTheme = overwriteTheme; 47 } 48 49 // Add theme class if it exists 50 if (!string.IsNullOrWhiteSpace(sectionBackgroundTheme)) 51 { 52 if (sectionBackgroundTheme.Contains("default")) 53 { 54 returnValues.Add("theme theme-light"); 55 } 56 else 57 { 58 returnValues.Add($"theme {sectionBackgroundTheme.Replace(" ", "").Trim().ToLower()}"); 59 } 60 } 61 62 // Determine if top padding should be removed 63 64 string removeTopPadding = model.Item.GetItem("ColorScheme")?.GetString("RemoveTopPadding"); 65 66 returnValues.Add("pb-6"); 67 if (removeTopPadding != "enable") 68 { 69 returnValues.Add("pt-6"); 70 } 71 72 return string.Join(" ", returnValues); 73 } 74 75 } 76 77 78 @{ 79 IEnumerable<HeadingViewModel> headings = ParagraphService.Instance.GetHeadingsByItems(Model.Item?.GetItem("Paragraph_Text")?.GetItems("Headings")); 80 string text = Model.Item.GetItem("Paragraph_Text")?.GetString("Text"); 81 string lead = Model.Item.GetItem("Paragraph_Text")?.GetString("Lead"); 82 IEnumerable<ButtonViewModel> buttons = ParagraphService.Instance.GetButtonsByItems(Model.Item?.GetItem("Paragraph_Text")?.GetItems("Buttons")); 83 84 bool hasImage = Model.Item.GetItem("Paragraph_Image")?.GetFile("Image") != null; 85 bool hasText = !string.IsNullOrEmpty(Model.Item?.GetItem("Paragraph_Text")?.GetString("Text")); 86 bool hasLead = !string.IsNullOrEmpty(Model.Item?.GetItem("Paragraph_Text")?.GetString("Lead")); 87 bool hasHeading = headings.Any(); 88 bool hasButton = buttons.Any(); 89 90 var theme = Model.Item.GetItem("ColorScheme")?.GetString("ColorScheme"); 91 var fifthElementTheme = "fifth-element-color-" + Model.Item?.GetItem("ColorScheme")?.GetString("FifthElementColor"); 92 93 var sectionClassList = GetSectionClassList(Model); 94 95 var image = string.Empty; 96 var imageParameters = new Dictionary<string, object>(); 97 98 string layout = string.Empty; 99 Boolean enableFifthElement = false; 100 if (Model?.Item != null) 101 { 102 var paragraphLayout = Model.Item.GetItem("Paragraph_Layout"); 103 104 if (paragraphLayout != null) 105 { 106 layout = paragraphLayout.GetString("Layout"); 107 108 enableFifthElement = !string.IsNullOrEmpty(paragraphLayout.GetString("Layout_FifthElement")); 109 } 110 } 111 112 if (!string.IsNullOrEmpty(Model.Item?.GetItem("Paragraph_Image")?.GetFile("Image")?.Path)) 113 { 114 image = Model.Item.GetItem("Paragraph_Image").GetFile("Image").Path; 115 imageParameters.Add("alt", Model.Item.GetItem("Paragraph_Image")?.GetString("ImageAltText")); 116 int xPos = Model.Item.GetItem("Paragraph_Image").GetFile("Image")?.FocalPositionFromLeft ?? 50; 117 int yPos = Model.Item.GetItem("Paragraph_Image").GetFile("Image")?.FocalPositionFromTop ?? 50; 118 string cssPosition = $"{xPos}% {yPos}%"; 119 imageParameters.Add("style", "object-position:" + cssPosition); 120 } 121 122 LinkViewModel imageLink = new LinkViewModel(); 123 if (Model.Item?.GetItem("Paragraph_Image")?.GetItem("Link") != null && !string.IsNullOrEmpty(Model?.Item?.GetItem("Paragraph_Image")?.GetItem("Link").GetString("ButtonLink"))) 124 { 125 imageLink = ParagraphService.Instance.GetLinkByItem(Model?.Item?.GetItem("Paragraph_Image")?.GetItem("Link")); 126 } 127 128 string fifthElementIconPath = "/Files/Templates/Designs/Swift/Assets/Images/DalgasFifthElements/"; 129 } 130 131 132 @{ 133 } 134 135 <section id="section-@Model.Id" class="@sectionClassList" data-swift-gridrow> 136 <div class=""> 137 138 @if (!string.IsNullOrEmpty(Model.Item.GetItem("Content").GetString("Table"))) 139 { 140 <div class="container-xl"> 141 <div class="row"> 142 <div class="col-12 col-lg-10 mx-auto"> 143 <div class="row"> 144 145 <div class="col-12"> 146 147 @if (!string.IsNullOrEmpty(Model.Item.GetItem("Content").GetString("Header"))) 148 { 149 <h2 class="mb-4">@Model.Item.GetItem("Content").GetString("Header")</h2> 150 } 151 152 <div class="table-responsive"> 153 @Model.Item.GetItem("Content").GetString("Table") 154 </div> 155 </div> 156 </div> 157 </div> 158 </div> 159 </div> 160 } 161 else 162 { 163 if (Pageview.IsVisualEditorMode) 164 { 165 <div class="container-xl alert alert-danger" role="alert"> 166 This <strong>@Model.Item.SystemName</strong> is empty 167 </div> 168 } 169 } 170 </div> 171 </section> 172

No products in cart