Label

Halten Sie sich auf dem Laufenden

Abonnieren sie den Newsletter von Seeland

Error executing template "/Designs/Seeland/Paragraph/Newsletter_Ribbon_Seeland.cshtml"
System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
   at System.String.Substring(Int32 startIndex, Int32 length)
   at CompiledRazorTemplates.Dynamic.RazorEngine_f0ffaefe47fe43c99508ad616ecb4716.Execute() in D:\Dynamicweb.net\Solutions\SeelandInt-Production\Files\Templates\Designs\Seeland\Paragraph\Newsletter_Ribbon_Seeland.cshtml:line 94
   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 @using Dynamicweb.Rendering; 2 @using Logic.Helpers; 3 @using Logic.Models; 4 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 5 6 @{ 7 CountryHelper countryHelper = new CountryHelper(); 8 List<Country> countryHelperList = new List<Country>(); 9 string currentSiteCountry = "EN"; 10 int value = 2; 11 try 12 { 13 countryHelperList = countryHelper.getActiveCultures(Convert.ToInt32(Pageview.Area.Item["CountriesId"])); 14 foreach (Country country in countryHelperList) 15 { 16 if (country.CurrentCountry) 17 { 18 currentSiteCountry = country.CountryCode; 19 break; 20 } 21 } 22 23 } 24 catch { } 25 26 switch (currentSiteCountry) 27 { 28 case "GB": 29 value = 2; 30 break; 31 case "DK": 32 value = 4; 33 break; 34 case "SE": 35 value = 8; 36 break; 37 case "NO": 38 value = 16; 39 break; 40 case "DE": 41 value = 32; 42 break; 43 default: 44 value = 1; 45 break; 46 } 47 string textColor = ""; 48 49 if (GetString("Item.Textcolor.Value") == "dark") 50 { 51 textColor = "text-dark"; 52 } 53 string[] whatsInIfForMeList = GetString("Item.WhatsInItForMe.Value").Split(','); 54 string textcolor = GetString("Item.Textcolor.Value"); 55 56 if (GetBoolean("Item.ColorCheck.Value")) 57 { 58 <section class="newsletter newsletter-ribbon color-@GetString("Item.Color.Value") @textColor"> 59 @using Dynamicweb.Rendering; 60 @using Logic.Helpers; 61 @using Logic.Models; 62 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 63 64 @{ 65 string uspText1 = GetString("Item.Text_1.Value"); 66 string uspText2 = GetString("Item.Text_2.Value"); 67 string uspText3 = GetString("Item.Text_3.Value"); 68 string uspText4 = GetString("Item.Text_4.Value"); 69 70 string uspIcon1 = GetString("Item.Icon_1.Value"); 71 string uspIcon2 = GetString("Item.Icon_2.Value"); 72 string uspIcon3 = GetString("Item.Icon_3.Value"); 73 string uspIcon4 = GetString("Item.Icon_4.Value"); 74 75 CountryHelper helper = new CountryHelper(); 76 List<Country> countryList = new List<Country>(); 77 string currentCountry = "EN"; 78 try 79 { 80 countryList = helper.getActiveCultures(Convert.ToInt32(Pageview.Area.Item["CountriesId"])); 81 foreach (Country country in countryList) 82 { 83 if (country.CurrentCountry) 84 { 85 currentCountry = country.CountryCode; 86 break; 87 } 88 } 89 90 } 91 catch { } 92 string actionUrl = "https://harkila.us2.list-manage.com/subscribe/post?u=180fafb56ecdda514639c68a0&amp;id=" + GetString("Item.ListID.Value"); 93 94 string hexColor = "0x" + GetString("Item.BackgroundColor").Substring(1); 95 @hexColor 96 int r = 0; 97 int g = 0; 98 int p = 0; 99 if (!string.IsNullOrEmpty(GetString("Item.BackgroundColor"))) 100 { 101 r = Convert.ToInt32(hexColor.Substring(2, 2), 16); 102 g = Convert.ToInt32(hexColor.Substring(4, 2), 16); 103 p = Convert.ToInt32(hexColor.Substring(6, 2), 16); 104 } 105 106 107 string backgroundboxcolor = !string.IsNullOrEmpty(GetString("Item.BackgroundColor")) ? "background:rgba(" + r + "," + g + "," + p + ",0.7)" : ""; 108 109 110 } 111 <div id="mc_embed_signup"> 112 <form action="@actionUrl" method="post" 113 id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" style="@backgroundboxcolor" target="_blank" data-module="validation"> 114 115 <h2 class="newsletter__headline">@GetString("Item.Headline.Value")</h2> 116 117 <div class="text-center">@GetString("Item.TextField")</div> 118 119 <div class="grid container"> 120 <div class="row input-row"> 121 122 <!-- Det land siden er på skal have attribute selected --> 123 124 <div class="mc-field-group hidden"> 125 <select id="mce-group[47169]" class="custom-selectbox REQ_CSS" name="group[47169]" data-module="custom-selectbox"> 126 <option value="1" @((currentCountry == "EN") ? "selected" : string.Empty)>@Translate("English", "Engelsk")</option> 127 <option value="2" @((currentCountry == "GB") ? "selected" : string.Empty)>@Translate("English (UK)", "Engelsk (UK)")</option> 128 <option value="4" @((currentCountry == "DK") ? "selected" : string.Empty)>@Translate("Danish", "Dansk")</option> 129 <option value="8">@Translate("Swedish", "Svensk")</option> 130 <option value="16">@Translate("Norwegian", "Norsk")</option> 131 <option value="32">@Translate("German", "Tysk")</option> 132 <option value="64">@Translate("Russian", "Russisk")</option> 133 <option value="128">@Translate("French", "Fransk")</option> 134 </select> 135 </div> 136 137 138 <div class="lg-12 p-5"> 139 <div class="mc-field-group input-field required" data-module="input-fields"> 140 <label for="mce-FNAME" class="label">@Translate("First name", "First name")</label> 141 <input type="text" name="FNAME" class="input required" id="mce-FNAME"> 142 <span class="input-warning hidden">@Translate("Please enter a first name", "Please enter a first name")</span> 143 </div> 144 </div> 145 <div class="lg-12 p-5"> 146 <div class="mc-field-group input-field required" data-module="input-fields"> 147 <label for="mce-LNAME" class="label">@Translate("Last name", "Last name")</label> 148 <input type="text" value="" name="LNAME" class="input required" id="mce-LNAME"> 149 <span class="input-warning hidden">@Translate("Please enter a last name", "Please enter a last name")</span> 150 </div> 151 </div> 152 153 154 <div class="lg-12 p-5"> 155 <div class="mc-field-group input-field required" data-module="input-fields"> 156 <label for="mce-EMAIL" class="label">@Translate("Email", "Email")</label> 157 <input type="email" name="EMAIL" class="input email required" id="mce-EMAIL"> 158 <span class="input-warning hidden">@Translate("Please insert a valid e-mail", "Indsæt venligst en valid e-mail")</span> 159 </div> 160 </div> 161 <div class="lg-12 p-5"> 162 <div class="clear newsletter__btn"> 163 <button type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button btn btn--primary btn--primary__subscribe">@Translate("Subscribe", "Tilmeld")</button> 164 </div> 165 </div> 166 <div class="lg-12 p-5"> 167 <div class="mc-field-group input-group input-field input-field__terms accordion-group checkbox accept-conditions" data-module="accordion"> 168 <label class="radio-button control control--checkbox"> 169 @*<input type="checkbox" value="Accepted" name="MMERGE2" id="mce-MMERGE2-0" class="input-terms" required>@Translate(" I accept the", " Jeg accepterer")*@ 170 <input type="checkbox" id="gdpr_145" name="gdpr[145]" value="Y" class="input-terms required" required>@Translate(" I accept the", " Jeg accepterer") 171 <a class="accordion__title btn">@Translate("(Newsletter)Terms and Conditions", "vilkår og betingelser")</a> 172 <div class="control__indicator"></div> 173 </label> 174 <div class="accordion__content"> 175 <p>@Translate("(Newsletter)Accordion content", "Når du tilmelder dig nyhedsbrevet, accepterer du, at dine personlige oplysninger bliver sendt til Seeland International A/S, så vi kan sende dig nyheder og relevant information")</p> 176 </div> 177 </div> 178 179 </div> 180 181 182 183 </div> 184 <div class="row"> 185 186 <div id="mce-responses" class="clear"> 187 <p class="response" id="mce-error-response" style="display:none"></p> 188 <p class="response" id="mce-success-response" style="display:none"></p> 189 </div> 190 <div style="position: absolute; left: -5000px;" aria-hidden="true"> 191 <input type="text" name="b_180fafb56ecdda514639c68a0_fbc1c0b506" tabindex="-1" value=""> 192 </div> 193 194 195 </div> 196 </div> 197 <div class="grid container"> 198 <div class="row"> 199 200 @if (!string.IsNullOrEmpty(uspText1)) 201 { 202 <div class="xxs-12 md-6 xxl-5 newsletter-usp"> 203 <img class="newsletter-usp__icon" src="@uspIcon1" alt="@uspText1" /> 204 <h4 class="newsletter-usp__title">@uspText1</h4> 205 </div> 206 } 207 @if (!string.IsNullOrEmpty(uspText2)) 208 { 209 <div class="xxs-12 md-6 xxl-5 newsletter-usp"> 210 <img class="newsletter-usp__icon" src="@uspIcon2" alt="@uspText2" /> 211 <h4 class="newsletter-usp__title">@uspText2</h4> 212 </div> 213 } 214 @if (!string.IsNullOrEmpty(uspText3)) 215 { 216 <div class="xxs-12 md-6 xxl-5 newsletter-usp"> 217 <img class="newsletter-usp__icon" src="@uspIcon3" alt="@uspText3" /> 218 <h4 class="newsletter-usp__title">@uspText3</h4> 219 </div> 220 } 221 @if (!string.IsNullOrEmpty(uspText4)) 222 { 223 <div class="xxs-12 md-6 xxl-5 newsletter-usp"> 224 <img class="newsletter-usp__icon" src="@uspIcon4" alt="@uspText4" /> 225 <h4 class="newsletter-usp__title">@uspText4</h4> 226 </div> 227 } 228 </div> 229 </div> 230 </form> 231 232 </div> 233 234 235 </section> 236 } 237 else 238 { 239 string altText = GetString("Item.AltText.Value"); 240 241 if (string.IsNullOrEmpty(altText)) 242 { 243 altText = "Alt Text"; 244 } 245 string picturePath = "/admin/public/GetImage.ashx?Image=" + GetString("Item.PicturePath.Value"); 246 247 string lazyload = ""; 248 if (!String.IsNullOrEmpty(picturePath)) 249 { 250 lazyload = "lazy-img lazy-bg"; 251 } 252 253 <section class="newsletter newsletter-ribbon @lazyload text-@textcolor" data-src-xxs="@picturePath&width=750" data-src-xs="@picturePath&width=980" data-src-sm="@picturePath&width=680" data-src-md="@picturePath&width=1024" 254 data-src-lg="@picturePath&width=1280" data-src-xl="@picturePath&width=1460" data-src-xxl="@picturePath&width=1920" data-alt="@altText"> 255 @using Dynamicweb.Rendering; 256 @using Logic.Helpers; 257 @using Logic.Models; 258 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 259 260 @{ 261 string uspText1 = GetString("Item.Text_1.Value"); 262 string uspText2 = GetString("Item.Text_2.Value"); 263 string uspText3 = GetString("Item.Text_3.Value"); 264 string uspText4 = GetString("Item.Text_4.Value"); 265 266 string uspIcon1 = GetString("Item.Icon_1.Value"); 267 string uspIcon2 = GetString("Item.Icon_2.Value"); 268 string uspIcon3 = GetString("Item.Icon_3.Value"); 269 string uspIcon4 = GetString("Item.Icon_4.Value"); 270 271 CountryHelper helper = new CountryHelper(); 272 List<Country> countryList = new List<Country>(); 273 string currentCountry = "EN"; 274 try 275 { 276 countryList = helper.getActiveCultures(Convert.ToInt32(Pageview.Area.Item["CountriesId"])); 277 foreach (Country country in countryList) 278 { 279 if (country.CurrentCountry) 280 { 281 currentCountry = country.CountryCode; 282 break; 283 } 284 } 285 286 } 287 catch { } 288 string actionUrl = "https://harkila.us2.list-manage.com/subscribe/post?u=180fafb56ecdda514639c68a0&amp;id=" + GetString("Item.ListID.Value"); 289 290 string hexColor = "0x" + GetString("Item.BackgroundColor").Substring(1); 291 @hexColor 292 int r = 0; 293 int g = 0; 294 int p = 0; 295 if (!string.IsNullOrEmpty(GetString("Item.BackgroundColor"))) 296 { 297 r = Convert.ToInt32(hexColor.Substring(2, 2), 16); 298 g = Convert.ToInt32(hexColor.Substring(4, 2), 16); 299 p = Convert.ToInt32(hexColor.Substring(6, 2), 16); 300 } 301 302 303 string backgroundboxcolor = !string.IsNullOrEmpty(GetString("Item.BackgroundColor")) ? "background:rgba(" + r + "," + g + "," + p + ",0.7)" : ""; 304 305 306 } 307 <div id="mc_embed_signup"> 308 <form action="@actionUrl" method="post" 309 id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" style="@backgroundboxcolor" target="_blank" data-module="validation"> 310 311 <h2 class="newsletter__headline">@GetString("Item.Headline.Value")</h2> 312 313 <div class="text-center">@GetString("Item.TextField")</div> 314 315 <div class="grid container"> 316 <div class="row input-row"> 317 318 <!-- Det land siden er på skal have attribute selected --> 319 320 <div class="mc-field-group hidden"> 321 <select id="mce-group[47169]" class="custom-selectbox REQ_CSS" name="group[47169]" data-module="custom-selectbox"> 322 <option value="1" @((currentCountry == "EN") ? "selected" : string.Empty)>@Translate("English", "Engelsk")</option> 323 <option value="2" @((currentCountry == "GB") ? "selected" : string.Empty)>@Translate("English (UK)", "Engelsk (UK)")</option> 324 <option value="4" @((currentCountry == "DK") ? "selected" : string.Empty)>@Translate("Danish", "Dansk")</option> 325 <option value="8">@Translate("Swedish", "Svensk")</option> 326 <option value="16">@Translate("Norwegian", "Norsk")</option> 327 <option value="32">@Translate("German", "Tysk")</option> 328 <option value="64">@Translate("Russian", "Russisk")</option> 329 <option value="128">@Translate("French", "Fransk")</option> 330 </select> 331 </div> 332 333 334 <div class="lg-12 p-5"> 335 <div class="mc-field-group input-field required" data-module="input-fields"> 336 <label for="mce-FNAME" class="label">@Translate("First name", "First name")</label> 337 <input type="text" name="FNAME" class="input required" id="mce-FNAME"> 338 <span class="input-warning hidden">@Translate("Please enter a first name", "Please enter a first name")</span> 339 </div> 340 </div> 341 <div class="lg-12 p-5"> 342 <div class="mc-field-group input-field required" data-module="input-fields"> 343 <label for="mce-LNAME" class="label">@Translate("Last name", "Last name")</label> 344 <input type="text" value="" name="LNAME" class="input required" id="mce-LNAME"> 345 <span class="input-warning hidden">@Translate("Please enter a last name", "Please enter a last name")</span> 346 </div> 347 </div> 348 349 350 <div class="lg-12 p-5"> 351 <div class="mc-field-group input-field required" data-module="input-fields"> 352 <label for="mce-EMAIL" class="label">@Translate("Email", "Email")</label> 353 <input type="email" name="EMAIL" class="input email required" id="mce-EMAIL"> 354 <span class="input-warning hidden">@Translate("Please insert a valid e-mail", "Indsæt venligst en valid e-mail")</span> 355 </div> 356 </div> 357 <div class="lg-12 p-5"> 358 <div class="clear newsletter__btn"> 359 <button type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button btn btn--primary btn--primary__subscribe">@Translate("Subscribe", "Tilmeld")</button> 360 </div> 361 </div> 362 <div class="lg-12 p-5"> 363 <div class="mc-field-group input-group input-field input-field__terms accordion-group checkbox accept-conditions" data-module="accordion"> 364 <label class="radio-button control control--checkbox"> 365 @*<input type="checkbox" value="Accepted" name="MMERGE2" id="mce-MMERGE2-0" class="input-terms" required>@Translate(" I accept the", " Jeg accepterer")*@ 366 <input type="checkbox" id="gdpr_145" name="gdpr[145]" value="Y" class="input-terms required" required>@Translate(" I accept the", " Jeg accepterer") 367 <a class="accordion__title btn">@Translate("(Newsletter)Terms and Conditions", "vilkår og betingelser")</a> 368 <div class="control__indicator"></div> 369 </label> 370 <div class="accordion__content"> 371 <p>@Translate("(Newsletter)Accordion content", "Når du tilmelder dig nyhedsbrevet, accepterer du, at dine personlige oplysninger bliver sendt til Seeland International A/S, så vi kan sende dig nyheder og relevant information")</p> 372 </div> 373 </div> 374 375 </div> 376 377 378 379 </div> 380 <div class="row"> 381 382 <div id="mce-responses" class="clear"> 383 <p class="response" id="mce-error-response" style="display:none"></p> 384 <p class="response" id="mce-success-response" style="display:none"></p> 385 </div> 386 <div style="position: absolute; left: -5000px;" aria-hidden="true"> 387 <input type="text" name="b_180fafb56ecdda514639c68a0_fbc1c0b506" tabindex="-1" value=""> 388 </div> 389 390 391 </div> 392 </div> 393 <div class="grid container"> 394 <div class="row"> 395 396 @if (!string.IsNullOrEmpty(uspText1)) 397 { 398 <div class="xxs-12 md-6 xxl-5 newsletter-usp"> 399 <img class="newsletter-usp__icon" src="@uspIcon1" alt="@uspText1" /> 400 <h4 class="newsletter-usp__title">@uspText1</h4> 401 </div> 402 } 403 @if (!string.IsNullOrEmpty(uspText2)) 404 { 405 <div class="xxs-12 md-6 xxl-5 newsletter-usp"> 406 <img class="newsletter-usp__icon" src="@uspIcon2" alt="@uspText2" /> 407 <h4 class="newsletter-usp__title">@uspText2</h4> 408 </div> 409 } 410 @if (!string.IsNullOrEmpty(uspText3)) 411 { 412 <div class="xxs-12 md-6 xxl-5 newsletter-usp"> 413 <img class="newsletter-usp__icon" src="@uspIcon3" alt="@uspText3" /> 414 <h4 class="newsletter-usp__title">@uspText3</h4> 415 </div> 416 } 417 @if (!string.IsNullOrEmpty(uspText4)) 418 { 419 <div class="xxs-12 md-6 xxl-5 newsletter-usp"> 420 <img class="newsletter-usp__icon" src="@uspIcon4" alt="@uspText4" /> 421 <h4 class="newsletter-usp__title">@uspText4</h4> 422 </div> 423 } 424 </div> 425 </div> 426 </form> 427 428 </div> 429 430 431 </section> 432 } 433 <div class="mc-field-group" hidden> 434 <select name="group[47169]" class="REQ_CSS" id="mce-group[47169]"> 435 <option value="@value"></option> 436 </select> 437 </div> 438 439 <script type='text/javascript' src='//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js'></script> 440 <script type='text/javascript'>(function ($) { window.fnames = new Array(); window.ftypes = new Array(); fnames[0] = 'EMAIL'; ftypes[0] = 'email'; fnames[1] = 'FNAME'; ftypes[1] = 'text'; fnames[2] = 'MMERGE2'; ftypes[2] = 'radio'; fnames[3] = 'MMERGE3'; ftypes[3] = 'text'; }(jQuery)); var $mcj = jQuery.noConflict(true);</script> 441 } 442

WIR VERWENDEN COOKIES

Zur Verbesserung Ihres Einkaufserlebnisses werden auf dieser Website Cookies verwendet. Falls Sie weiterhin unsere Serviceleistungen nutzen, gehen wir davon aus, dass Sie in die Verwendung von Cookies zur Speicherung Ihrer Einstellungen und statistischer Daten im Zusammenhang mit Ihrem Einkauf einwilligen.

Hier mehr erfahren