Error executing template "Designs/smv/_parsed/page.parsed.cshtml"
System.ArgumentOutOfRangeException: StartIndex cannot be less than zero.
Parameter name: startIndex
   at System.String.Substring(Int32 startIndex, Int32 length)
   at CompiledRazorTemplates.Dynamic.RazorEngine_37d261f6687643609243ad43f3b02e07.Execute() in D:\dynamicweb.net\Solutions\Campfireogco\smv2019.cloud.dynamicweb-cms.com\files\Templates\Designs\smv\_parsed\page.parsed.cshtml:line 241
   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 <html lang="en" ng-app="smv"> 2 <head> 3 <title>@GetValue("Title")</title> 4 @GetValue("MetaTags") 5 @GetValue("CopyRightNotice") 6 7 <meta charset="utf-8"> 8 <meta http-equiv="X-UA-Compatible" content="IE=11"> 9 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 10 <link rel="icon" href="/Files/Templates/Designs/smv/favicon.ico" type="image/x-icon"> 11 <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400i,500,600,700,700i" rel="stylesheet"> 12 <link rel="stylesheet" href="/Files/Templates/Designs/smv/assets/scss/style.css?v=2.8"> 13 <link rel="stylesheet" href="/Files/Templates/Designs/smv/assets/scss/lp.css"> 14 <script src="/Files/Templates/Designs/smv/assets/js/plugins/jquery-3.3.1.js"></script> 15 <script src="/Files/Templates/Designs/smv/assets/js/plugins/jquery.ui.js"></script> 16 <script src="/Files/Templates/Designs/smv/assets/js/script-min.js?v=1.4"></script> 17 <script src="/Files/Templates/Designs/smv/assets/js/includes/MyFontsWebfontsKit.js"></script> 18 <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.7/angular.min.js"></script> 19 <script src="/Files/Templates/Designs/smv/assets/js/controller-min.js"></script> 20 21 <!--[if lt IE 9]> 22 <script src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script> 23 <![endif]--> 24 @{ 25 var OGTitle = GetString("Item.OGOverskrift"); 26 var webpageurl = GetGlobalValue("Global:Request.Host"); 27 var OGImage = GetString("Item.OGBillede.Value"); 28 var OGDescription = GetString("Item.OGBeskrivelse"); 29 var OG_focal = GetString("Item.OGBillede.FocalPointParameters"); 30 31 if(@OGTitle==""){ 32 OGTitle = GetString("Item.Titel"); 33 } 34 if(@OGDescription==""){ 35 OGDescription = GetString("Item.Manchet"); 36 } 37 if(GetString("Item.OGBillede.Value")==""){ 38 OGImage = GetString("Item.HeroBillede.Value"); 39 OG_focal = GetString("Item.HeroBillede.FocalPointParameters"); 40 } 41 42 var OGimgurl = "http://"+webpageurl+"/Admin/Public/GetImage.ashx?Image="+ OGImage + "&Format=jpg&Width=1200&height=628&crop=5&"+ OG_focal; 43 var TWimgurl = "http://"+webpageurl+"/Admin/Public/GetImage.ashx?Image="+ OGImage + "&Format=jpg&Width=1024&height=512&crop=5&"+ OG_focal; 44 45 var currentURL = "https://"+GetGlobalValue("Global:Request.Host")+GetGlobalValue("Global:Pageview.Url"); 46 } 47 48 49 50 <meta property="fb:app_id" content="551092185681553"> 51 <meta property="og:url" content='@currentURL'> 52 <meta property="og:type" content="website"> 53 @if(OGTitle!=""){ 54 <meta name="twitter:card" content="summary_large_image"> 55 <meta property="og:title" content="@OGTitle"> 56 <meta name="twitter:title" content="@OGTitle"> 57 } 58 @if(OGDescription!=""){ 59 <meta property="og:description" content="@OGDescription"> 60 <meta name="twitter:description" content="@OGDescription"> 61 } 62 @if(OGImage!=""){ 63 <meta property="og:image" content="@OGimgurl"> 64 <meta name="twitter:image" content="@TWimgurl"> 65 <meta property="og:image:width" content="1200"> 66 <meta property="og:image:height" content="628"> 67 } 68 <!-- Google Tag Manager --> 69 <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 70 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 71 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 72 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 73 })(window,document,'script','dataLayer','GTM-WJGQ4DN');</script> 74 <!-- End Google Tag Manager --> 75 76 @GetValue("Stylesheets") 77 @GetValue("Javascripts") 78 </head> 79 @{ 80 var user = GetString("DWextranet_AccessUserUserName"); 81 var guserID = GetString("DW_extranet_AccessUserID"); 82 var pageID = GetString("DwPageID"); 83 } 84 <body class='d-flex flex-column h-100 @if(user!=""){<text>logged_in</text>}'> 85 <!-- Google Tag Manager (noscript) --> 86 <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WJGQ4DN" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> 87 <!-- End Google Tag Manager (noscript) --> 88 <header> 89 <div class="container"> 90 <div class="row vertical-align"> 91 <div class="col-md-4 col-5"> 92 <div id="logo"> 93 <a href="/"><img src="/Files/Templates/Designs/smv/assets/img/logo.svg" height="30" alt="SMVdanmark"></a> 94 </div> 95 </div> 96 <div class="col-md-8 col-7"> 97 <div class="nav-panel"> 98 99 100 @if(guserID!=""){ 101 <div class="login-dropdown-wrapper"> 102 <button type="button" class="login-dropdown-toggler loggedin"> 103 <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="42px" height="42px" viewbox="0 0 42 42" enable-background="new 0 0 42 42" xml:space="preserve"> 104 <path fill="#573594" d="M30.456,28.459l0.377-0.379c3.944-5.223,2.932-13.05-2.291-16.997c-5.223-3.944-13.387-2.681-17.333,2.542 105 c-3.192,4.228-2.9,10.609,0.292,14.834c0.603-0.592,1.583-1.028,2.417-1.167c2.182-0.5,3.924-1.233,4.25-1.952 106 c0.119-0.398-0.172-1.002-0.417-1.34c-2.068-3.811-2.517-6.861-1.167-9.125c0.984-1.578,2.512-2.329,4.371-2.25 107 c1.842-0.08,3.268,0.65,4.253,2.208c1.348,2.239,1.137,5.396-0.905,9.25c-0.244,0.342-0.637,1.292-0.22,1.833"></path> 108 <g> 109 <path d="M21,8.071c7.141,0,12.928,5.788,12.928,12.929c0,7.141-5.787,12.928-12.928,12.928c-7.14,0-12.928-5.787-12.928-12.928 110 C8.075,13.861,13.861,8.075,21,8.071z M29.756,28.982c-0.447-0.512-1.072-0.836-1.75-0.912c-4.146-0.975-4.414-1.616-4.688-2.217 111 c-0.272-0.705-0.19-1.496,0.221-2.131c1.859-3.509,2.252-6.49,1.105-8.394c-0.787-1.237-2.182-1.952-3.646-1.867 112 c-1.479-0.085-2.887,0.644-3.673,1.899c-1.148,1.927-0.747,4.9,1.13,8.357c0.417,0.63,0.505,1.421,0.237,2.128 113 c-0.285,0.631-0.658,1.281-4.7,2.225c-0.677,0.076-1.301,0.402-1.749,0.914c4.404,4.836,11.895,5.187,16.73,0.783 114 c0.271-0.25,0.532-0.511,0.78-0.783L29.756,28.982L29.756,28.982z M30.456,28.143c3.944-5.224,2.909-12.655-2.313-16.601 115 c-5.223-3.944-12.653-2.909-16.6,2.313c-3.192,4.228-3.192,10.06,0,14.286c0.603-0.593,1.374-0.983,2.208-1.121 116 c2.182-0.5,3.637-0.9,3.963-1.619c0.119-0.399,0.045-0.832-0.2-1.17c-2.068-3.812-2.462-7.16-1.112-9.424 117 c0.984-1.578,2.741-2.504,4.6-2.425c1.842-0.08,3.586,0.832,4.571,2.39c1.348,2.24,0.965,5.6-1.077,9.454 118 c-0.244,0.342-0.314,0.776-0.193,1.178c0.329,0.721,1.771,1.119,3.951,1.615C29.086,27.156,29.855,27.548,30.456,28.143 119 L30.456,28.143z"></path> 120 </g> 121 <path fill="#573594" d="M24.303,25.34c0.329,0.721,1.771,1.119,3.951,1.615c0.832,0.139,1.602,0.531,2.202,1.125"></path> 122 </svg> 123 </button> 124 <div class="login-dropdown-box login-dropdown-loggedin"> 125 <p class="loggedin-text">Logget ind som:<br>@user</p> 126 <a href="/Default.aspx?ID=1104">Profil</a><br> 127 <a href='/Admin/Public/extranetlogoff.aspx?ID=@GetString("DwPageID")'>Log ud</a> 128 </div> 129 </div> 130 } else { 131 <div class="login-dropdown-wrapper"> 132 <button type="button" class="login-dropdown-toggler notloggedin"> 133 Log ind 134 </button> 135 @{ 136 var logging_in = System.Web.HttpContext.Current.Request.Form["loggingin"]; 137 } 138 <div class="login-dropdown-box login-dropdown-notloggedin" data-posteduser="@logging_in" data-loggedinuser="@guserID"> 139 <div class="login-wrap"> 140 <h3>@Translate("Login","Log ind")</h3> 141 <p>@Translate("Loginboks tekst")</p> 142 <form method="post" action=""> 143 <input type="hidden" name="ID" value="@pageID" autocomplete="off"> 144 <input type="text" id="login-username" name="username" value="" placeholder='@Translate("Indtast Email","Indtast e-mail")'> 145 <input type="password" id="login-password" name="password" value="" placeholder='@Translate("Indtast Password","Indtast kodeord")'> 146 <input type="hidden" id="loggingin" name="loggingin" value="1"> 147 <button type="submit" name="LoginAction" value="Login">Log ind</button> 148 <div class="forgot-toggler">@Translate("forgottenpassword","Nulstil kodeord")</div> 149 <div class="create-profile"><a href="/Default.aspx?ID=1594">@Translate("createprofile","Opret bruger")</a></div> 150 </form> 151 </div> 152 <div class="forgot-wrap"> 153 <form method="post" action="/Default.aspx?ID=1599&LoginAction=Recovery" class="ng-pristine ng-valid" id="forgottenpassword"> 154 <h3>@Translate("forgotpassword","Nulstil dit kodeord")</h3> 155 <p>@Translate("Indtast din email, så modtager du et link til nulstilling af din kode.")</p> 156 <input type="hidden" name="ForgotPasswordMailTemplate" value="Login/SMV_password_recovery_email.html" autocomplete="off"> 157 <input type="hidden" name="ForgotPasswordSenderEmail" value="no-reply@SMVdanmark.dk" autocomplete="off"> 158 <input type="hidden" name="ForgotPasswordMailSubject" value="SMVdanmark: Nulstil kodeord" autocomplete="off"> 159 <input name="AccessUserEmail" type="text" class="AccessUserEmail" placeholder='@Translate("Indtast Email","Indtast e-mail")'> 160 <button type="submit" name="LoginAction" value="Recovery">@Translate("Send")</button> 161 <div class="forgot-toggler">@Translate("Tilbage til log ind")</div> 162 163 </form> 164 </div> 165 </div> 166 167 @if(logging_in=="1" && guserID==""){ 168 <script type="text/javascript"> 169 170 setTimeout(function(){ 171 $.featherlight($('#wrong-password')); 172 173 },500); 174 </script> 175 <div class="modal-wrap login-message"> 176 <div id="wrong-password"> 177 <h2>Du blev ikke logget ind.</h2> 178 <p>Du har indtast et forkert brugernavn eller password - prøv venligst igen.</p> 179 </div> 180 </div> 181 } 182 </div> 183 } 184 185 <button type="button" class="search-toggler"> 186 <svg x="0px" y="0px" width="42px" height="42px" viewbox="0 0 42 42" enable-background="new 0 0 42 42"> 187 <path fill="#000000" d="M25.251,24.592c3.043-3.353,3.064-8.46,0.047-11.837c-3.254-3.646-8.846-3.962-12.492-0.708 188 c-3.645,3.255-3.961,8.848-0.708,12.492c3.255,3.646,8.848,3.964,12.492,0.708l6.898,6.953l0.66-0.656L25.251,24.592z 189 M18.674,26.565c-4.37-0.018-7.898-3.571-7.881-7.943c0,0,0-0.001,0-0.002c0.02-4.368,3.574-7.894,7.942-7.879 190 c4.37,0.017,7.899,3.572,7.881,7.942C26.601,23.055,23.044,26.581,18.674,26.565z"></path> 191 </svg> 192 </button> 193 194 <button type="button" class="nav-toggler"> 195 <svg class="open-button" x="0px" y="0px" width="42px" height="42px" viewbox="0 0 42 42" enable-background="new 0 0 42 42"> 196 <g><path fill="#000000" d="M29.255,26.541v1.01h-16.51v-1.01H29.255z M29.255,20.495v1.009h-16.51v-1.008L29.255,20.495z M29.255,14.45v1.008h-16.51V14.45H29.255z"></path><path fill="#000000" d="M29.255,27.551h-16.51v-1.01h16.51V27.551z M29.255,21.504h-16.51v-1.009h16.51V21.504z M29.255,15.458h-16.51V14.45h16.51V15.458z"></path></g> 197 </svg> 198 <svg class="close-button" x="0px" y="0px" width="42px" height="42px" viewbox="0 0 42 42" enable-background="new 0 0 42 42"> 199 <g><path fill="#ffffff" d="M26.48,14.806l0.713,0.713L15.52,27.193l-0.712-0.713L26.48,14.806z"></path><path fill="#ffffff" d="M26.48,27.193L14.806,15.519l0.713-0.713l11.674,11.674L26.48,27.193z"></path></g> 200 </svg> 201 </button> 202 </div> 203 </div> 204 </div> 205 </div> 206 </header> 207 <div class="global-search"> 208 <div class="container"> 209 <div class="row"> 210 <div class="col-12" ng-controller="GSCtrl"> 211 <input type="text" name="query" ng-model="searchQuery" ng-keyup="search(searchQuery,$event)" placeholder="Søg i hele SMVdanmark.dk"> 212 </div> 213 </div> 214 </div> 215 </div> 216 <nav class="slide-menu" id="primary-nav"> 217 <button type="button" class="back-button" data-action="back"> 218 <svg x="0px" y="0px" width="10px" height="15px" viewbox="0 0 10 15" enable-background="new 0 0 10 15"> 219 <path fill="#FFFFFF" d="M10,14.527L1.016,7.5L10,0.488L9.613,0L0,7.5L9.619,15L10,14.527z"></path> 220 </svg> 221 <span class="menutext"></span> 222 </button> 223 @GetValue("DwNavigation(topnavigation)") 224 @GetValue("DwNavigation(subnav)") 225 </nav> 226 <div class="nav-overlay"></div> 227 <div id="contentarea"> 228 229 230 231 232 233 234 @{ 235 var hero = GetString("Item.HeroBillede.Value"); 236 var focal = GetString("Item.HeroBillede.Value.FocalPointParameters"); 237 var title = GetString("Item.Titel"); 238 var manchet = GetString("Item.Manchet"); 239 var heroimgtype = GetString("Item.Billedetype_hero"); 240 var heroquotes = "'"+GetString("Item.HeroBillede.Value")+"'"; 241 var imgextension = hero.Substring(hero.Length-3); 242 243 var nooverlay = GetBoolean("Item.FjernOverlay"); 244 var nocrop = GetBoolean("Item.VisIFuldOpl_sning"); 245 var HifTemplate = GetBoolean("Item.HifTemplate"); 246 var HifClass = ""; 247 248 var contactimg = GetString("Item.Kontaktperson.Billede.Value"); 249 var focalparams = GetString("Item.Kontaktperson.Billede.Value.FocalPointParameters"); 250 var contactname = GetString("Item.Kontaktperson.Navn"); 251 var contactposition = GetString("Item.Kontaktperson.Stilling"); 252 var contactemail = GetString("Item.Kontaktperson.Email"); 253 var contactphone = GetString("Item.Kontaktperson.Tlf"); 254 var contactlink = GetString("Item.Kontaktperson.Url"); 255 var headline = GetString("Item.Kontaktperson.TekstP_Kontaktboks"); 256 257 var createddate = GetDate("DwPageCreatedDate"); 258 var newsDate = GetDate("Item.Dato"); 259 260 var colorA = "#7353AE"; 261 var colorB = "#A5DAC5"; 262 263 var share_title = title.Replace("'",""); 264 var share_manchet = manchet.Replace("'",""); 265 var hideDate = GetBoolean("Item.SkjulDato"); 266 var pagetype = GetInteger("Item.Sidetype"); 267 268 var author = GetString("Item.Forfatter"); 269 270 var userID = GetString("DW_extranet_AccessUserID"); 271 272 var orderlinesCount = GetInteger("Ecom:Order.OrderLines.Count"); 273 274 var globalurl = GetGlobalValue("Global:Request.Url"); 275 var friendlyurl = "https://"+GetGlobalValue("Global:Request.Host")+GetGlobalValue("Global:Pageview.Url"); 276 var theme = GetString("Item.Tema"); 277 278 var locked = GetBoolean("Item.Adgangsbeskyttet"); 279 var blocktext = GetString("Item.Blokeringstekst"); 280 281 var groups = GetString("Item.Adgangsbeskyttelse"); 282 //Godkendte CVR = 6143420 | SMV Medlem = 6178942 283 //var groups = "6143420"; 284 List<string> allowedGroups = groups.Split(',').ToList(); 285 286 var pageClass = "article-page"; 287 if(pagetype==26){ 288 pageClass="campaign-page"; 289 } 290 291 if(heroimgtype==""){ 292 heroimgtype = "jpg"; 293 } 294 295 if (HifTemplate) { 296 HifClass = "hif"; 297 colorA = "#fd7100"; 298 colorB = "#fdca80"; 299 } 300 } 301 302 @functions{ 303 public static bool CheckinGroup(List<string> allowedGroups, String groups, String currentUser){ 304 if(groups==""){ 305 return true; 306 } 307 else{ 308 foreach(var group in Dynamicweb.Security.UserManagement.User.GetCurrentExtranetUser().Groups){ 309 if(allowedGroups.Contains(group.ID.ToString()) || allowedGroups.Contains(currentUser)){ 310 return true; 311 } 312 else{ 313 return false; 314 } 315 } 316 } 317 return false; 318 } 319 } 320 321 322 <div class="@pageClass @HifClass"> 323 <div class="header-wrap"> 324 <div class="breadcrumbs"> 325 <div class="container"> 326 <div class="row"> 327 <div class="col-sm-12"> 328 <a href="/" class="home">SMVdanmark.dk</a> 329 <span class="divider">></span> 330 @GetValue("DwNavigation(breadcrumbs)") 331 </div> 332 </div> 333 </div> 334 </div> 335 @if(nooverlay){ 336 if(nocrop || imgextension=="svg"){ 337 <style> 338 .hero-wrap{ 339 background:url(@heroquotes); 340 background-size:cover; 341 } 342 .hero-wrap.svg{ 343 background-size:contain!important; 344 background-repeat:no-repeat; 345 } 346 </style> 347 <div class="hero-wrap @imgextension"></div> 348 }else{ 349 <style> 350 .hero-wrap{ 351 background:url(/Admin/Public/GetImage.ashx?Image=@hero&Format=@heroimgtype&Width=1280&height=635&crop=5&@focal); 352 background-size:cover; 353 } 354 @@media (min-width: 1280px){ 355 .hero-wrap{ 356 background:url(/Admin/Public/GetImage.ashx?Image=@hero&Format=@heroimgtype&Width=2000&height=635&crop=5&@focal); 357 } 358 } 359 </style> 360 <div class="hero-wrap @imgextension"></div> 361 } 362 } 363 else{ 364 if(nocrop || imgextension=="svg"){ 365 var position = "bottom left"; 366 <style> 367 .hero-wrap{ 368 background:url(@heroquotes); 369 background:url(@heroquotes),-webkit-linear-gradient(@position,@colorA,@colorB); 370 background:url(@heroquotes),-o-linear-gradient(@position,@colorA,@colorB); 371 background:url(@heroquotes),linear-gradient(@position,@colorA,@colorB); 372 background-size:cover; 373 } 374 .hero-wrap.svg{ 375 background-size:contain!important; 376 background-repeat:no-repeat; 377 } 378 </style> 379 <div class="overlay"></div> 380 <div class="hero-wrap @imgextension" style=""></div> 381 } 382 else{ 383 <style> 384 .hero-wrap{ 385 background:url(/Admin/Public/GetImage.ashx?Image=@hero&Format=@heroimgtype&Width=1280&height=635&crop=5&@focal); 386 background:url(/Admin/Public/GetImage.ashx?Image=@hero&Format=@heroimgtype&Width=1280&height=635&crop=5&@focal),-webkit-linear-gradient(bottom left, @colorA, @colorB); 387 background-size:cover; 388 } 389 @@media (min-width: 1280px){ 390 .hero-wrap{ 391 background:url(/Admin/Public/GetImage.ashx?Image=@hero&Format=@heroimgtype&Width=2000&height=635&crop=7&@focal); 392 background:url(/Admin/Public/GetImage.ashx?Image=@hero&Format=@heroimgtype&Width=2000&height=635&crop=7&@focal),-webkit-linear-gradient(bottom left, @colorA, @colorB); 393 } 394 } 395 </style> 396 <div class="overlay" data-extension="@imgextension"></div> 397 <div class="hero-wrap @imgextension" style=""></div> 398 } 399 } 400 <div class="outer-wrapper"> 401 <div class="inner-wrapper"> 402 <div class="text-wrap"> 403 <div class="container"> 404 <div class="row"> 405 <div class="col-lg-8 offset-lg-2 col-md-10 offset-md-1"> 406 <h1 class="title">@title</h1> 407 <h2 class="manchet">@manchet</h2> 408 @if(theme!=""){ 409 var tema = Dynamicweb.Content.Items.ItemManager.Storage.GetById("Tema", theme); 410 var temalink = ""; 411 var temaName = ""; 412 if(tema["LinkTilTemaside"]!=null){ 413 temalink = tema["LinkTilTemaside"].ToString(); 414 } 415 if(tema["Titel"]!=null){ 416 temaName = tema["Titel"].ToString(); 417 } 418 if(temalink!=""){ 419 <a href="@temalink" class="theme_link">@temaName</a> 420 } 421 } 422 </div> 423 </div> 424 </div> 425 </div> 426 </div> 427 </div> 428 </div> 429 <div class="social-links"> 430 @{ 431 var enc_manchet = HttpUtility.UrlEncode(@manchet); 432 var enc_url = HttpUtility.UrlEncode(@friendlyurl); 433 } 434 <a href='https://www.facebook.com/dialog/share?app_id=551092185681553&display=popup&href=@enc_url&via=SMVdanmark&redirect_uri=@enc_url' rel="noopener" onclick="event.preventDefault();window.open(this.href, '', 'resizable=yes,status=no,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=yes,dependent=no,width=550,left=100,height=600,top=100'); return false;" class="social-link"><img src="/Files/Templates/Designs/smv/assets/img/facebook.svg" alt="Facebook"></a> 435 <a href='https://www.linkedin.com/shareArticle?mini=true&url=@enc_url&title=@share_title&summary=@enc_manchet&source=@GetGlobalValue("Global:Request.Host")' onclick="event.preventDefault();window.open(this.href, '', 'resizable=yes,status=no,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=yes,dependent=no,width=550,left=100,height=600,top=100');" class="social-link"><img src="/Files/Templates/Designs/smv/assets/img/linkedin.svg" alt="Share on Linkedin"></a> 436 <a href='http://www.twitter.com/share?url=@enc_url&text=@enc_manchet&via=SMVdanmark' onclick="event.preventDefault();window.open(this.href, '', 'resizable=yes,status=no,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=yes,dependent=no,width=550,left=100,height=600,top=100');" class="social-link"><img src="/Files/Templates/Designs/smv/assets/img/twitter.svg" alt="Share on Twitter"></a> 437 438 @if(@contactname!=""){ 439 <div class="contact-icon"> 440 <img src="/Files/Templates/Designs/smv/assets/img/contact_icon.svg" class="icon" alt="Kontakt @contactname"> 441 <div class="contact-wrap"> 442 <div class="img-wrap"> 443 <a href="@contactlink"> 444 <img src="/Admin/Public/GetImage.ashx?Image=@contactimg&Format=jpg&Width=300&height=180&crop=7&@focalparams" alt="@contactname"> 445 </a> 446 <h3>Vil du vide mere?</h3> 447 @if(@headline!=""){ 448 <h3>@headline</h3> 449 } 450 </div> 451 <div class="contact"> 452 <div class="c-info"> 453 <h4>@contactname</h4> 454 <span class="position">@contactposition</span> 455 <div class="email"><a href="mailto:@contactemail;">@contactemail</a></div> 456 <div class="phone">@contactphone</div> 457 <a href="@contactlink" class="readmore">Læs mere om @contactname</a> 458 </div> 459 </div> 460 </div> 461 </div> 462 } 463 </div> 464 465 @if(pagetype!=26){ 466 <div class="content-wrap"> 467 <div class="container"> 468 <div class="row"> 469 <div class="col-lg-10 offset-lg-1 col-12"> 470 <div class="overlap"></div> 471 </div> 472 </div> 473 <div class="row"> 474 <div class="col-lg-8 offset-lg-2 col-md-10 offset-md-1"> 475 <div class="article-info"> 476 @if(!hideDate){ 477 <div class="date"> 478 @if(pagetype==5){ 479 @newsDate.ToString("dd. MMMM yyyy") <text>&nbsp;</text> 480 }else{ 481 if(newsDate.ToString()!="01-01-0001 00:00:00"){ 482 @newsDate.ToString("dd. MMMM yyyy") <text>&nbsp;</text> 483 } 484 else{ 485 @createddate.ToString("dd. MMMM yyyy") <text>&nbsp;</text> 486 } 487 488 } 489 </div> 490 } 491 <text></text> 492 @if(@author!=""){ 493 <div class="author"> 494 - Skrevet af @author 495 </div> 496 } 497 </div> 498 </div> 499 </div> 500 </div> 501 </div> 502 } 503 @using Dynamicweb.Security.UserManagement 504 @using System.Web 505 @using System.IO 506 @{ 507 Dynamicweb.DataProcessing.ConsentService consentService = new Dynamicweb.DataProcessing.ConsentService(); 508 var brugerID = GetInteger("DW_extranet_AccessUserID"); 509 var isInCVRGroup = false; 510 var isSuperUser = false; 511 var useremail = ""; 512 Boolean hasGivenConsent = false; 513 var consentID = GetString("Item.Area.Samtykker.Value"); 514 515 var GlobalProtectedUserGroup = GetInteger("Item.Area.Adgangsbeskyttelse"); 516 517 var emailreceipt = GetString("Item.EmailKvittering"); 518 519 var CvrIsNotInList = false; 520 var postedCVR = System.Web.HttpContext.Current.Request.QueryString["c"]; 521 Boolean postedInCVRList = false; 522 523 var postedVal = System.Web.HttpContext.Current.Request.Form["consent"]; 524 525 } 526 @functions{ 527 528 public static List<string> parseCSV(string path) 529 { 530 List<string> parsedData = new List<string>(); 531 using (StreamReader readFile = new StreamReader(path)) 532 { 533 string line; 534 535 while ((line = readFile.ReadLine()) != null) 536 { 537 538 parsedData.Add(line.Replace("\"", "")); 539 } 540 } 541 return parsedData; 542 } 543 } 544 545 @if(brugerID>0 && locked){ 546 547 var current = User.GetUserByID(brugerID); 548 useremail = current.Email; 549 isSuperUser = bool.Parse(current.CustomFieldValues.Find(p => p.CustomField.SystemName.Equals("AccessUser_Superbruger")).Value.ToString()); 550 isInCVRGroup = current.HasGroup(6143420); 551 var UserVatNr = current.VatRegNumber.ToString(); 552 var isInCVRList = parseCSV(HttpContext.Current.Server.MapPath("/Files/Files/Sikker/admin/CVR_import/HVR_CVR_DW8_export.txt")).Any(l => l.Equals(UserVatNr)); 553 554 555 if(postedCVR!=null){ 556 postedInCVRList = parseCSV(HttpContext.Current.Server.MapPath("/Files/Files/Sikker/admin/CVR_import/HVR_CVR_DW8_export.txt")).Any(l => l.Equals(postedCVR)); 557 } 558 559 var savedconsents = consentService.GetConsentsBySubject(brugerID.ToString(), "User"); 560 561 if(@savedconsents.Any() ) { 562 foreach(var c in savedconsents){ 563 var status = c.Status.ToString(); 564 var activityID = c.ActivityId; 565 if(activityID == consentID && status=="Given") { 566 hasGivenConsent = true; 567 <div style="display:none;">@status</div> 568 } 569 } 570 } 571 572 if(postedVal=="Given"){ 573 hasGivenConsent = true; 574 consentService.GiveConsent(consentID, brugerID.ToString(), "User", Dynamicweb.DataProcessing.ConsentRequestInfo.FromRequest(Dynamicweb.Context.Current.Request)); 575 } 576 577 if(!hasGivenConsent){ 578 var consent = Consents.GetActivity(consentID); 579 580 <script type="text/javascript"> 581 $.featherlight.defaults.closeOnClick = false; 582 $.featherlight.defaults.closeIcon = ""; 583 setTimeout(function(){ 584 $.featherlight($('#consent-modal')); 585 586 },500); 587 </script> 588 <div class="modal-wrap"> 589 <div id="consent-modal"> 590 <h2>Opdatér dit samtykke</h2> 591 <form method="post" action=""> 592 <input type="checkbox" value="Given" name="consent" id="consent"> 593 <label for="consent">@consent.Description</label> 594 <input type="submit" value="Opdater"> 595 </form> 596 </div> 597 </div> 598 } 599 600 if(postedCVR!=null && postedInCVRList){ 601 <script type="text/javascript"> 602 setTimeout(function(){ 603 window.location = window.location.pathname; 604 },100); 605 </script> 606 } 607 608 if(UserVatNr=="" && !isSuperUser){ 609 <script type="text/javascript"> 610 setTimeout(function(){ 611 $.featherlight($('#cvr-modal')); 612 },500); 613 </script> 614 <div class="modal-wrap"> 615 <div id="cvr-modal"> 616 <h2>Indtast venligst et CVR-nummer</h2> 617 @RenderParagraphContent(6143) 618 </div> 619 </div> 620 } 621 else if(!isInCVRList && UserVatNr!="" && !isSuperUser){ 622 623 UserVatNr = current.VatRegNumber.ToString(); 624 CvrIsNotInList = true; 625 <script type="text/javascript"> 626 setTimeout(function(){ 627 $.featherlight($('#cvr-modal')); 628 },500); 629 </script> 630 631 <div class="modal-wrap"> 632 <div id="cvr-modal"> 633 <h2>Dit CVR nummer er ikke gyldigt. Opdatér venligst dit CVR-nummer</h2> 634 @RenderParagraphContent(6143) 635 </div> 636 </div> 637 638 } 639 else if(isInCVRList && !isInCVRGroup && !isSuperUser){ 640 CvrIsNotInList = false; 641 //Updating user - add user to SMV medlem group and Godkendt CVR group 642 643 //6178942 = SMV Medlem 644 if (!current.HasGroup(6178942)) 645 { 646 current.AddToGroup(6178942); 647 current.Save(); 648 } 649 //6143420 = Godkendt 650 if (!current.HasGroup(6143420)) 651 { 652 current.AddToGroup(6143420); 653 current.Save(); 654 } 655 //6143422 = Ikke-Godkendt 656 if (current.HasGroup(6143422)) 657 { 658 current.RemoveFromGroup(6143422); 659 current.Save(); 660 } 661 <script type="text/javascript"> 662 setTimeout(function(){ 663 window.location.reload(1); 664 },500); 665 </script> 666 } 667 } 668 669 670 @if(!locked || locked && isInCVRGroup && brugerID > 0 && !CvrIsNotInList && hasGivenConsent){ 671 <div data-val="@GlobalProtectedUserGroup"></div> 672 @GetValue("DwContent(indhold)") 673 if(GetLoop("Item.LinkTilProdukt").Any()){ 674 foreach(var p in GetLoop("Item.LinkTilProdukt")){ 675 var name = p.GetString("Ecom:Product.Name"); 676 var price = p.GetString("Ecom:Product.ActualPriceWithoutVAT"); 677 var dbprice = p.GetDouble("Ecom:Product.DBPrice"); 678 var info = p.GetString("Ecom:Product.LongDescription"); 679 var formFields = p.GetString("Ecom:Product.Form.Multi.HiddenFields"); 680 var productID = p.GetString("Ecom:Product.ID"); 681 <div class="book-button active">Book pladser nu!</div> 682 <section class="product"> 683 <div class="container"> 684 <div class="row"> 685 <div class="col-lg-8 offset-lg-2"> 686 <div class="product-wrap"> 687 <h3>Tilmelding til @name</h3> 688 <div class="info-wrap"> 689 @info 690 </div> 691 <div class="price-wrap"> 692 @if(dbprice>0){ 693 <text>Pris: @price ekskl. moms</text> 694 } 695 else{ 696 <text>Gratis</text> 697 } 698 </div> 699 <form name="" id="PRODFORM_" method="POST" action="/Default.aspx?ID=1641"> 700 <input type="hidden" name="redirect" value="Default.aspx?Id=1641"> 701 <input type="hidden" name="ProductURL" id="ProductURL" value=""> 702 <input type="hidden" name="CartCmd" id="CartCmd" value="add"> 703 <input type="hidden" name="ProductID" id="ProductID" value="@productID"> 704 <input type="hidden" name="emailreceipt" id="emailreceipt" value="@emailreceipt"> 705 <input type="text" value="1" name="Quantity" class="quantity "><input type="submit" name="submitForm" id="buyProduct" class="addtocart" value="Book nu!"> 706 </form> 707 @if(orderlinesCount==1){ 708 <script language="javascript"> 709 $('#PRODFORM_').submit(function(e) { 710 var url = '@globalurl'; 711 // this code prevents form from actually being submitted 712 e.preventDefault(); 713 e.returnValue = false; 714 715 // some validation code here: if valid, add podkres1 class 716 717 var $form = $(this); 718 719 // this is the important part. you want to submit 720 // the form but only after the ajax call is completed 721 $.ajax({ 722 type: 'post', 723 url: url+'&CartCmd=EmptyCart', 724 context: $form, // context will be "this" in your handlers 725 success: function() { // your success handler 726 }, 727 error: function() { // your error handler 728 }, 729 complete: function() { 730 // make sure that you are no longer handling the submit event; clear handler 731 this.off('submit'); 732 // actually submit the form 733 this.submit(); 734 } 735 }); 736 }); 737 </script> 738 } 739 </div> 740 </div> 741 </div> 742 </div> 743 </section> 744 } 745 } 746 } 747 else if(locked){ 748 //if(locked && !isInCVRGroup && !isSuperUser || locked && !isInCVRList && !isSuperUser){ 749 <section class="locked"> 750 <div class="container"> 751 <div class="row"> 752 <div class="col-lg-8 offset-lg-2"> 753 <div class="lock-wrap"> 754 <div class="log-in-prompt"> 755 @if(blocktext==""){ 756 @GetString("Item.Area.Blokeringstekst") 757 } 758 else{ 759 @blocktext 760 } 761 </div> 762 @manchet 763 </div> 764 </div> 765 </div> 766 </div> 767 </section> 768 769 } 770 771 772 @if(pagetype!=26){ 773 <div class="container"> 774 <div class="row"> 775 <div class="col-lg-8 offset-lg-2"> 776 <div class="back-button"> 777 778 <a href="javascript:history.back()" class="button">Tilbage</a> 779 780 </div> 781 </div> 782 </div> 783 </div> 784 } 785 </div> 786 </div> 787 @{ 788 var tlf = GetString("Item.Area.Telefonnr"); 789 var email = GetString("Item.Area.Email"); 790 791 var facebook = GetString("Item.Area.LinkTil_Facebook"); 792 var linkedin = GetString("Item.Area.LinkTil_Linkedin"); 793 var twitter = GetString("Item.Area.LinkTil_Twitter"); 794 } 795 <footer class="mt-auto"> 796 <div class="container"> 797 <div class="row"> 798 <div class="col-lg-4"> 799 <div class="contact-info"> 800 <h4>@Translate("Har du et spørgsm&aring;l, så ring til os p&aring;")</h4> 801 <h3><a href='tel:@tlf.Replace(" ","")'>@tlf</a></h3> 802 <h4>@Translate("Eller skriv til os p&aring;")</h4> 803 <h3><a href="mailto:@email">@email</a></h3> 804 </div> 805 </div> 806 <div class="col-lg-4"> 807 <div class="footer-nav"> 808 @GetValue("DwNavigation(footerNav)") 809 </div> 810 </div> 811 <div class="col-lg-4"> 812 <div class="footer-nav"> 813 @GetValue("DwNavigation(footerSubNav)") 814 </div> 815 @if(facebook!=""){ 816 <div class="social"> 817 <a href="@facebook" target="_blank"><svg width="30" height="30" viewbox="0 0 30 30"> 818 <path fill="#FFFFFF" d="M13.5,13H12v2h1.5v6H16v-6h1.82L18,13h-2v-0.833c0-0.477,0.1-0.667,0.557-0.667 819 H18V9h-1.9c-1.8,0-2.6,0.791-2.6,2.307V13z"></path> 820 </svg></a> 821 </div>}@if(linkedin!=""){<div class="social"> 822 <a href="@linkedin" target="_blank"><svg x="0px" y="0px" width="30px" height="30px" viewbox="0 0 30 30" enable-background="new 0 0 30 30"> 823 <path fill="#FFFFFF" d="M12.083,11.265c-0.004,0.569-0.469,1.026-1.037,1.022 824 c-0.569-0.004-1.027-0.469-1.022-1.038c0.005-0.566,0.465-1.022,1.031-1.022C11.625,10.229,12.085,10.694,12.083,11.265z 825 M12.091,13.133h-2.075v6.641h2.076L12.091,13.133z M15.405,13.133h-2.062v6.641h2.063v-3.486c0-1.938,2.5-2.1,2.5,0v3.486h2.072 826 v-4.205c0.086-1.378-0.963-2.563-2.342-2.648c-0.887-0.054-1.737,0.367-2.232,1.106V13.133z"></path> 827 </svg> 828 </a> 829 </div>}@if(twitter!=""){<div class="social"> 830 <a href="@twitter" target="_blank"><svg x="0px" y="0px" width="30px" height="30px" viewbox="0 0 30 30" enable-background="new 0 0 30 30"> 831 <path fill="#FFFFFF" d="M20.564,11.259c-0.416,0.185-0.858,0.306-1.311,0.359 832 c0.475-0.286,0.83-0.735,1-1.263c-0.449,0.266-0.939,0.453-1.45,0.554c-0.867-0.917-2.313-0.957-3.23-0.09 833 c-0.589,0.557-0.838,1.383-0.657,2.172c-1.836-0.092-3.546-0.958-4.705-2.385c-0.605,1.043-0.297,2.377,0.705,3.048 834 c-0.361-0.011-0.717-0.108-1.033-0.284c-0.016,1.099,0.754,2.053,1.832,2.27c-0.336,0.092-0.689,0.105-1.031,0.039 835 c0.301,0.927,1.156,1.564,2.132,1.582c-0.957,0.75-2.173,1.09-3.38,0.945c1.044,0.672,2.259,1.027,3.5,1.025 836 c3.566,0.023,6.476-2.848,6.498-6.414c0.002-0.126-0.002-0.252-0.008-0.377C19.872,12.117,20.258,11.716,20.564,11.259 837 L20.564,11.259z"></path> 838 </svg> 839 </a> 840 </div> 841 } 842 </div> 843 </div> 844 </div> 845 </footer> 846 847 </body> 848 849 </html>