Hedeselskabets historie

I 1866 tog en gruppe fremsynede mænd, med Enrico Mylius Dalgas i spidsen, et initiativ, der skulle få stor betydning for udviklingen af det danske samfund, som vi kender det i dag. Her på siden kan du læse om Hedeselskabets udvikling gennem mere end 150 år.

Error executing template "/Designs/Swift/Grid/Page/RowTemplates/Dalgas_Process.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 Dalgas.Custom.ViewModels.UI 8 @using Dynamicweb.Core.Json 9 @using Dynamicweb.Ecommerce.ProductCatalog 10 @using Dynamicweb.Indexing.Querying 11 @using Dynamicweb.Indexing.Querying.Faceting 12 @using Dynamicweb.Indexing.Querying.Sorting 13 @using Dynamicweb.Modules 14 @using ParagraphService = Dalgas.Custom.Services.ParagraphService 15 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.GridRowViewModel> 16 17 @using System 18 @using System.Collections.Generic 19 @using System.Linq 20 @using Dalgas.Custom.ViewModels.UI 21 @using Dynamicweb.Content 22 @using Dynamicweb.Ecommerce.ProductCatalog 23 @using Dynamicweb.Frontend 24 @using ParagraphService = Dalgas.Custom.Services.ParagraphService 25 26 @*TODO: Move these functions onto the model *@ 27 28 @functions 29 { 30 31 public string GetSectionClassList(GridRowViewModel model, string overwriteTheme = "") 32 { 33 var returnValues = new List<string> 34 { 35 $"item_{model.Item.SystemName.ToLower()}" 36 }; 37 38 if (Services.Grids.GetGridRowById(model.Id).Sort == 1) 39 { 40 returnValues.Add("dalgas-section-first-on-page"); 41 } 42 43 var sectionBackgroundTheme = model.Item.GetItem("ColorScheme")?.GetString("ColorScheme") ?? string.Empty; 44 45 if (!string.IsNullOrEmpty(overwriteTheme)) 46 { 47 sectionBackgroundTheme = overwriteTheme; 48 } 49 50 // Add theme class if it exists 51 if (!string.IsNullOrWhiteSpace(sectionBackgroundTheme)) 52 { 53 if (sectionBackgroundTheme.Contains("default")) 54 { 55 returnValues.Add("theme theme-light"); 56 } 57 else 58 { 59 returnValues.Add($"theme {sectionBackgroundTheme.Replace(" ", "").Trim().ToLower()}"); 60 } 61 } 62 63 // Determine if top padding should be removed 64 65 string removeTopPadding = model.Item.GetItem("ColorScheme")?.GetString("RemoveTopPadding"); 66 67 returnValues.Add("pb-6"); 68 if (removeTopPadding != "enable") 69 { 70 returnValues.Add("pt-6"); 71 } 72 73 return string.Join(" ", returnValues); 74 } 75 76 } 77 78 79 @{ 80 IEnumerable<HeadingViewModel> headings = ParagraphService.Instance.GetHeadingsByItems(Model.Item?.GetItem("Paragraph_Text")?.GetItems("Headings")); 81 string text = Model.Item.GetItem("Paragraph_Text")?.GetString("Text"); 82 string lead = Model.Item.GetItem("Paragraph_Text")?.GetString("Lead"); 83 IEnumerable<ButtonViewModel> buttons = ParagraphService.Instance.GetButtonsByItems(Model.Item?.GetItem("Paragraph_Text")?.GetItems("Buttons")); 84 85 bool hasImage = Model.Item.GetItem("Paragraph_Image")?.GetFile("Image") != null; 86 bool hasText = !string.IsNullOrEmpty(Model.Item?.GetItem("Paragraph_Text")?.GetString("Text")); 87 bool hasLead = !string.IsNullOrEmpty(Model.Item?.GetItem("Paragraph_Text")?.GetString("Lead")); 88 bool hasHeading = headings.Any(); 89 bool hasButton = buttons.Any(); 90 91 var theme = Model.Item.GetItem("ColorScheme")?.GetString("ColorScheme"); 92 var fifthElementTheme = "fifth-element-color-" + Model.Item?.GetItem("ColorScheme")?.GetString("FifthElementColor"); 93 94 var sectionClassList = GetSectionClassList(Model); 95 96 var image = string.Empty; 97 var imageParameters = new Dictionary<string, object>(); 98 99 string layout = string.Empty; 100 Boolean enableFifthElement = false; 101 if (Model?.Item != null) 102 { 103 var paragraphLayout = Model.Item.GetItem("Paragraph_Layout"); 104 105 if (paragraphLayout != null) 106 { 107 layout = paragraphLayout.GetString("Layout"); 108 109 enableFifthElement = !string.IsNullOrEmpty(paragraphLayout.GetString("Layout_FifthElement")); 110 } 111 } 112 113 if (!string.IsNullOrEmpty(Model.Item?.GetItem("Paragraph_Image")?.GetFile("Image")?.Path)) 114 { 115 image = Model.Item.GetItem("Paragraph_Image").GetFile("Image").Path; 116 imageParameters.Add("alt", Model.Item.GetItem("Paragraph_Image")?.GetString("ImageAltText")); 117 int xPos = Model.Item.GetItem("Paragraph_Image").GetFile("Image")?.FocalPositionFromLeft ?? 50; 118 int yPos = Model.Item.GetItem("Paragraph_Image").GetFile("Image")?.FocalPositionFromTop ?? 50; 119 string cssPosition = $"{xPos}% {yPos}%"; 120 imageParameters.Add("style", "object-position:" + cssPosition); 121 } 122 123 LinkViewModel imageLink = new LinkViewModel(); 124 if (Model.Item?.GetItem("Paragraph_Image")?.GetItem("Link") != null && !string.IsNullOrEmpty(Model?.Item?.GetItem("Paragraph_Image")?.GetItem("Link").GetString("ButtonLink"))) 125 { 126 imageLink = ParagraphService.Instance.GetLinkByItem(Model?.Item?.GetItem("Paragraph_Image")?.GetItem("Link")); 127 } 128 129 string fifthElementIconPath = "/Files/Templates/Designs/Swift/Assets/Images/DalgasFifthElements/"; 130 } 131 132 133 @{ 134 // Prepare a list of items with both heading and text 135 var contentList = new List<(string Heading, string Text, IEnumerable<ButtonViewModel> Buttons, string Image, string anchorLink)>(); 136 137 // Only loop through processItems once to populate the contentList 138 IList<ItemViewModel> processItems = Model.Item?.GetItem("Content")?.GetItems("ContentType") ?? Enumerable.Empty<ItemViewModel>().ToList(); 139 140 foreach (var item in processItems) 141 { 142 string itemHeading = item.GetRawValueString("Heading"); 143 string itemAnchorLink = System.Text.RegularExpressions.Regex 144 .Replace(itemHeading.ToLower(), "[^a-zA-Z0-9æøåÆØÅ]", "-") 145 .Trim('-'); 146 147 // Ensure the ID starts with a valid letter 148 if (char.IsDigit(itemAnchorLink[0])) 149 { 150 itemAnchorLink = "id-" + itemAnchorLink; 151 } 152 153 string itemText = item.GetRawValueString("Text"); 154 IEnumerable<ButtonViewModel> itemButtons = ParagraphService.Instance.GetButtonsByItems(item.GetItems("Buttons")); 155 string itemImage = item.GetRawValueString("Image"); 156 contentList.Add((itemHeading, itemText, itemButtons, itemImage, itemAnchorLink)); 157 } 158 159 ClassList rowClassList = new ClassList("justify-content-between"); 160 string headingSize = "h2"; 161 162 bool showNumbers = Model.Item.GetItem("Content").GetBoolean("ShowNumbers"); 163 } 164 165 <section id="section-@Model.Id" class="@sectionClassList dalgas-process-container js-dalgas-process-container" data-swift-gridrow> 166 <div class=""> 167 168 @if (processItems.Count > 0) 169 { 170 string currentPageUrl = PageView.Current().SearchFriendlyUrl; 171 172 <div class="container-xl"> 173 <div class="row"> 174 <div class="col-12"> 175 <div class="row @rowClassList"> 176 177 <!-- Scrollspy Navigation for Desktop --> 178 <div class="col-12 col-lg-4 d-none d-lg-block"> 179 180 <div class="scrollspy-navigation mb-5" id="scroll-spy-@Model.Id"> 181 <h2 class="mb-5">@Model.Item.GetItem("Content").GetString("Heading")</h2> 182 183 <p class="lead mb-5">@Model.Item.GetItem("Content").GetRawValueString("Introduction")</p> 184 185 @for (int i = 0; i < contentList.Count; i++) 186 { 187 string count = i + 1 + "." + "&nbsp;"; 188 <a class="list-group-item mb-0 d-flex" href="#@contentList[i].anchorLink"> 189 @if (showNumbers) 190 { 191 <span> 192 <span class="h4">@count</span> 193 </span> 194 } 195 <span class="d-flex align-items-center"> 196 <p class="h4">@contentList[i].Heading</p> 197 </span> 198 </a> 199 } 200 </div> 201 </div> 202 203 <!-- Accordion for mobile --> 204 <div class="col-12 col-lg-7 offset-lg-1 d-lg-none item_dalgas_accordion"> 205 <h2 class="mb-5">@Model.Item.GetItem("Content").GetString("Heading")</h2> 206 <div class="accordion accordion-flush" id="accordion-@Model.Id"> 207 @for (int i = 0; i < contentList.Count; i++) 208 { 209 var item = contentList[i]; 210 string count = i + 1 + "." + "&nbsp;"; 211 <div class="accordion-item"> 212 <h4 class="accordion-header" id="heading-@Model.Id-@i"> 213 <button class="accordion-button collapsed h4 m-0 px-0 py-3 my-3" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-@Model.Id-@i" aria-expanded="false" aria-controls="collapse-@Model.Id-@i" style="box-shadow: none"> 214 @if (showNumbers) 215 { 216 <span> 217 @count 218 </span> 219 } 220 <span class="d-flex align-items-center">@contentList[i].Heading</span> 221 </button> 222 </h4> 223 224 <div id="collapse-@Model.Id-@i" class="accordion-collapse collapse" aria-labelledby="heading-@Model.Id-@i" data-bs-parent="#accordion-@Model.Id"> 225 <div class="accordion-body px-0 pb-4 pt-0 mb-0-last-child"> 226 <div> 227 @item.Text 228 </div> 229 230 @if (item.Buttons.Any()) 231 { 232 <div class="d-flex flex-wrap gap-3 mb-4"> 233 @string.Join("", item.Buttons.Select(h => h.ToString())) 234 </div> 235 } 236 237 @if (!string.IsNullOrEmpty(item.Image)) 238 { 239 <figure class="d-flex flex-column pt-3"> 240 @RenderPartial("Components/Image.cshtml", new FileViewModel {Path = item.Image}) 241 </figure> 242 } 243 </div> 244 </div> 245 </div> 246 } 247 </div> 248 </div> 249 250 <!-- Scrollspy Content for desktop --> 251 <div class="col-12 col-lg-7 offset-lg-1 d-none d-lg-block"> 252 <div id="scrollspy-content" class="scrollspy-content" tabindex="0"> 253 @for (int i = 0; i < contentList.Count; i++) 254 { 255 var contentListImageParameters = new Dictionary<string, object> 256 { 257 {"cssClass", "mw-100"} 258 }; 259 260 string count = i + 1 + "." + "&nbsp;"; 261 <div id="@contentList[i].anchorLink" class="scrollspy-item d-flex p-5 mb-5"> 262 263 <div> 264 <h3> 265 @if (showNumbers) 266 { @count }@contentList[i].Heading 267 </h3> 268 <p>@contentList[i].Text</p> 269 270 @if (contentList[i].Buttons.Any()) 271 { 272 <div class="d-flex flex-wrap gap-3 mb-4"> 273 @string.Join("", contentList[i].Buttons.Select(h => h.ToString())) 274 </div> 275 } 276 277 @if (!string.IsNullOrEmpty(contentList[i].Image)) 278 { 279 <figure class="d-flex flex-column flex-wrap pt-3"> 280 @RenderPartial("Components/Image.cshtml", new FileViewModel {Path = contentList[i].Image}, contentListImageParameters) 281 </figure> 282 } 283 </div> 284 </div> 285 } 286 </div> 287 </div> 288 </div> 289 </div> 290 </div> 291 </div> 292 293 <script> 294 document.addEventListener("DOMContentLoaded", function() { 295 if (document.querySelector('.js-dalgas-process-container')) { 296 document.documentElement.classList.add('has-dalgas-process'); 297 } 298 }); 299 var scrollSpy = new bootstrap.ScrollSpy(document.body, { 300 target: '#scroll-spy-@Model.Id', 301 offset: 300 302 }); 303 </script> 304 } 305 else 306 { 307 if (Pageview.IsVisualEditorMode) 308 { 309 <div class="container-xl alert alert-danger" role="alert"> 310 This <strong>@Model.Item.SystemName</strong> is empty 311 </div> 312 } 313 } 314 </div> 315 </section> 316

Kort om Enrico Mylius Dalgas

  • Født i 1828 og død i 1894
  • Medstifter af Det danske Hedeselskab i 1866 og selskabets første direktør
  • Havde titel som oberstløjtnant og deltog i krigene 1848-1850 og 1864
  • Arbejdede som overvejsinspektør i Århus sideløbende med sin stilling i hæren
  • Udførte sit arbejde i Hedeselskabet gratis og hans faste ansættelser gav ham erfaring og viden om bl.a. vejanlæg, jordbundsundersøgelser og gennemskæringer
  • Flittig forfatter med over 1000 sider fordelt på bøger, pjecer og artikler
  • Efterkommer af en af de franske Hugenot-familier der flygtede i 1685
  • Enrico’s bedstefar var præst ved den reformerte kirke i Fredericia

Kongenshus

Gå på opdagelse i et af landets største sammenhængende hedearealer, hvor du kan fornemme noget af tidligere tiders ødemark med vidt udsyn til alle sider.

No products in cart