{{EmailMarketing:Email.PreHeader}}
Error compiling template "/Designs/BocaBearings/EmailMarketing/Paragraph/EmailMarketingParagraph_WithSecurityToken.cshtml"
Line 29: The type or namespace name 'CustomFields' does not exist in the namespace 'Dynamicweb.Modules.Common' (are you missing an assembly reference?)
Line 210: 'Services' is obsolete: 'Use Dynamicweb.Content.Services instead.'
Line 210: 'Services.Areas' is obsolete: 'Use Dynamicweb.Content.Services.Areas instead.'

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 42 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 17 using Dynamicweb.Rendering; 18 19 #line default 20 #line hidden 21 22 #line 3 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 23 using Dynamicweb.Security.UserManagement; 24 25 #line default 26 #line hidden 27 28 #line 4 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 29 using Dynamicweb.Modules.Common.CustomFields; 30 31 #line default 32 #line hidden 33 34 #line 5 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 35 using Dynamicweb.Environment; 36 37 #line default 38 #line hidden 39 40 41 public class RazorEngine_a84911bdf0424267ba611b487d3c005a : RazorTemplateBase<RazorTemplateModel<Template>> { 42 43 #line hidden 44 45 #line 8 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.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 8 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.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 30 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 81 WriteTo(__razor_helper_writer, link); 82 83 84 #line default 85 #line hidden 86 WriteLiteralTo(__razor_helper_writer, "\" "); 87 88 89 #line 30 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.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=\"", 2635), Tuple.Create("\"", 2647) 102 103 #line 34 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 104 , Tuple.Create(Tuple.Create("", 2642), Tuple.Create<System.Object, System.Int32>(link 105 106 #line default 107 #line hidden 108 , 2642), false) 109 ); 110 111 WriteAttributeTo(__razor_helper_writer, "style", Tuple.Create(" style=\"", 2648), Tuple.Create("\"", 2714) 112 , Tuple.Create(Tuple.Create("", 2656), Tuple.Create("-webkit-text-size-adjust:none;display:inline-block;", 2656), true) 113 114 #line 34 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 115 , Tuple.Create(Tuple.Create("", 2707), Tuple.Create<System.Object, System.Int32>(anchor 116 117 #line default 118 #line hidden 119 , 2707), false) 120 ); 121 122 WriteLiteralTo(__razor_helper_writer, ">"); 123 124 125 #line 34 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.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 40 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 136 137 138 #line default 139 #line hidden 140 }); 141 142 #line 40 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 143 } 144 #line default 145 #line hidden 146 147 148 #line 43 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.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_a84911bdf0424267ba611b487d3c005a() { 166 } 167 168 public override void Execute() { 169 WriteLiteral("\r\n"); 170 171 172 #line 56 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 173 174 bool showButton = GetBoolean("Item.ShowReadMoreButton"); 175 string title = GetBoolean("Item.ShowTitle") ? GetString("Item.Title") : ""; 176 string titleHeading = GetString("Item.HeadingType") != "" ? GetString("Item.HeadingType") : "h2"; 177 string titleOrder = GetString("Item.TitleOrder"); 178 string image = GetString("Item.Image"); 179 string imageTitle = GetString("Item.ImageTitle"); 180 string text = GetString("Item.Text"); 181 string imageAlignment = GetString("Item.Order"); 182 string backgroundColor = GetString("Item.Background"); 183 string link = GetString("Item.Link"); 184 string linkText = GetString("Item.LinkText"); 185 string imageAnchorStart = link != "" ? "<a target=\"_blank\" href=\"" + link + "\">" : ""; 186 string imageAnchorEnd = link != "" ? "</a>" : ""; 187 string titleAlignment = imageAlignment != "image-top" || image == "" ? "left" : "center" ; 188 string fontFamily = "font-family: Helvetica, Arial, sans-serif; color:#666666; font-weight:normal;"; 189 int width = GetInteger("Item.Width"); 190 string col = width == 50 ? "250" : "650"; 191 bool breakBol = Dynamicweb.Core.Converter.ToInt32(Dynamicweb.Context.Current.Items["currentColumns"]) == 100; 192 193 User user = null; 194 string resetLink = ""; 195 string loginName = ""; 196 string customerName = ""; 197 string orderId = ""; 198 string orderAmount = ""; 199 string orderDate = ""; 200 string orderLink = ""; 201 202 if (Pageview.Context != null){ 203 204 user = Pageview.Context.GetValue("User") as User; 205 206 //Security token related 207 if (user != null){ 208 loginName = user.UserName; 209 int resetPageID = int.Parse((Pageview.Area.Item["RecoverPassword"] ?? "0").ToString()); 210 string domainHost = Dynamicweb.Services.Areas.GetArea(Dynamicweb.Frontend.PageView.GetPageviewByPageID(resetPageID).AreaID).DomainLock; 211 string token = System.Guid.NewGuid().ToString(); 212 resetLink = (Dynamicweb.Context.Current.Request.IsSecureConnection ? "https://" : "http://") +Dynamicweb.Context.Current.Request.Url.Host + Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(resetPageID) + "?Username=" + loginName + "&RecoveryToken=" + token; 213 user.PasswordRecoveryTokenExpirationTime = DateTime.UtcNow.AddHours(168); 214 user.PasswordRecoveryToken = token; 215 if (user.CustomFieldValues.Any(cf => cf.CustomField.SystemName == "AccessUser_StripeCaptureIssue_WebOrderNum")){ 216 orderId = user.CustomFieldValues.First(cf => cf.CustomField.SystemName == "AccessUser_StripeCaptureIssue_WebOrderNum").Value.ToString(); 217 } 218 if (user.CustomFieldValues.Any(cf => cf.CustomField.SystemName == "AccessUser_StripeCaptureIssue_DateOfOrder")){ 219 orderDate = user.CustomFieldValues.First(cf => cf.CustomField.SystemName == "AccessUser_StripeCaptureIssue_DateOfOrder").Value.ToString(); 220 } 221 if (user.CustomFieldValues.Any(cf => cf.CustomField.SystemName == "AccessUser_StripeCaptureIssue_Amount")){ 222 orderAmount = user.CustomFieldValues.First(cf => cf.CustomField.SystemName == "AccessUser_StripeCaptureIssue_Amount").Value.ToString(); 223 } 224 if (user.CustomFieldValues.Any(cf => cf.CustomField.SystemName == "AccessUser_StripeCaptureIssue_Link")){ 225 orderLink = user.CustomFieldValues.First(cf => cf.CustomField.SystemName == "AccessUser_StripeCaptureIssue_Link").Value.ToString(); 226 } 227 228 customerName = user.Name; 229 230 user.Save(); 231 } 232 } 233 234 //variable options 235 text = text.Replace("{{UserId}}", loginName); 236 text = text.Replace("{{ResetLink}}", resetLink); 237 text = text.Replace("{{CustomerName}}", customerName); 238 text = text.Replace("{{OrderId}}", orderId); 239 text = text.Replace("{{OrderAmount}}", orderAmount); 240 text = text.Replace("{{OrderDate}}", orderDate); 241 text = text.Replace("{{OrderLink}}", orderLink); 242 243 if (GetBoolean("ParagraphContainerIsFirst")) 244 { 245 Dynamicweb.Context.Current.Items["currentColumns"] = 0; 246 } 247 Dynamicweb.Context.Current.Items["currentColumns"] = Dynamicweb.Core.Converter.ToInt32(Dynamicweb.Context.Current.Items["currentColumns"]) + width; 248 if(Dynamicweb.Core.Converter.ToInt32(Dynamicweb.Context.Current.Items["currentColumns"]) > 100) { 249 Dynamicweb.Context.Current.Items["currentColumns"] = width; 250 } 251 Dictionary<string, string> dict_buttonBlue = new Dictionary<string, string> 252 { 253 {"width", "210px"}, 254 {"height", "45px"}, 255 {"background", "#2a338f"}, 256 {"color", "#ffffff"}, 257 {"font-size", "16px"}, 258 {"font-style", "normal"} 259 }; 260 string tableStart = (breakBol || Dynamicweb.Core.Converter.ToInt32(Dynamicweb.Context.Current.Items["currentColumns"]) == 0 || GetBoolean("ParagraphContainerIsFirst") ) ? "<tr align='center' border='0' cellspacing='0' cellpadding='0' width='100%' bgcolor='"+backgroundColor+"' style='"+fontFamily+"'><td align='center'><table class='responsive-table clearLeft' border='0' cellspacing='0' cellpadding='0' width='650'><tr>" : ""; 261 string tableEnd = (Dynamicweb.Core.Converter.ToInt32(Dynamicweb.Context.Current.Items["currentColumns"]) == 50) ? "</tr><tr></tr></table></td></tr>" : ""; 262 Dynamicweb.Context.Current.Items["oldColumns"] = Dynamicweb.Context.Current.Items["currentColumns"]; 263 string endHeading = "</"+titleHeading+">"; 264 265 266 #line default 267 #line hidden 268 WriteLiteral("\r\n\r\n"); 269 270 271 #line 149 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 272 if(!GetBoolean("ParagraphContainerIsFirst")) { 273 274 275 #line default 276 #line hidden 277 278 #line 150 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 279 Write(tableEnd); 280 281 282 #line default 283 #line hidden 284 285 #line 150 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 286 287 } 288 289 #line default 290 #line hidden 291 292 #line 151 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 293 Write(tableStart); 294 295 296 #line default 297 #line hidden 298 WriteLiteral("\r\n<td"); 299 300 WriteLiteral(" border=\"0\""); 301 302 WriteLiteral(" cellspacing=\"0\""); 303 304 WriteLiteral(" cellpadding=\"0\""); 305 306 WriteAttribute("width", Tuple.Create(" width=\"", 9148), Tuple.Create("\"", 9160) 307 308 #line 152 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 309 , Tuple.Create(Tuple.Create("", 9156), Tuple.Create<System.Object, System.Int32>(col 310 311 #line default 312 #line hidden 313 , 9156), false) 314 ); 315 316 WriteAttribute("bgcolor", Tuple.Create(" bgcolor=\"", 9161), Tuple.Create("\"", 9187) 317 318 #line 152 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 319 , Tuple.Create(Tuple.Create("", 9171), Tuple.Create<System.Object, System.Int32>(backgroundColor 320 321 #line default 322 #line hidden 323 , 9171), false) 324 ); 325 326 WriteAttribute("style", Tuple.Create(" style=\"", 9188), Tuple.Create("\"", 9207) 327 328 #line 152 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 329 , Tuple.Create(Tuple.Create("", 9196), Tuple.Create<System.Object, System.Int32>(fontFamily 330 331 #line default 332 #line hidden 333 , 9196), false) 334 ); 335 336 WriteLiteral(">\r\n <table"); 337 338 WriteLiteral(" border=\"0\""); 339 340 WriteLiteral(" cellspacing=\"0\""); 341 342 WriteLiteral(" cellpadding=\"0\""); 343 344 WriteAttribute("width", Tuple.Create(" width=\"", 9268), Tuple.Create("\"", 9280) 345 346 #line 153 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 347 , Tuple.Create(Tuple.Create("", 9276), Tuple.Create<System.Object, System.Int32>(col 348 349 #line default 350 #line hidden 351 , 9276), false) 352 ); 353 354 WriteAttribute("bgcolor", Tuple.Create(" bgcolor=\"", 9281), Tuple.Create("\"", 9307) 355 356 #line 153 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 357 , Tuple.Create(Tuple.Create("", 9291), Tuple.Create<System.Object, System.Int32>(backgroundColor 358 359 #line default 360 #line hidden 361 , 9291), false) 362 ); 363 364 WriteAttribute("style", Tuple.Create(" style=\"", 9308), Tuple.Create("\"", 9328) 365 366 #line 153 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 367 , Tuple.Create(Tuple.Create("", 9316), Tuple.Create<System.Object, System.Int32>(fontFamily 368 369 #line default 370 #line hidden 371 , 9316), false) 372 , Tuple.Create(Tuple.Create(" ", 9327), Tuple.Create("", 9327), true) 373 ); 374 375 WriteLiteral(" class=\"responsive-table\""); 376 377 WriteLiteral(">\r\n"); 378 379 380 #line 154 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 381 382 383 #line default 384 #line hidden 385 386 #line 154 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 387 if(title != "" && (titleOrder == "title-first" || titleOrder == "" )){ 388 389 390 #line default 391 #line hidden 392 WriteLiteral(" <tr>\r\n <td"); 393 394 WriteAttribute("align", Tuple.Create(" align=\"", 9469), Tuple.Create("\"", 9492) 395 396 #line 156 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 397 , Tuple.Create(Tuple.Create("", 9477), Tuple.Create<System.Object, System.Int32>(titleAlignment 398 399 #line default 400 #line hidden 401 , 9477), false) 402 ); 403 404 WriteLiteral(" valign=\"top\""); 405 406 WriteLiteral(">\r\n <"); 407 408 409 #line 157 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 410 Write(titleHeading); 411 412 413 #line default 414 #line hidden 415 WriteLiteral(" style=\"font-size: 24px; padding:0; margin:0; "); 416 417 418 #line 157 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 419 Write(fontFamily); 420 421 422 #line default 423 #line hidden 424 WriteLiteral(" color:#2a338f;\">"); 425 426 427 #line 157 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 428 Write(title); 429 430 431 #line default 432 #line hidden 433 WriteLiteral(" "); 434 435 436 #line 157 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 437 Write(endHeading); 438 439 440 #line default 441 #line hidden 442 WriteLiteral("\r\n </td>\r\n <td"); 443 444 WriteLiteral(" width=\"10\""); 445 446 WriteLiteral(" height=\"10\""); 447 448 WriteAttribute("style", Tuple.Create(" style=\"", 9689), Tuple.Create("\"", 9708) 449 450 #line 159 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 451 , Tuple.Create(Tuple.Create("", 9697), Tuple.Create<System.Object, System.Int32>(fontFamily 452 453 #line default 454 #line hidden 455 , 9697), false) 456 ); 457 458 WriteLiteral(">&nbsp;</td>\r\n </tr>\r\n"); 459 460 461 #line 161 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 462 } 463 464 465 #line default 466 #line hidden 467 WriteLiteral(" "); 468 469 470 #line 162 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 471 if(image != "" && imageAlignment == "image-top"){ 472 imageTitle = imageTitle != "" ? imageTitle : title; 473 474 475 #line default 476 #line hidden 477 WriteLiteral(" <tr>\r\n <td"); 478 479 WriteLiteral(" align=\"center\""); 480 481 WriteLiteral(" valign=\"top\""); 482 483 WriteLiteral(">\r\n"); 484 485 WriteLiteral(" "); 486 487 488 #line 166 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 489 Write(imageAnchorStart); 490 491 492 #line default 493 #line hidden 494 WriteLiteral("\r\n <img"); 495 496 WriteLiteral(" class=\"img-max\""); 497 498 WriteAttribute("src", Tuple.Create(" src=\"", 10005), Tuple.Create("\"", 10035) 499 500 #line 167 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 501 , Tuple.Create(Tuple.Create("", 10011), Tuple.Create<System.Object, System.Int32>(GetImage(image, 600, 0) 502 503 #line default 504 #line hidden 505 , 10011), false) 506 ); 507 508 WriteAttribute("alt", Tuple.Create(" alt=\"", 10036), Tuple.Create("\"", 10053) 509 510 #line 167 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 511 , Tuple.Create(Tuple.Create("", 10042), Tuple.Create<System.Object, System.Int32>(imageTitle 512 513 #line default 514 #line hidden 515 , 10042), false) 516 ); 517 518 WriteAttribute("title", Tuple.Create(" title=\"", 10054), Tuple.Create("\"", 10073) 519 520 #line 167 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 521 , Tuple.Create(Tuple.Create("", 10062), Tuple.Create<System.Object, System.Int32>(imageTitle 522 523 #line default 524 #line hidden 525 , 10062), false) 526 ); 527 528 WriteLiteral(" />\r\n"); 529 530 WriteLiteral(" "); 531 532 533 #line 168 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 534 Write(imageAnchorEnd); 535 536 537 #line default 538 #line hidden 539 WriteLiteral("\r\n </td>\r\n </tr>\r\n"); 540 541 WriteLiteral(" <tr>\r\n <td"); 542 543 WriteLiteral(" width=\"10\""); 544 545 WriteLiteral(" height=\"20\""); 546 547 WriteLiteral(">&nbsp;</td>\r\n </tr>\r\n"); 548 549 550 #line 174 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 551 } 552 553 554 #line default 555 #line hidden 556 WriteLiteral("\r\n"); 557 558 559 #line 176 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 560 561 562 #line default 563 #line hidden 564 565 #line 176 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 566 if(text != "" || imageAlignment != "image-top"){ 567 568 569 570 #line default 571 #line hidden 572 WriteLiteral(" <tr>\r\n <td"); 573 574 WriteLiteral(" align=\"left\""); 575 576 WriteLiteral(" valign=\"top\""); 577 578 WriteLiteral(">\r\n <table"); 579 580 WriteLiteral(" class=\"imageAside\""); 581 582 WriteLiteral(" colspan=\"2\""); 583 584 WriteLiteral(" border=\"0\""); 585 586 WriteLiteral(" cellspacing=\"0\""); 587 588 WriteLiteral(" cellpadding=\"0\""); 589 590 WriteLiteral(" width=\"100%\""); 591 592 WriteAttribute("style", Tuple.Create(" style=\"", 10478), Tuple.Create("\"", 10497) 593 594 #line 180 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 595 , Tuple.Create(Tuple.Create("", 10486), Tuple.Create<System.Object, System.Int32>(fontFamily 596 597 #line default 598 #line hidden 599 , 10486), false) 600 ); 601 602 WriteLiteral(">\r\n <tr>\r\n"); 603 604 605 #line 182 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 606 607 608 #line default 609 #line hidden 610 611 #line 182 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 612 if(image != "" && imageAlignment == "image-left-column"){ 613 imageTitle = imageTitle != "" ? imageTitle : title; 614 615 616 #line default 617 #line hidden 618 WriteLiteral(" <td"); 619 620 WriteLiteral(" align=\"left\""); 621 622 WriteLiteral(" valign=\"top\""); 623 624 WriteLiteral(">\r\n"); 625 626 WriteLiteral(" "); 627 628 629 #line 185 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 630 Write(imageAnchorStart); 631 632 633 #line default 634 #line hidden 635 WriteLiteral("\r\n <img"); 636 637 WriteLiteral(" class=\"img-max\""); 638 639 WriteAttribute("src", Tuple.Create(" src=\"", 10811), Tuple.Create("\"", 10841) 640 641 #line 186 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 642 , Tuple.Create(Tuple.Create("", 10817), Tuple.Create<System.Object, System.Int32>(GetImage(image, 300, 0) 643 644 #line default 645 #line hidden 646 , 10817), false) 647 ); 648 649 WriteAttribute("alt", Tuple.Create(" alt=\"", 10842), Tuple.Create("\"", 10859) 650 651 #line 186 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 652 , Tuple.Create(Tuple.Create("", 10848), Tuple.Create<System.Object, System.Int32>(imageTitle 653 654 #line default 655 #line hidden 656 , 10848), false) 657 ); 658 659 WriteAttribute("title", Tuple.Create(" title=\"", 10860), Tuple.Create("\"", 10879) 660 661 #line 186 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 662 , Tuple.Create(Tuple.Create("", 10868), Tuple.Create<System.Object, System.Int32>(imageTitle 663 664 #line default 665 #line hidden 666 , 10868), false) 667 ); 668 669 WriteLiteral(" />\r\n"); 670 671 WriteLiteral(" "); 672 673 674 #line 187 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 675 Write(imageAnchorEnd); 676 677 678 #line default 679 #line hidden 680 WriteLiteral("\r\n </td>\r\n"); 681 682 WriteLiteral(" <td"); 683 684 WriteLiteral(" width=\"10\""); 685 686 WriteLiteral(" height=\"30\""); 687 688 WriteLiteral(">&nbsp;</td>\r\n"); 689 690 691 #line 190 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 692 } 693 694 695 #line default 696 #line hidden 697 WriteLiteral(" "); 698 699 700 #line 191 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 701 if(text != ""){ 702 703 704 #line default 705 #line hidden 706 WriteLiteral(" <td"); 707 708 WriteAttribute("align", Tuple.Create(" align=\"", 11091), Tuple.Create("\"", 11114) 709 710 #line 192 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 711 , Tuple.Create(Tuple.Create("", 11099), Tuple.Create<System.Object, System.Int32>(titleAlignment 712 713 #line default 714 #line hidden 715 , 11099), false) 716 ); 717 718 WriteLiteral(" valign=\"top\""); 719 720 WriteAttribute("style", Tuple.Create(" style=\"", 11128), Tuple.Create("\"", 11183) 721 , Tuple.Create(Tuple.Create("", 11136), Tuple.Create("font-size:", 11136), true) 722 , Tuple.Create(Tuple.Create(" ", 11146), Tuple.Create("14px;", 11147), true) 723 , Tuple.Create(Tuple.Create(" ", 11152), Tuple.Create("line-height:", 11153), true) 724 , Tuple.Create(Tuple.Create(" ", 11165), Tuple.Create("20px;", 11166), true) 725 726 #line 192 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 727 , Tuple.Create(Tuple.Create(" ", 11171), Tuple.Create<System.Object, System.Int32>(fontFamily 728 729 #line default 730 #line hidden 731 , 11172), false) 732 ); 733 734 WriteLiteral(">\r\n"); 735 736 737 #line 193 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 738 739 740 #line default 741 #line hidden 742 743 #line 193 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 744 if( title != "" && titleOrder == "title-with-text" ){ 745 746 747 #line default 748 #line hidden 749 WriteLiteral(" <div><"); 750 751 752 #line 194 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 753 Write(titleHeading); 754 755 756 #line default 757 #line hidden 758 WriteLiteral(" align=\""); 759 760 761 #line 194 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 762 Write(titleAlignment); 763 764 765 #line default 766 #line hidden 767 WriteLiteral("\" style=\"font-size: 24px; margin:0; padding:0; "); 768 769 770 #line 194 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 771 Write(fontFamily); 772 773 774 #line default 775 #line hidden 776 WriteLiteral(" color:#2a338f;\">"); 777 778 779 #line 194 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 780 Write(title); 781 782 783 #line default 784 #line hidden 785 WriteLiteral(" "); 786 787 788 #line 194 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 789 Write(endHeading); 790 791 792 #line default 793 #line hidden 794 WriteLiteral(" </div>\r\n"); 795 796 WriteLiteral(" <br/>\r\n"); 797 798 799 #line 196 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 800 } 801 802 803 #line default 804 #line hidden 805 WriteLiteral(" "); 806 807 808 #line 197 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 809 Write(text); 810 811 812 #line default 813 #line hidden 814 WriteLiteral("\r\n"); 815 816 817 #line 198 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 818 819 820 #line default 821 #line hidden 822 823 #line 198 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 824 if(link != "" && linkText != "" && showButton){ 825 826 827 #line default 828 #line hidden 829 WriteLiteral(" <br/>\r\n"); 830 831 832 #line 200 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 833 834 835 #line default 836 #line hidden 837 838 #line 200 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 839 Write(CreateButton(link, linkText, null, dict_buttonBlue)); 840 841 842 #line default 843 #line hidden 844 845 #line 200 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 846 847 } 848 849 850 #line default 851 #line hidden 852 WriteLiteral(" </td>\r\n"); 853 854 855 #line 203 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 856 } 857 858 859 #line default 860 #line hidden 861 WriteLiteral(" "); 862 863 864 #line 204 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 865 if(image != "" && imageAlignment == "image-right-column"){ 866 imageTitle = imageTitle != "" ? imageTitle : title; 867 868 869 #line default 870 #line hidden 871 WriteLiteral(" <td"); 872 873 WriteLiteral(" width=\"10\""); 874 875 WriteLiteral(" height=\"10\""); 876 877 WriteLiteral(">&nbsp;</td>\r\n"); 878 879 WriteLiteral(" <td"); 880 881 WriteLiteral(" align=\"right\""); 882 883 WriteLiteral(" valign=\"top\""); 884 885 WriteLiteral(">\r\n"); 886 887 WriteLiteral(" "); 888 889 890 #line 208 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 891 Write(imageAnchorStart); 892 893 894 #line default 895 #line hidden 896 WriteLiteral("\r\n <img"); 897 898 WriteLiteral(" class=\"img-max\""); 899 900 WriteAttribute("src", Tuple.Create(" src=\"", 12122), Tuple.Create("\"", 12152) 901 902 #line 209 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 903 , Tuple.Create(Tuple.Create("", 12128), Tuple.Create<System.Object, System.Int32>(GetImage(image, 300, 0) 904 905 #line default 906 #line hidden 907 , 12128), false) 908 ); 909 910 WriteAttribute("alt", Tuple.Create(" alt=\"", 12153), Tuple.Create("\"", 12170) 911 912 #line 209 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 913 , Tuple.Create(Tuple.Create("", 12159), Tuple.Create<System.Object, System.Int32>(imageTitle 914 915 #line default 916 #line hidden 917 , 12159), false) 918 ); 919 920 WriteAttribute("title", Tuple.Create(" title=\"", 12171), Tuple.Create("\"", 12190) 921 922 #line 209 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 923 , Tuple.Create(Tuple.Create("", 12179), Tuple.Create<System.Object, System.Int32>(imageTitle 924 925 #line default 926 #line hidden 927 , 12179), false) 928 ); 929 930 WriteLiteral(" />\r\n"); 931 932 WriteLiteral(" "); 933 934 935 #line 210 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 936 Write(imageAnchorEnd); 937 938 939 #line default 940 #line hidden 941 WriteLiteral("\r\n </td>\r\n"); 942 943 944 #line 212 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 945 } 946 947 948 #line default 949 #line hidden 950 WriteLiteral(" </tr>\r\n </table>\r\n </td>\r\n </tr>" + 951 "\r\n"); 952 953 954 #line 217 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 955 956 957 #line default 958 #line hidden 959 960 #line 219 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 961 962 } 963 964 965 #line default 966 #line hidden 967 WriteLiteral(" </table>\r\n </td>\r\n\r\n"); 968 969 970 #line 224 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 971 if(GetBoolean("ParagraphContainerIsLast")) { 972 973 974 #line default 975 #line hidden 976 977 #line 225 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 978 Write(tableEnd); 979 980 981 #line default 982 #line hidden 983 984 #line 225 "F:\Domains\Sites\bocabearings-upgrade.mydwsite.com\Files\Templates\Designs\BocaBearings\EmailMarketing\Paragraph\EmailMarketingParagraph_WithSecurityToken.cshtml" 985 986 } 987 988 #line default 989 #line hidden 990 } 991 } 992 } 993

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