{{EmailMarketing:Email.PreHeader}}
If you can't see this newsletter, please click here
 
Error compiling template "/Designs/hoshinoB2C/EmailMarketing/Paragraph/EmailMarketingParagraphWithToken.cshtml"
Line 23: The type or namespace name 'CustomFields' does not exist in the namespace 'Dynamicweb.Modules.Common' (are you missing an assembly reference?)
Line 196: The type or namespace name 'User' could not be found (are you missing a using directive or an assembly reference?)
Line 205: The type or namespace name 'User' could not be found (are you missing a using directive or an assembly reference?)

1 //------------------------------------------------------------------------------ 2 // <auto-generated> 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319.42000 5 // 6 // Changes to this file may cause incorrect behavior and will be lost if 7 // the code is regenerated. 8 // </auto-generated> 9 //------------------------------------------------------------------------------ 10 11 namespace CompiledRazorTemplates.Dynamic { 12 using System; 13 using System.Collections.Generic; 14 using System.Linq; 15 16 #line 203 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 17 using Dynamicweb.Rendering; 18 19 #line default 20 #line hidden 21 22 #line 4 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 23 using Dynamicweb.Modules.Common.CustomFields; 24 25 #line default 26 #line hidden 27 28 #line 5 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 29 using Dynamicweb.Modules.UserManagement; 30 31 #line default 32 #line hidden 33 34 #line 6 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 35 using Dynamicweb.Environment; 36 37 #line default 38 #line hidden 39 40 41 public class RazorEngine_385a8916357040daa5673ebea4f78fe6 : RazorTemplateBase<RazorTemplateModel<Template>> { 42 43 #line hidden 44 45 #line 169 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 46 public RazorEngine.Templating.TemplateWriter CreateButton(string link, string text, string style = "width:120px;height:40px;line-height:40px;background:#333333;color:#ffffff;font-family:sans-serif;font-size:14px;text-align:center;text-decoration:none;", Dictionary<string, string> options = null){ 47 #line default 48 #line hidden 49 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 50 51 #line 169 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 52 53 string rect = style, 54 anchor = style; 55 56 if(string.IsNullOrEmpty(style)){ 57 string width = options != null && options.ContainsKey("width") ? options["width"].ToString() : "120px", 58 height = options != null && options.ContainsKey("height") ? options["height"].ToString() : "40px", 59 background = options != null && options.ContainsKey("background") ? options["background"].ToString() : "#256F9C", 60 border = options != null && options.ContainsKey("border") ? options["border"].ToString() : "1px solid ffffff", 61 color = options != null && options.ContainsKey("color") ? options["color"].ToString() : "#ffffff", 62 fontFamily = options != null && options.ContainsKey("font-family") ? options["font-family"].ToString() : "Helvetica, Arial, sans-serif", 63 fontSize = options != null && options.ContainsKey("font-size") ? options["font-size"].ToString() : "14px", 64 fontStyle = options != null && options.ContainsKey("font-style") ? options["font-style"].ToString() : "normal", 65 textAlign = options != null && options.ContainsKey("text-align") ? options["text-align"].ToString() : "center", 66 textDecoration = options != null && options.ContainsKey("text-decoration") ? options["text-decoration"].ToString() : "none"; 67 68 rect = "style=\"width:" + width + ";height:" + height + ";border:" + border + ";color:" + color + ";v-text-anchor:middle; \" fillcolor=\"" + background + "\""; 69 anchor = "width:" + width + ";height:" + height + ";line-height:" + height + ";background:" + background + ";border:" + border + ";color:" + color + ";font-family:" + fontFamily + ";font-size:" + fontSize + ";font-style:" + fontStyle + ";text-align:" + textAlign + ";text-decoration:" + textDecoration + ";"; 70 } 71 72 73 74 #line default 75 #line hidden 76 WriteLiteralTo(__razor_helper_writer, " <div>\r\n <!--[if mso]>\r\n <v:rect xmlns:v=\"urn:schemas-microsoft-com:vml\"" + 77 " xmlns:w=\"urn:schemas-microsoft-com:office:word\" href=\""); 78 79 80 #line 191 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 81 WriteTo(__razor_helper_writer, link); 82 83 84 #line default 85 #line hidden 86 WriteLiteralTo(__razor_helper_writer, "\" "); 87 88 89 #line 191 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 90 WriteTo(__razor_helper_writer, rect); 91 92 93 #line default 94 #line hidden 95 WriteLiteralTo(__razor_helper_writer, ">\r\n <w:anchorlock/>\r\n <center>\r\n <![endif]-->\r\n <a"); 96 97 WriteLiteralTo(__razor_helper_writer, " class=\"mobile-button\""); 98 99 WriteLiteralTo(__razor_helper_writer, " target=\"_blank\""); 100 101 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 10705), Tuple.Create("\"", 10717) 102 103 #line 195 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 104 , Tuple.Create(Tuple.Create("", 10712), Tuple.Create<System.Object, System.Int32>(link 105 106 #line default 107 #line hidden 108 , 10712), false) 109 ); 110 111 WriteAttributeTo(__razor_helper_writer, "style", Tuple.Create(" style=\"", 10718), Tuple.Create("\"", 10784) 112 , Tuple.Create(Tuple.Create("", 10726), Tuple.Create("-webkit-text-size-adjust:none;display:inline-block;", 10726), true) 113 114 #line 195 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 115 , Tuple.Create(Tuple.Create("", 10777), Tuple.Create<System.Object, System.Int32>(anchor 116 117 #line default 118 #line hidden 119 , 10777), false) 120 ); 121 122 WriteLiteralTo(__razor_helper_writer, ">"); 123 124 125 #line 195 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 126 WriteTo(__razor_helper_writer, text); 127 128 129 #line default 130 #line hidden 131 WriteLiteralTo(__razor_helper_writer, "</a>\r\n <!--[if mso]>\r\n </center>\r\n </v:rect>\r\n <![endif]-->\r\n " + 132 "</div>\r\n"); 133 134 135 #line 201 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 136 137 138 #line default 139 #line hidden 140 }); 141 142 #line 201 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 143 } 144 #line default 145 #line hidden 146 147 148 #line 204 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 149 150 public static string GetImage(string source, int widthNum = 600, int heightNum = 200, string format = "jpg", int num_compression = 85, int num_crop = 5){ 151 Dynamicweb.Frontend.PageView obj_currentPageview = Dynamicweb.Frontend.PageView.Current(); 152 string alternativeImage = obj_currentPageview.Area.Item["NoImage"] != null ? obj_currentPageview.Area.Item["NoImage"].ToString() : "", 153 width = widthNum != 0 ? "&amp;Width=" + widthNum.ToString() : "", 154 height = heightNum != 0 ? "&amp;Height=" + heightNum.ToString(): ""; 155 format = format != "jpg" ? "&amp;Format=" + format : ""; 156 157 string output = "/Admin/Public/GetImage.ashx?Image=" + source + width + height + "&amp;altFmImage_path=" + alternativeImage + format + "&amp;Compression=" + num_compression + "&amp;Crop=" + num_crop; 158 return output.ToString(); 159 } 160 161 #line default 162 #line hidden 163 164 165 public RazorEngine_385a8916357040daa5673ebea4f78fe6() { 166 } 167 168 public override void Execute() { 169 WriteLiteral("\r\n"); 170 171 WriteLiteral("\r\n\r\n"); 172 173 174 #line 9 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 175 176 bool bol_showButton = GetBoolean("Item.ShowReadMoreButton"); 177 string str_title = GetBoolean("Item.ShowTitle") ? GetString("Item.Title") : ""; 178 string str_titleHeading = GetString("Item.HeadingType") != "" ? GetString("Item.HeadingType") : "h2"; 179 string str_titleOrder = GetString("Item.TitleOrder"); 180 string str_image = GetString("Item.Image"); 181 string str_imageTitle = GetString("Item.ImageTitle"); 182 string str_text = GetString("Item.Text"); 183 string str_imageAlignment = GetString("Item.Order"); 184 string str_backgroundColor = GetString("Item.Background"); 185 string str_link = GetString("Item.Link"); 186 string str_linkText = GetString("Item.LinkText"); 187 string str_imageAnchorStart = str_link != "" ? "<a target=\"_blank\" href=\"" + str_link + "\">" : ""; 188 string str_imageAnchorEnd = str_link != "" ? "</a>" : ""; 189 string str_titleAlignment = str_imageAlignment != "image-top" || str_image == "" ? "left" : "center" ; 190 string str_fontFamily = "font-family: Helvetica, Arial, sans-serif; color:#666666; font-weight:normal;"; 191 int num_width = GetInteger("Item.Width"); 192 string str_col = num_width == 50 ? "250" : "500"; 193 bool bol_break = Dynamicweb.Core.Converter.ToInt32(Dynamicweb.Context.Current.Items["currentColumns"]) == 100; 194 195 196 User user = null; 197 198 string resetLink = ""; 199 string loginName = ""; 200 string name = ""; 201 string website = ""; 202 203 if (Pageview.Context != null){ 204 205 user = Pageview.Context.GetValue("User") as User; 206 //Security token related 207 if (user != null){ 208 loginName = user.UserName; 209 name = !String.IsNullOrWhiteSpace(user.Name) ? user.Name : user.FirstName + " " + user.LastName; 210 int resetPageID = int.Parse(Pageview.Area.Item["Login"].ToString().Replace("Default.aspx?ID=", "")); 211 string domainHost = Dynamicweb.Services.Areas.GetArea(Dynamicweb.Frontend.PageView.GetPageviewByPageID(resetPageID).AreaID).DomainLock; 212 string token = System.Guid.NewGuid().ToString(); 213 resetLink = (Dynamicweb.Context.Current.Request.IsSecureConnection ? "https://" : "http://") +Dynamicweb.Context.Current.Request.Url.Host + Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(resetPageID) + "?Username=" + loginName + "&RecoveryToken=" + token; 214 user.PasswordRecoveryTokenExpirationTime = DateTime.UtcNow.AddHours(168); 215 user.PasswordRecoveryToken = token; 216 user.Save(); 217 } 218 } 219 //variable options 220 str_text = str_text.Replace("{{UserId}}", loginName); 221 str_text = str_text.Replace("{{ResetLink}}", resetLink); 222 str_text = str_text.Replace("{{UserName}}", name); 223 str_text = str_text.Replace("{{Website}}", website); 224 225 226 if (GetBoolean("ParagraphContainerIsFirst")) 227 { 228 Dynamicweb.Context.Current.Items["currentColumns"] = 0; 229 } 230 Dynamicweb.Context.Current.Items["currentColumns"] = Dynamicweb.Core.Converter.ToInt32(Dynamicweb.Context.Current.Items["currentColumns"]) + num_width; 231 if(Dynamicweb.Core.Converter.ToInt32(Dynamicweb.Context.Current.Items["currentColumns"]) > 100) { 232 Dynamicweb.Context.Current.Items["currentColumns"] = num_width; 233 } 234 Dictionary<string, string> dict_buttonBlue = new Dictionary<string, string> 235 { 236 {"width", "210px"}, 237 {"height", "45px"}, 238 {"background", "#6FAE47"}, 239 {"color", "#ffffff"}, 240 {"font-size", "16px"}, 241 {"font-style", "normal"} 242 }; 243 string str_tableStart = (bol_break || Dynamicweb.Core.Converter.ToInt32(Dynamicweb.Context.Current.Items["currentColumns"]) == 0 || GetBoolean("ParagraphContainerIsFirst") ) ? "<tr align='center' border='0' cellspacing='0' cellpadding='0' width='100%' bgcolor='"+str_backgroundColor+"' style='"+str_fontFamily+"'><td align='center'><table class='responsive-table clearLeft' border='0' cellspacing='0' cellpadding='0' width='500'><tr>" : ""; 244 string str_tableEnd = (Dynamicweb.Core.Converter.ToInt32(Dynamicweb.Context.Current.Items["currentColumns"]) == 50) ? "</tr><tr><td height='30'></td></tr></table></td></tr>" : ""; 245 Dynamicweb.Context.Current.Items["oldColumns"] = Dynamicweb.Context.Current.Items["currentColumns"]; 246 string endHeading = "</"+str_titleHeading+">"; 247 248 249 #line default 250 #line hidden 251 WriteLiteral("\r\n\r\n"); 252 253 254 #line 83 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 255 if(!GetBoolean("ParagraphContainerIsFirst")) { 256 257 258 #line default 259 #line hidden 260 261 #line 84 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 262 Write(str_tableEnd); 263 264 265 #line default 266 #line hidden 267 268 #line 84 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 269 270 } 271 272 273 #line default 274 #line hidden 275 WriteLiteral("\r\n"); 276 277 278 #line 87 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 279 Write(str_tableStart); 280 281 282 #line default 283 #line hidden 284 WriteLiteral("\r\n\r\n <td"); 285 286 WriteLiteral(" border=\"0\""); 287 288 WriteLiteral(" cellspacing=\"0\""); 289 290 WriteLiteral(" cellpadding=\"0\""); 291 292 WriteAttribute("width", Tuple.Create(" width=\"", 4513), Tuple.Create("\"", 4529) 293 294 #line 89 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 295 , Tuple.Create(Tuple.Create("", 4521), Tuple.Create<System.Object, System.Int32>(str_col 296 297 #line default 298 #line hidden 299 , 4521), false) 300 ); 301 302 WriteAttribute("bgcolor", Tuple.Create(" bgcolor=\"", 4530), Tuple.Create("\"", 4560) 303 304 #line 89 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 305 , Tuple.Create(Tuple.Create("", 4540), Tuple.Create<System.Object, System.Int32>(str_backgroundColor 306 307 #line default 308 #line hidden 309 , 4540), false) 310 ); 311 312 WriteAttribute("style", Tuple.Create(" style=\"", 4561), Tuple.Create("\"", 4584) 313 314 #line 89 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 315 , Tuple.Create(Tuple.Create("", 4569), Tuple.Create<System.Object, System.Int32>(str_fontFamily 316 317 #line default 318 #line hidden 319 , 4569), false) 320 ); 321 322 WriteLiteral(" class=\"responsive-table\""); 323 324 WriteLiteral(">\r\n <table"); 325 326 WriteLiteral(" border=\"0\""); 327 328 WriteLiteral(" cellspacing=\"0\""); 329 330 WriteLiteral(" cellpadding=\"0\""); 331 332 WriteAttribute("width", Tuple.Create(" width=\"", 4670), Tuple.Create("\"", 4686) 333 334 #line 90 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 335 , Tuple.Create(Tuple.Create("", 4678), Tuple.Create<System.Object, System.Int32>(str_col 336 337 #line default 338 #line hidden 339 , 4678), false) 340 ); 341 342 WriteAttribute("bgcolor", Tuple.Create(" bgcolor=\"", 4687), Tuple.Create("\"", 4717) 343 344 #line 90 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 345 , Tuple.Create(Tuple.Create("", 4697), Tuple.Create<System.Object, System.Int32>(str_backgroundColor 346 347 #line default 348 #line hidden 349 , 4697), false) 350 ); 351 352 WriteAttribute("style", Tuple.Create(" style=\"", 4718), Tuple.Create("\"", 4741) 353 354 #line 90 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 355 , Tuple.Create(Tuple.Create("", 4726), Tuple.Create<System.Object, System.Int32>(str_fontFamily 356 357 #line default 358 #line hidden 359 , 4726), false) 360 ); 361 362 WriteLiteral(" class=\"responsive-table\""); 363 364 WriteLiteral(">\r\n"); 365 366 367 #line 91 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 368 369 370 #line default 371 #line hidden 372 373 #line 91 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 374 if(str_title != "" && (str_titleOrder == "title-first" || str_titleOrder == "" )){ 375 376 377 #line default 378 #line hidden 379 WriteLiteral(" <tr>\r\n <td"); 380 381 WriteAttribute("align", Tuple.Create(" align=\"", 4894), Tuple.Create("\"", 4921) 382 383 #line 93 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 384 , Tuple.Create(Tuple.Create("", 4902), Tuple.Create<System.Object, System.Int32>(str_titleAlignment 385 386 #line default 387 #line hidden 388 , 4902), false) 389 ); 390 391 WriteLiteral(" valign=\"top\""); 392 393 WriteLiteral(">\r\n <"); 394 395 396 #line 94 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 397 Write(str_titleHeading); 398 399 400 #line default 401 #line hidden 402 WriteLiteral(" style=\"font-size: 24px; padding:0; margin:0; "); 403 404 405 #line 94 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 406 Write(str_fontFamily); 407 408 409 #line default 410 #line hidden 411 WriteLiteral(" color:#333333;\">"); 412 413 414 #line 94 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 415 Write(str_title); 416 417 418 #line default 419 #line hidden 420 WriteLiteral(" "); 421 422 423 #line 94 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 424 Write(endHeading); 425 426 427 #line default 428 #line hidden 429 WriteLiteral("\r\n </td>\r\n <td"); 430 431 WriteLiteral(" width=\"10\""); 432 433 WriteLiteral(" height=\"10\""); 434 435 WriteAttribute("style", Tuple.Create(" style=\"", 5130), Tuple.Create("\"", 5153) 436 437 #line 96 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 438 , Tuple.Create(Tuple.Create("", 5138), Tuple.Create<System.Object, System.Int32>(str_fontFamily 439 440 #line default 441 #line hidden 442 , 5138), false) 443 ); 444 445 WriteLiteral(">&nbsp;</td>\r\n </tr>\r\n"); 446 447 448 #line 98 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 449 } 450 451 452 #line default 453 #line hidden 454 WriteLiteral(" "); 455 456 457 #line 99 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 458 if(str_image != "" && str_imageAlignment == "image-top"){ 459 str_imageTitle = str_imageTitle != "" ? str_imageTitle : str_title; 460 461 462 #line default 463 #line hidden 464 WriteLiteral(" <tr>\r\n <td"); 465 466 WriteLiteral(" align=\"center\""); 467 468 WriteLiteral(" valign=\"top\""); 469 470 WriteLiteral(">\r\n"); 471 472 WriteLiteral(" "); 473 474 475 #line 103 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 476 Write(str_imageAnchorStart); 477 478 479 #line default 480 #line hidden 481 WriteLiteral("\r\n <img"); 482 483 WriteLiteral(" class=\"img-max\""); 484 485 WriteAttribute("src", Tuple.Create(" src=\"", 5478), Tuple.Create("\"", 5512) 486 487 #line 104 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 488 , Tuple.Create(Tuple.Create("", 5484), Tuple.Create<System.Object, System.Int32>(GetImage(str_image, 600, 0) 489 490 #line default 491 #line hidden 492 , 5484), false) 493 ); 494 495 WriteAttribute("alt", Tuple.Create(" alt=\"", 5513), Tuple.Create("\"", 5534) 496 497 #line 104 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 498 , Tuple.Create(Tuple.Create("", 5519), Tuple.Create<System.Object, System.Int32>(str_imageTitle 499 500 #line default 501 #line hidden 502 , 5519), false) 503 ); 504 505 WriteAttribute("title", Tuple.Create(" title=\"", 5535), Tuple.Create("\"", 5558) 506 507 #line 104 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 508 , Tuple.Create(Tuple.Create("", 5543), Tuple.Create<System.Object, System.Int32>(str_imageTitle 509 510 #line default 511 #line hidden 512 , 5543), false) 513 ); 514 515 WriteLiteral(" />\r\n"); 516 517 WriteLiteral(" "); 518 519 520 #line 105 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 521 Write(str_imageAnchorEnd); 522 523 524 #line default 525 #line hidden 526 WriteLiteral("\r\n </td>\r\n </tr>\r\n"); 527 528 WriteLiteral(" <tr>\r\n <td"); 529 530 WriteLiteral(" width=\"10\""); 531 532 WriteLiteral(" height=\"20\""); 533 534 WriteLiteral(">&nbsp;</td>\r\n </tr>\r\n"); 535 536 537 #line 111 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 538 } 539 540 541 #line default 542 #line hidden 543 WriteLiteral("\r\n"); 544 545 546 #line 113 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 547 548 549 #line default 550 #line hidden 551 552 #line 113 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 553 if(str_text != "" || str_imageAlignment != "image-top"){ 554 555 556 #line default 557 #line hidden 558 WriteLiteral("\t <tr>\r\n <td"); 559 560 WriteLiteral(" width=\"10\""); 561 562 WriteLiteral(" height=\"10\""); 563 564 WriteLiteral(">&nbsp;</td>\r\n </tr>\r\n"); 565 566 WriteLiteral(" <tr>\r\n <td"); 567 568 WriteLiteral(" align=\"left\""); 569 570 WriteLiteral(" valign=\"top\""); 571 572 WriteLiteral(">\r\n <table"); 573 574 WriteLiteral(" class=\"imageAside\""); 575 576 WriteLiteral(" colspan=\"2\""); 577 578 WriteLiteral(" border=\"0\""); 579 580 WriteLiteral(" cellspacing=\"0\""); 581 582 WriteLiteral(" cellpadding=\"0\""); 583 584 WriteLiteral(" width=\"100%\""); 585 586 WriteAttribute("style", Tuple.Create(" style=\"", 6049), Tuple.Create("\"", 6072) 587 588 #line 119 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 589 , Tuple.Create(Tuple.Create("", 6057), Tuple.Create<System.Object, System.Int32>(str_fontFamily 590 591 #line default 592 #line hidden 593 , 6057), false) 594 ); 595 596 WriteLiteral(">\r\n <tr>\r\n"); 597 598 599 #line 121 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 600 601 602 #line default 603 #line hidden 604 605 #line 121 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 606 if(str_image != "" && str_imageAlignment == "image-left-column"){ 607 str_imageTitle = str_imageTitle != "" ? str_imageTitle : str_title; 608 609 610 #line default 611 #line hidden 612 WriteLiteral(" <td"); 613 614 WriteLiteral(" align=\"left\""); 615 616 WriteLiteral(" valign=\"top\""); 617 618 WriteLiteral(">\r\n"); 619 620 WriteLiteral(" "); 621 622 623 #line 124 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 624 Write(str_imageAnchorStart); 625 626 627 #line default 628 #line hidden 629 WriteLiteral("\r\n <img"); 630 631 WriteLiteral(" class=\"img-max\""); 632 633 WriteAttribute("src", Tuple.Create(" src=\"", 6414), Tuple.Create("\"", 6448) 634 635 #line 125 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 636 , Tuple.Create(Tuple.Create("", 6420), Tuple.Create<System.Object, System.Int32>(GetImage(str_image, 300, 0) 637 638 #line default 639 #line hidden 640 , 6420), false) 641 ); 642 643 WriteAttribute("alt", Tuple.Create(" alt=\"", 6449), Tuple.Create("\"", 6470) 644 645 #line 125 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 646 , Tuple.Create(Tuple.Create("", 6455), Tuple.Create<System.Object, System.Int32>(str_imageTitle 647 648 #line default 649 #line hidden 650 , 6455), false) 651 ); 652 653 WriteAttribute("title", Tuple.Create(" title=\"", 6471), Tuple.Create("\"", 6494) 654 655 #line 125 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 656 , Tuple.Create(Tuple.Create("", 6479), Tuple.Create<System.Object, System.Int32>(str_imageTitle 657 658 #line default 659 #line hidden 660 , 6479), false) 661 ); 662 663 WriteLiteral(" />\r\n"); 664 665 WriteLiteral(" "); 666 667 668 #line 126 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 669 Write(str_imageAnchorEnd); 670 671 672 #line default 673 #line hidden 674 WriteLiteral("\r\n </td>\r\n"); 675 676 WriteLiteral(" <td"); 677 678 WriteLiteral(" width=\"10\""); 679 680 WriteLiteral(" height=\"30\""); 681 682 WriteLiteral(">&nbsp;</td>\r\n"); 683 684 685 #line 129 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 686 } 687 688 689 #line default 690 #line hidden 691 WriteLiteral(" "); 692 693 694 #line 130 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 695 if(str_text != ""){ 696 697 698 #line default 699 #line hidden 700 WriteLiteral(" <td"); 701 702 WriteAttribute("align", Tuple.Create(" align=\"", 6714), Tuple.Create("\"", 6741) 703 704 #line 131 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 705 , Tuple.Create(Tuple.Create("", 6722), Tuple.Create<System.Object, System.Int32>(str_titleAlignment 706 707 #line default 708 #line hidden 709 , 6722), false) 710 ); 711 712 WriteLiteral(" valign=\"top\""); 713 714 WriteAttribute("style", Tuple.Create(" style=\"", 6755), Tuple.Create("\"", 6814) 715 , Tuple.Create(Tuple.Create("", 6763), Tuple.Create("font-size:", 6763), true) 716 , Tuple.Create(Tuple.Create(" ", 6773), Tuple.Create("14px;", 6774), true) 717 , Tuple.Create(Tuple.Create(" ", 6779), Tuple.Create("line-height:", 6780), true) 718 , Tuple.Create(Tuple.Create(" ", 6792), Tuple.Create("20px;", 6793), true) 719 720 #line 131 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 721 , Tuple.Create(Tuple.Create(" ", 6798), Tuple.Create<System.Object, System.Int32>(str_fontFamily 722 723 #line default 724 #line hidden 725 , 6799), false) 726 ); 727 728 WriteLiteral(">\r\n"); 729 730 731 #line 132 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 732 733 734 #line default 735 #line hidden 736 737 #line 132 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 738 if( str_title != "" && str_titleOrder == "title-with-text" ){ 739 740 741 #line default 742 #line hidden 743 WriteLiteral(" <div><"); 744 745 746 #line 133 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 747 Write(str_titleHeading); 748 749 750 #line default 751 #line hidden 752 WriteLiteral(" align=\""); 753 754 755 #line 133 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 756 Write(str_titleAlignment); 757 758 759 #line default 760 #line hidden 761 WriteLiteral("\" style=\"font-size: 24px; margin:0; padding:0; "); 762 763 764 #line 133 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 765 Write(str_fontFamily); 766 767 768 #line default 769 #line hidden 770 WriteLiteral(" color:#333333;\">"); 771 772 773 #line 133 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 774 Write(str_title); 775 776 777 #line default 778 #line hidden 779 WriteLiteral(" "); 780 781 782 #line 133 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 783 Write(endHeading); 784 785 786 #line default 787 #line hidden 788 WriteLiteral(" </div>\r\n"); 789 790 WriteLiteral(" <br/>\r\n"); 791 792 793 #line 135 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 794 } 795 796 797 #line default 798 #line hidden 799 WriteLiteral(" "); 800 801 802 #line 136 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 803 Write(str_text); 804 805 806 #line default 807 #line hidden 808 WriteLiteral("\r\n"); 809 810 811 #line 137 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 812 813 814 #line default 815 #line hidden 816 817 #line 137 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 818 if(str_link != "" && str_linkText != "" && bol_showButton){ 819 820 821 #line default 822 #line hidden 823 WriteLiteral(" <br/>\r\n"); 824 825 826 #line 139 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 827 828 829 #line default 830 #line hidden 831 832 #line 139 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 833 Write(CreateButton(str_link, str_linkText, null, dict_buttonBlue)); 834 835 836 #line default 837 #line hidden 838 839 #line 139 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 840 841 } 842 843 844 #line default 845 #line hidden 846 WriteLiteral(" </td>\r\n"); 847 848 849 #line 142 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 850 } 851 852 853 #line default 854 #line hidden 855 WriteLiteral(" "); 856 857 858 #line 143 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 859 if(str_image != "" && str_imageAlignment == "image-right-column"){ 860 str_imageTitle = str_imageTitle != "" ? str_imageTitle : str_title; 861 862 863 #line default 864 #line hidden 865 WriteLiteral(" <td"); 866 867 WriteLiteral(" width=\"10\""); 868 869 WriteLiteral(" height=\"10\""); 870 871 WriteLiteral(">&nbsp;</td>\r\n"); 872 873 WriteLiteral(" <td"); 874 875 WriteLiteral(" align=\"right\""); 876 877 WriteLiteral(" valign=\"top\""); 878 879 WriteLiteral(">\r\n"); 880 881 WriteLiteral(" "); 882 883 884 #line 147 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 885 Write(str_imageAnchorStart); 886 887 888 #line default 889 #line hidden 890 WriteLiteral("\r\n <img"); 891 892 WriteLiteral(" class=\"img-max\""); 893 894 WriteAttribute("src", Tuple.Create(" src=\"", 7829), Tuple.Create("\"", 7863) 895 896 #line 148 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 897 , Tuple.Create(Tuple.Create("", 7835), Tuple.Create<System.Object, System.Int32>(GetImage(str_image, 300, 0) 898 899 #line default 900 #line hidden 901 , 7835), false) 902 ); 903 904 WriteAttribute("alt", Tuple.Create(" alt=\"", 7864), Tuple.Create("\"", 7885) 905 906 #line 148 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 907 , Tuple.Create(Tuple.Create("", 7870), Tuple.Create<System.Object, System.Int32>(str_imageTitle 908 909 #line default 910 #line hidden 911 , 7870), false) 912 ); 913 914 WriteAttribute("title", Tuple.Create(" title=\"", 7886), Tuple.Create("\"", 7909) 915 916 #line 148 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 917 , Tuple.Create(Tuple.Create("", 7894), Tuple.Create<System.Object, System.Int32>(str_imageTitle 918 919 #line default 920 #line hidden 921 , 7894), false) 922 ); 923 924 WriteLiteral(" />\r\n"); 925 926 WriteLiteral(" "); 927 928 929 #line 149 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 930 Write(str_imageAnchorEnd); 931 932 933 #line default 934 #line hidden 935 WriteLiteral("\r\n </td>\r\n"); 936 937 938 #line 151 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 939 } 940 941 942 #line default 943 #line hidden 944 WriteLiteral(" </tr>\r\n </table>\r\n </td>\r\n </tr>" + 945 "\r\n"); 946 947 WriteLiteral(" <tr>\r\n <td"); 948 949 WriteLiteral(" width=\"10\""); 950 951 WriteLiteral(" height=\"45\""); 952 953 WriteLiteral(">&nbsp;</td>\r\n </tr>\r\n"); 954 955 956 #line 159 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 957 } 958 959 960 #line default 961 #line hidden 962 WriteLiteral(" </table>\r\n </td>\r\n\r\n"); 963 964 965 #line 163 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 966 if(GetBoolean("ParagraphContainerIsLast")) { 967 968 969 #line default 970 #line hidden 971 972 #line 164 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 973 Write(str_tableEnd); 974 975 976 #line default 977 #line hidden 978 979 #line 164 "f:\Domains\Sites\shop.ibanez.com\Files\Templates\Designs\hoshinoB2C\EmailMarketing\Paragraph\EmailMarketingParagraphWithToken.cshtml" 980 981 } 982 983 984 #line default 985 #line hidden 986 WriteLiteral("\r\n"); 987 988 } 989 } 990 } 991

