Error executing template "Designs/TwenteBranding/Paragraph/HeaderImage.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_762683e15fe04a2c80df337cb04af793.Execute() in D:\inetpub\wwwroot\www.twente.com\Files\Templates\Designs\TwenteBranding\Paragraph\HeaderImage.cshtml:line 5
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.b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @{ 3 var title = Model.Item.GetString("Title"); 4 var introduction = Model.Item.GetString("Introduction"); 5 var image = Model.Item.GetFile("Image").Path; 6 image = $"/Admin/Public/GetImage.ashx?Image={image}&Format=webp&Width=1920&Height=-1&Quality=100&Crop=0&t=2"; 7 8 var buttonText = Model.Item.GetString("ButtonText"); 9 var buttonUrl = Model.Item.GetString("ButtonUrl"); 10 var buttonStyle = Model.Item.GetList("ButtonStyle").SelectedValue; 11 var target = Model.Item.GetString("LinkTarget"); 12 var paragraphId = string.Format("par-{0}", Model.ID); 13 14 <div class="page-title--without-flag header-image-paragraph lazy" data-src="@image"> 15 <div class="container"> 16 <div class="header-content grid cols-2-1"> 17 <div> 18 <div class="title"> 19 <a name="@paragraphId" class="jump-to-anchor"></a> 20 <h1 class="font-color--white">@title</h1> 21 @if (!string.IsNullOrWhiteSpace(introduction)) 22 { 23 <div class="sub-header font-color--white d-none d-md-block">@introduction</div> 24 } 25 </div> 26 @if (!string.IsNullOrWhiteSpace(buttonText) && !string.IsNullOrWhiteSpace(buttonUrl)) 27 { 28 <div class="d-none d-md-block"> 29 <a class="button @buttonStyle" target="@target" href="@buttonUrl">@buttonText</a> 30 </div> 31 } 32 </div> 33 </div> 34 </div> 35 </div> 36 <div class="header-image-paragraph header-text-mobile container d-md-none"> 37 <div> 38 @if (!string.IsNullOrWhiteSpace(introduction)) 39 { 40 <div class="sub-header font-color--black">@introduction</div> 41 } 42 </div> 43 @if (!string.IsNullOrWhiteSpace(buttonText) && !string.IsNullOrWhiteSpace(buttonUrl)) 44 { 45 <div> 46 <a class="button red" href="@buttonUrl" target="@target">@buttonText</a> 47 </div> 48 } 49 </div> 50 }

Sustainable climate

In Twente, there is a lot of space for nature and the environment. Because of our beautiful landscape, we are constantly reminded that we must handle it with care. Much attention is therefore paid to smart solutions to sustainably deal with energy and to save the climate as much as possible. We must use natural resources, but we must also protect them if we are to ensure a sustainable future. Some basic questions remain:

 

Can the world switch to only using energy generated from the sun, wind and biomass?

 

  • In what timeframe can our techniques transition to using purely sustainable energy sources?
  • Do we have sufficient knowledge to transition to sustainable energy?
  • Important as well: can society afford it?

 

continue reading after 'the deepening'

 

Sustainability calls for smart solutions

We get our cleanest energy from the wind and the sun, and therefore we should utilize these sustainable sources. To meet the huge energy demand, we need science, high tech and mother nature. In Twente, investments are being made on a large scale in smart solutions to produce and save energy for the future. To achieve that ambition, we must significantly increase the production of green energy. In Twente, there are various local entrepreneurs, multinationals and private individuals who contribute.