1 2 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 3 @using Dynamicweb.Rendering; 4 @using Dynamicweb.Modules.Common.CustomFields; 5 @using Dynamicweb.Modules.UserManagement; 6 @using Dynamicweb.Environment 7 8 9 @{ 10 bool bol_showButton = GetBoolean("Item.ShowReadMoreButton"); 11 string str_title = GetBoolean("Item.ShowTitle") ? GetString("Item.Title") : ""; 12 string str_titleHeading = GetString("Item.HeadingType") != "" ? GetString("Item.HeadingType") : "h2"; 13 string str_titleOrder = GetString("Item.TitleOrder"); 14 string str_image = GetString("Item.Image"); 15 string str_imageTitle = GetString("Item.ImageTitle"); 16 string str_text = GetString("Item.Text"); 17 string str_imageAlignment = GetString("Item.Order"); 18 string str_backgroundColor = GetString("Item.Background"); 19 string str_link = GetString("Item.Link"); 20 string str_linkText = GetString("Item.LinkText"); 21 string str_imageAnchorStart = str_link != "" ? "<a target=\"_blank\" href=\"" + str_link + "\">" : ""; 22 string str_imageAnchorEnd = str_link != "" ? "</a>" : ""; 23 string str_titleAlignment = str_imageAlignment != "image-top" || str_image == "" ? "left" : "center" ; 24 string str_fontFamily = "font-family: Helvetica, Arial, sans-serif; color:#666666; font-weight:normal;"; 25 int num_width = GetInteger("Item.Width"); 26 string str_col = num_width == 50 ? "250" : "500"; 27 bool bol_break = Dynamicweb.Core.Converter.ToInt32(Dynamicweb.Context.Current.Items["currentColumns"]) == 100; 28 29 30 User user = null; 31 32 string resetLink = ""; 33 string loginName = ""; 34 string name = ""; 35 string website = ""; 36 37 if (Pageview.Context != null){ 38 39 user = Pageview.Context.GetValue("User") as User; 40 //Security token related 41 if (user != null){ 42 loginName = user.UserName; 43 name = !String.IsNullOrWhiteSpace(user.Name) ? user.Name : user.FirstName + " " + user.LastName; 44 int resetPageID = int.Parse(Pageview.Area.Item["Login"].ToString().Replace("Default.aspx?ID=", "")); 45 string domainHost = Dynamicweb.Services.Areas.GetArea(Dynamicweb.Frontend.PageView.GetPageviewByPageID(resetPageID).AreaID).DomainLock; 46 string token = System.Guid.NewGuid().ToString(); 47 resetLink = (Dynamicweb.Context.Current.Request.IsSecureConnection ? "https://" : "http://") +Dynamicweb.Context.Current.Request.Url.Host + Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(resetPageID) + "?Username=" + loginName + "&RecoveryToken=" + token; 48 user.PasswordRecoveryTokenExpirationTime = DateTime.UtcNow.AddHours(168); 49 user.PasswordRecoveryToken = token; 50 user.Save(); 51 } 52 } 53 //variable options 54 str_text = str_text.Replace("{{UserId}}", loginName); 55 str_text = str_text.Replace("{{ResetLink}}", resetLink); 56 str_text = str_text.Replace("{{UserName}}", name); 57 str_text = str_text.Replace("{{Website}}", website); 58 59 60 if (GetBoolean("ParagraphContainerIsFirst")) 61 { 62 Dynamicweb.Context.Current.Items["currentColumns"] = 0; 63 } 64 Dynamicweb.Context.Current.Items["currentColumns"] = Dynamicweb.Core.Converter.ToInt32(Dynamicweb.Context.Current.Items["currentColumns"]) + num_width; 65 if(Dynamicweb.Core.Converter.ToInt32(Dynamicweb.Context.Current.Items["currentColumns"]) > 100) { 66 Dynamicweb.Context.Current.Items["currentColumns"] = num_width; 67 } 68 Dictionary<string, string> dict_buttonBlue = new Dictionary<string, string> 69 { 70 {"width", "210px"}, 71 {"height", "45px"}, 72 {"background", "#6FAE47"}, 73 {"color", "#ffffff"}, 74 {"font-size", "16px"}, 75 {"font-style", "normal"} 76 }; 77 string str_tableStart = (bol_break || Dynamicweb.Core.Converter.ToInt32(Dynamicweb.Context.Current.Items["currentColumns"]) == 0 || GetBoolean("ParagraphContainerIsFirst") ) ? "<tr align='center' border='0' cellspacing='0' cellpadding='0' width='100%' bgcolor='"+str_backgroundColor+"' style='"+str_fontFamily+"'><td align='center'><table class='responsive-table clearLeft' border='0' cellspacing='0' cellpadding='0' width='500'><tr>" : ""; 78 string str_tableEnd = (Dynamicweb.Core.Converter.ToInt32(Dynamicweb.Context.Current.Items["currentColumns"]) == 50) ? "</tr><tr><td height='30'></td></tr></table></td></tr>" : ""; 79 Dynamicweb.Context.Current.Items["oldColumns"] = Dynamicweb.Context.Current.Items["currentColumns"]; 80 string endHeading = "</"+str_titleHeading+">"; 81 } 82 83 @if(!GetBoolean("ParagraphContainerIsFirst")) { 84 @str_tableEnd 85 } 86 87 @str_tableStart 88 89 <td border="0" cellspacing="0" cellpadding="0" width="@str_col" bgcolor="@str_backgroundColor" style="@str_fontFamily" class="responsive-table"> 90 <table border="0" cellspacing="0" cellpadding="0" width="@str_col" bgcolor="@str_backgroundColor" style="@str_fontFamily" class="responsive-table"> 91 @if(str_title != "" && (str_titleOrder == "title-first" || str_titleOrder == "" )){ 92 <tr> 93 <td align="@str_titleAlignment" valign="top"> 94 <@str_titleHeading style="font-size: 24px; padding:0; margin:0; @str_fontFamily color:#333333;">@str_title @endHeading 95 </td> 96 <td width="10" height="10" style="@str_fontFamily">&nbsp;</td> 97 </tr> 98 } 99 @if(str_image != "" && str_imageAlignment == "image-top"){ 100 str_imageTitle = str_imageTitle != "" ? str_imageTitle : str_title; 101 <tr> 102 <td align="center" valign="top"> 103 @str_imageAnchorStart 104 <img class="img-max" src="@GetImage(str_image, 600, 0)" alt="@str_imageTitle" title="@str_imageTitle" /> 105 @str_imageAnchorEnd 106 </td> 107 </tr> 108 <tr> 109 <td width="10" height="20">&nbsp;</td> 110 </tr> 111 } 112 113 @if(str_text != "" || str_imageAlignment != "image-top"){ 114 <tr> 115 <td width="10" height="10">&nbsp;</td> 116 </tr> 117 <tr> 118 <td align="left" valign="top"> 119 <table class="imageAside" colspan="2" border="0" cellspacing="0" cellpadding="0" width="100%" style="@str_fontFamily"> 120 <tr> 121 @if(str_image != "" && str_imageAlignment == "image-left-column"){ 122 str_imageTitle = str_imageTitle != "" ? str_imageTitle : str_title; 123 <td align="left" valign="top"> 124 @str_imageAnchorStart 125 <img class="img-max" src="@GetImage(str_image, 300, 0)" alt="@str_imageTitle" title="@str_imageTitle" /> 126 @str_imageAnchorEnd 127 </td> 128 <td width="10" height="30">&nbsp;</td> 129 } 130 @if(str_text != ""){ 131 <td align="@str_titleAlignment" valign="top" style="font-size: 14px; line-height: 20px; @str_fontFamily"> 132 @if( str_title != "" && str_titleOrder == "title-with-text" ){ 133 <div><@str_titleHeading align="@str_titleAlignment" style="font-size: 24px; margin:0; padding:0; @str_fontFamily color:#333333;">@str_title @endHeading </div> 134 <br/> 135 } 136 @str_text 137 @if(str_link != "" && str_linkText != "" && bol_showButton){ 138 <br/> 139 @CreateButton(str_link, str_linkText, null, dict_buttonBlue) 140 } 141 </td> 142 } 143 @if(str_image != "" && str_imageAlignment == "image-right-column"){ 144 str_imageTitle = str_imageTitle != "" ? str_imageTitle : str_title; 145 <td width="10" height="10">&nbsp;</td> 146 <td align="right" valign="top"> 147 @str_imageAnchorStart 148 <img class="img-max" src="@GetImage(str_image, 300, 0)" alt="@str_imageTitle" title="@str_imageTitle" /> 149 @str_imageAnchorEnd 150 </td> 151 } 152 </tr> 153 </table> 154 </td> 155 </tr> 156 <tr> 157 <td width="10" height="45">&nbsp;</td> 158 </tr> 159 } 160 </table> 161 </td> 162 163 @if(GetBoolean("ParagraphContainerIsLast")) { 164 @str_tableEnd 165 } 166 167 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 168 @using Dynamicweb.Rendering; 169 @helper CreateButton(string link, string text, string style = "width:120px;height:40px;line-height:40px;background:#333333;color:#ffffff;font-family:sans-serif;font-size:14px;text-align:center;text-decoration:none;", Dictionary<string, string> options = null){ 170 string rect = style, 171 anchor = style; 172 173 if(string.IsNullOrEmpty(style)){ 174 string width = options != null && options.ContainsKey("width") ? options["width"].ToString() : "120px", 175 height = options != null && options.ContainsKey("height") ? options["height"].ToString() : "40px", 176 background = options != null && options.ContainsKey("background") ? options["background"].ToString() : "#256F9C", 177 border = options != null && options.ContainsKey("border") ? options["border"].ToString() : "1px solid ffffff", 178 color = options != null && options.ContainsKey("color") ? options["color"].ToString() : "#ffffff", 179 fontFamily = options != null && options.ContainsKey("font-family") ? options["font-family"].ToString() : "Helvetica, Arial, sans-serif", 180 fontSize = options != null && options.ContainsKey("font-size") ? options["font-size"].ToString() : "14px", 181 fontStyle = options != null && options.ContainsKey("font-style") ? options["font-style"].ToString() : "normal", 182 textAlign = options != null && options.ContainsKey("text-align") ? options["text-align"].ToString() : "center", 183 textDecoration = options != null && options.ContainsKey("text-decoration") ? options["text-decoration"].ToString() : "none"; 184 185 rect = "style=\"width:" + width + ";height:" + height + ";border:" + border + ";color:" + color + ";v-text-anchor:middle; \" fillcolor=\"" + background + "\""; 186 anchor = "width:" + width + ";height:" + height + ";line-height:" + height + ";background:" + background + ";border:" + border + ";color:" + color + ";font-family:" + fontFamily + ";font-size:" + fontSize + ";font-style:" + fontStyle + ";text-align:" + textAlign + ";text-decoration:" + textDecoration + ";"; 187 } 188 189 <div> 190 <!--[if mso]> 191 <v:rect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="@link" @rect> 192 <w:anchorlock/> 193 <center> 194 <![endif]--> 195 <a class="mobile-button" target="_blank" href="@link" style="-webkit-text-size-adjust:none;display:inline-block;@anchor">@text</a> 196 <!--[if mso]> 197 </center> 198 </v:rect> 199 <![endif]--> 200 </div> 201 } 202 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 203 @using Dynamicweb.Rendering; 204 @functions{ 205 public static string GetImage(string source, int widthNum = 600, int heightNum = 200, string format = "jpg", int num_compression = 85, int num_crop = 5){ 206 Dynamicweb.Frontend.PageView obj_currentPageview = Dynamicweb.Frontend.PageView.Current(); 207 string alternativeImage = obj_currentPageview.Area.Item["NoImage"] != null ? obj_currentPageview.Area.Item["NoImage"].ToString() : "", 208 width = widthNum != 0 ? "&amp;Width=" + widthNum.ToString() : "", 209 height = heightNum != 0 ? "&amp;Height=" + heightNum.ToString(): ""; 210 format = format != "jpg" ? "&amp;Format=" + format : ""; 211 212 string output = "/Admin/Public/GetImage.ashx?Image=" + source + width + height + "&amp;altFmImage_path=" + alternativeImage + format + "&amp;Compression=" + num_compression + "&amp;Crop=" + num_crop; 213 return output.ToString(); 214 } 215 }