Error compiling template "Designs/exhibition_site/eCom/Product/MCH365-profile.cshtml"
Line 138: 'ColorHelper.HSL' does not contain a definition for 'L' and no accessible extension method 'L' accepting a first argument of type 'ColorHelper.HSL' could 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 2 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 17 using System.Text.RegularExpressions; 18 19 #line default 20 #line hidden 21 22 #line 3 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 23 using Co3.Espresso.Base.Extensions; 24 25 #line default 26 #line hidden 27 28 #line 4 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 29 using Co3.Espresso.Website.Services; 30 31 #line default 32 #line hidden 33 34 #line 5 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 35 using Co3.Espresso.Website.Models.FrontEnd; 36 37 #line default 38 #line hidden 39 40 #line 6 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 41 using Co3.Espresso.Website.Models.FrontEnd.Settings; 42 43 #line default 44 #line hidden 45 46 #line 7 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 47 using Co3.MCH.Data.Models.MCH365; 48 49 #line default 50 #line hidden 51 52 #line 8 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 53 using Co3.MCH.Website.Frontend.Helpers; 54 55 #line default 56 #line hidden 57 58 #line 9 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 59 using Co3.MCH.Website.Frontend.Models.Frontend; 60 61 #line default 62 #line hidden 63 64 #line 10 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 65 using Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce; 66 67 #line default 68 #line hidden 69 70 #line 11 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 71 using Dynamicweb.Core; 72 73 #line default 74 #line hidden 75 76 77 public class RazorEngine_4e1380e39d34476583762c3c9f1beea7 : Co3.Espresso.Website.TemplateBases.Paragraphs.Module { 78 79 #line hidden 80 81 public RazorEngine_4e1380e39d34476583762c3c9f1beea7() { 82 } 83 84 public override void Execute() { 85 WriteLiteral("\r\n"); 86 87 88 #line 13 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 89 90 ProfileProduct espressoProduct = Co3.MCH.Website.Frontend.Services.Ecommerce.ProductService.Instance.GetEspressoProduct( 91 new ProductSettings() 92 { 93 Id = GetString("Ecom:Product.ID"), 94 VariantId = GetString("Ecom:Product.VariantID"), 95 PrimaryVariantId = GetString("Ecom:Product.DefaultVariantComboID"), 96 EmbeddedInModelList = false 97 }, nameof(ProfileProduct) 98 ) as ProfileProduct; 99100 // EXAMPLE 101 bool hasPresentation = espressoProduct.HasPresentation; 102 int presentationContactPersons = 0; 103 if (hasPresentation) 104 { 105 presentationContactPersons = espressoProduct.Presentation.ContactPersons.Products.Count(); 106 } 107108 IEnumerable<BoothInfo> booths = espressoProduct.Booths; 109110 // CUSTOM COMPANY FIELDS 111 string companyDescriptionFormatted = espressoProduct.Company.DescriptionFormatted; 112113 string companyDescriptionFormattedStrippedHtml = companyDescriptionFormatted.StripHtml(); 114115 string companyDescriptionFormattedMetaDesc = !string.IsNullOrEmpty(companyDescriptionFormattedStrippedHtml) ? companyDescriptionFormattedStrippedHtml : espressoProduct.Company.Name; 116117 if ( companyDescriptionFormattedStrippedHtml.Length > 160 ) 118 { 119 companyDescriptionFormattedMetaDesc = !string.IsNullOrEmpty(companyDescriptionFormattedStrippedHtml) ? companyDescriptionFormattedStrippedHtml.Substring(0, 160) : espressoProduct.Company.Name; 120 } 121122 string companyColor = ""; 123124 if (espressoProduct.Company.BrandColor.IsNullOrEmpty()) 125 { 126 companyColor = MCH365Context.Current.TradeShowDetails.PrimaryColor; 127 } 128 else 129 { 130 companyColor = espressoProduct.Company.BrandColor; 131 } 132133 // CUSTOM COMPANY COLOR SCHEME 134 Regex hexcodeRegex = new Regex(@"^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"); 135 companyColor = hexcodeRegex.IsMatch( companyColor ) ? companyColor : "#000000"; 136 ColorHelper.HSL brandExhibitor = ColorHelper.Instance.HexToHsl(companyColor); 137138 ViewBag.TextColor = brandExhibitor.L < 60 ? "e-text-light" : "e-text-dark"; 139140 // VIDEO 141 string presentationVideo = ""; 142143 if (espressoProduct.Presentation != null && espressoProduct.Presentation.Video != null && !string.IsNullOrEmpty(espressoProduct.Presentation.Video)) 144 { 145 string presentationVideoRaw = espressoProduct.Presentation.Video; 146147 if (presentationVideoRaw.Contains("https://vimeo.com/")) 148 { 149 presentationVideo = "https://player.vimeo.com/video/" + (presentationVideoRaw.Replace("https://vimeo.com/", "")); 150 } 151 else if (presentationVideoRaw.Contains("https://youtu")) 152 { 153 presentationVideo = ("https://www.youtube.com/embed/" + presentationVideoRaw.Replace("https://youtu.be/", "").Replace("https://www.youtube.com/embed/", "")); 154 } 155 else if (presentationVideoRaw.Contains("https://www.youtube.com/watch?v=")) 156 { 157 presentationVideo = ("https://www.youtube.com/embed/" + presentationVideoRaw.Replace("https://www.youtube.com/watch?v=", "")); 158 } 159 else 160 { 161 presentationVideo = ("https://www.youtube.com/embed/" + presentationVideoRaw); 162 } 163 } 164165166 #line default 167 #line hidden 168 WriteLiteral("\r\n\r\n<style>\r\n :root {\r\n --exhibitor-color: "); 169170171 #line 92 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 172 Write(brandExhibitor.ToString()); 173174175 #line default 176 #line hidden 177 WriteLiteral(";\r\n --exhibitor-color-darken: "); 178179180 #line 93 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 181 Write(brandExhibitor.Darken(10).ToString()); 182183184 #line default 185 #line hidden 186 WriteLiteral(@"; 187 --exhibition-profile-exhibitor-brand-color: hsl(var(--exhibitor-color)); 188 --exhibition-profile-exhibitor-brand-color-darken: hsl(var(--exhibitor-color-darken)); 189 --exhibition-profile-exhibitor-brand-color-opaque: hsla(var(--exhibitor-color), 0.85); 190 } 191192 .breadcrumb.nav { 193 background-color: var(--exhibition-profile-exhibitor-brand-color-darken); 194 } 195196 </style> 197198 "); 199200201 #line 105 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 202 Write(RenderingService.Instance.SectionEnd()); 203204205 #line default 206 #line hidden 207 WriteLiteral("\r\n"); 208209210 #line 106 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 211 Write(RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-topsection.cshtml", espressoProduct)); 212213214 #line default 215 #line hidden 216 WriteLiteral("\r\n"); 217218219 #line 107 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 220 Write(RenderingService.Instance.SectionStart(new SectionSettings 221 { 222 Classes = new ClassList("e-section mch365-custom-product-details-wrapper") 223 })); 224225226 #line default 227 #line hidden 228 WriteLiteral("\r\n\r\n\r\n"); 229230231 #line 113 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 232 Write(RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-sidebar.cshtml", espressoProduct)); 233234235 #line default 236 #line hidden 237 WriteLiteral("\r\n<div"); 238239 WriteLiteral(" class=\"col-12 col-md-8 col-lg-9 p-columns mch365-custom-product-details-wrapper-" + 240 "main-content\""); 241242 WriteLiteral(">\r\n\r\n <div"); 243244 WriteLiteral(" class=\"row align-items-end pt-3\""); 245246 WriteLiteral(">\r\n <div"); 247248 WriteLiteral(" class=\"col-12 col-md-6 col-lg-7\""); 249250 WriteLiteral(">\r\n"); 251252253 #line 118 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 254255256 #line default 257 #line hidden 258259 #line 118 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 260 if ( hasPresentation ) 261 { 262263264 #line default 265 #line hidden 266 WriteLiteral(" <p"); 267268 WriteLiteral(" class=\"lead font-weight-light mb-0\""); 269270 WriteLiteral(">"); 271272273 #line 120 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 274 Write(Translate( "MCH365 - Exhibitor details topSectionFairInfoOn - Text", "på" )); 275276277 #line default 278 #line hidden 279 WriteLiteral(" "); 280281282 #line 120 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 283 Write(MCH365Context.Current.TradeShowDetails.Name); 284285286 #line default 287 #line hidden 288 WriteLiteral("</p>\r\n"); 289290291 #line 121 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 292 } 293294295 #line default 296 #line hidden 297 WriteLiteral(" <h1"); 298299 WriteLiteral(" class=\"mega my-0\""); 300301 WriteLiteral(">"); 302303304 #line 122 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 305 Write(espressoProduct.Company.Name); 306307308 #line default 309 #line hidden 310 WriteLiteral("</h1>\r\n </div>\r\n"); 311312313 #line 124 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 314315316 #line default 317 #line hidden 318319 #line 124 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 320 if (booths != null) 321 { 322323324 #line default 325 #line hidden 326 WriteLiteral(" <div"); 327328 WriteLiteral(" class=\"col-12 col-md-6 col-lg-5 mt-3 mt-md-0 d-flex flex-column justify-content-" + 329 "md-end align-items-md-end\""); 330331 WriteLiteral(">\r\n <p"); 332333 WriteLiteral(" class=\"h4 mb-0\""); 334335 WriteLiteral(">"); 336337338 #line 127 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 339 Write(Translate("Stand")); 340341342 #line default 343 #line hidden 344 WriteLiteral("</p>\r\n"); 345346347 #line 128 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 348349350 #line default 351 #line hidden 352353 #line 128 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 354 if (booths.Count() == 1) 355 { 356 BoothInfo booth = booths.FirstOrDefault(); 357 if (booth.Hall != null && booth.Booth != null) 358 { 359360361 #line default 362 #line hidden 363 WriteLiteral(" <h2"); 364365 WriteLiteral(" class=\"mb-0 font-weight-extrabold mt-0\""); 366367 WriteLiteral(">\r\n <span"); 368369 WriteLiteral(" class=\"enlarge-text\""); 370371 WriteLiteral(">"); 372373374 #line 134 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 375 Write(booth.Hall.Name); 376377378 #line default 379 #line hidden 380 WriteLiteral("</span> "); 381382383 #line 134 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 384 Write(booth.Booth.Number); 385386387 #line default 388 #line hidden 389 WriteLiteral("\r\n </h2>\r\n"); 390391392 #line 136 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 393 } 394 } 395 else 396 { 397398399 #line default 400 #line hidden 401 WriteLiteral(" <div"); 402403 WriteLiteral(" class=\"d-flex flex-wrap justify-content-md-end w-100\""); 404405 WriteLiteral(" style=\"column-gap: 1em;\""); 406407 WriteLiteral(">\r\n"); 408409410 #line 141 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 411412413 #line default 414 #line hidden 415416 #line 141 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 417 foreach (BoothInfo booth in booths) 418 { 419420 if (booth.Hall != null && booth.Booth != null) 421 { 422423424 #line default 425 #line hidden 426 WriteLiteral(" <h2"); 427428 WriteLiteral(" class=\"small mt-0 mb-0 font-weight-extrabold flex-nowrap\""); 429430 WriteLiteral(">\r\n"); 431432 WriteLiteral(" "); 433434435 #line 147 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 436 Write(booth.Hall.Name); 437438439 #line default 440 #line hidden 441 WriteLiteral(" <span"); 442443 WriteLiteral(" class=\"text-downsize-notched\""); 444445 WriteLiteral(">"); 446447448 #line 147 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 449 Write(booth.Booth.Number); 450451452 #line default 453 #line hidden 454 WriteLiteral("</span>\r\n </h2>\r\n"); 455456457 #line 149 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 458 } 459 } 460461462 #line default 463 #line hidden 464 WriteLiteral(" </div>\r\n"); 465466467 #line 152 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 468 } 469470471 #line default 472 #line hidden 473 WriteLiteral(" </div>\r\n"); 474475476 #line 154 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 477 } 478479480 #line default 481 #line hidden 482 WriteLiteral(" <div"); 483484 WriteLiteral(" class=\"col-12 pt-1\""); 485486 WriteLiteral(">\r\n <hr/>\r\n </div>\r\n </div>\r\n \r\n <div"); 487488 WriteLiteral(" class=\"row mt-2\""); 489490 WriteLiteral(">\r\n <div"); 491492 WriteLiteral(" class=\"col-12\""); 493494 WriteLiteral(">\r\n <div"); 495496 WriteLiteral(" class=\"row\""); 497498 WriteLiteral(">\r\n <div"); 499500 WriteLiteral(" class=\"col-12 col-lg-8 mb-2 pr-lg-2 pr-xl-3\""); 501502 WriteLiteral(" id=\"presentation\""); 503504 WriteLiteral(">\r\n"); 505506507 #line 164 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 508509510 #line default 511 #line hidden 512513 #line 164 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 514 if (!string.IsNullOrEmpty(companyDescriptionFormatted)) 515 { 516517518 #line default 519 #line hidden 520 WriteLiteral(" <p>"); 521522523 #line 166 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 524 Write(companyDescriptionFormatted); 525526527 #line default 528 #line hidden 529 WriteLiteral("</p>\r\n"); 530531532 #line 167 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 533 } 534 else 535 { 536537538 #line default 539 #line hidden 540 WriteLiteral(" <h4>"); 541542543 #line 170 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 544 Write(Translate("MCH365 - Exhibitor details descriptionNoInfoHeader - Heading", "Vi har registreret udstilleren som leverandør eller udstiller på messen.")); 545546547 #line default 548 #line hidden 549 WriteLiteral("</h4>\r\n"); 550551 WriteLiteral(" <p>"); 552553554 #line 171 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 555 Write(Translate("MCH365 - Exhibitor details descriptionNoInfoText - Text", "Dog har de endnu ikke oplyst yderligere beskrivelse på deres profil.")); 556557558 #line default 559 #line hidden 560 WriteLiteral("</p>\r\n"); 561562563 #line 172 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 564 } 565566567 #line default 568 #line hidden 569 WriteLiteral("\r\n\r\n </div>\r\n"); 570571572 #line 176 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 573574575 #line default 576 #line hidden 577578 #line 176 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 579 if (espressoProduct.ContactPersons.Products.Any()) 580 { 581582583 #line default 584 #line hidden 585586 #line 178 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 587 Write(RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-contactpersons.cshtml", espressoProduct)); 588589590 #line default 591 #line hidden 592593 #line 178 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 594595 } 596597598 #line default 599 #line hidden 600 WriteLiteral(" </div>\r\n\r\n"); 601602603 #line 182 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 604605606 #line default 607 #line hidden 608609 #line 182 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 610 if (espressoProduct.Products.Products.Any()) 611 { 612613614 #line default 615 #line hidden 616 WriteLiteral(" <div"); 617618 WriteLiteral(" class=\"row\""); 619620 WriteLiteral(">\r\n"); 621622 WriteLiteral(" "); 623624625 #line 185 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 626 Write(RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-products.cshtml", espressoProduct)); 627628629 #line default 630 #line hidden 631 WriteLiteral("\r\n </div>\r\n"); 632633634 #line 187 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 635 } 636637638 #line default 639 #line hidden 640 WriteLiteral(" "); 641642643 #line 188 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 644 if (espressoProduct.Articles.Products.Any()) 645 { 646647648 #line default 649 #line hidden 650 WriteLiteral(" <div"); 651652 WriteLiteral(" class=\"row\""); 653654 WriteLiteral(">\r\n"); 655656 WriteLiteral(" "); 657658659 #line 191 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 660 Write(RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-articles.cshtml", espressoProduct)); 661662663 #line default 664 #line hidden 665 WriteLiteral("\r\n </div>\r\n"); 666667668 #line 193 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 669 } 670671672 #line default 673 #line hidden 674 WriteLiteral(" "); 675676677 #line 194 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 678 if (espressoProduct.Cases.Products.Any()) 679 { 680681682 #line default 683 #line hidden 684 WriteLiteral(" <div"); 685686 WriteLiteral(" class=\"row\""); 687688 WriteLiteral(">\r\n"); 689690 WriteLiteral(" "); 691692693 #line 197 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 694 Write(RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-cases.cshtml", espressoProduct)); 695696697 #line default 698 #line hidden 699 WriteLiteral("\r\n </div>\r\n"); 700701702 #line 199 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 703 } 704705706 #line default 707 #line hidden 708 WriteLiteral(" "); 709710711 #line 200 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 712 if (espressoProduct.Events.Products.Any()) 713 { 714715716 #line default 717 #line hidden 718 WriteLiteral(" <div"); 719720 WriteLiteral(" class=\"row\""); 721722 WriteLiteral(">\r\n"); 723724 WriteLiteral(" "); 725726727 #line 203 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 728 Write(RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-events.cshtml", espressoProduct)); 729730731 #line default 732 #line hidden 733 WriteLiteral("\r\n </div>\r\n"); 734735736 #line 205 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 737 } 738739740 #line default 741 #line hidden 742 WriteLiteral("\r\n </div>\r\n </div>\r\n</div>\r\n"); 743744745 #line 210 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 746 Write(RenderingService.Instance.SectionEnd()); 747748749 #line default 750 #line hidden 751 WriteLiteral("\r\n"); 752753754 #line 211 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 755 Write(RenderingService.Instance.SectionStart(new SectionSettings())); 756757758 #line default 759 #line hidden 760 WriteLiteral("\r\n\r\n"); 761762763 #line 213 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 764 Write(SnippetStart("profileProductCompanyDescription")); 765766767 #line default 768 #line hidden 769770 #line 213 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 771 Write(companyDescriptionFormattedMetaDesc); 772773774 #line default 775 #line hidden 776777 #line 213 "E:\dynamicweb.net\Solutions\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml" 778 Write(SnippetEnd("profileProductCompanyDescription")); 779780781 #line default 782 #line hidden 783 WriteLiteral(" "); 784785 } 786 } 787 } 788

1 @inherits Co3.Espresso.Website.TemplateBases.Paragraphs.Module 2 @using System.Text.RegularExpressions 3 @using Co3.Espresso.Base.Extensions 4 @using Co3.Espresso.Website.Services 5 @using Co3.Espresso.Website.Models.FrontEnd 6 @using Co3.Espresso.Website.Models.FrontEnd.Settings 7 @using Co3.MCH.Data.Models.MCH365 8 @using Co3.MCH.Website.Frontend.Helpers 9 @using Co3.MCH.Website.Frontend.Models.Frontend 10 @using Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce 11 @using Dynamicweb.Core 12 13 @{ 14 ProfileProduct espressoProduct = Co3.MCH.Website.Frontend.Services.Ecommerce.ProductService.Instance.GetEspressoProduct( 15 new ProductSettings() 16 { 17 Id = GetString("Ecom:Product.ID"), 18 VariantId = GetString("Ecom:Product.VariantID"), 19 PrimaryVariantId = GetString("Ecom:Product.DefaultVariantComboID"), 20 EmbeddedInModelList = false 21 }, nameof(ProfileProduct) 22 ) as ProfileProduct; 23 24 // EXAMPLE 25 bool hasPresentation = espressoProduct.HasPresentation; 26 int presentationContactPersons = 0; 27 if (hasPresentation) 28 { 29 presentationContactPersons = espressoProduct.Presentation.ContactPersons.Products.Count(); 30 } 31 32 IEnumerable<BoothInfo> booths = espressoProduct.Booths; 33 34 // CUSTOM COMPANY FIELDS 35 string companyDescriptionFormatted = espressoProduct.Company.DescriptionFormatted; 36 37 string companyDescriptionFormattedStrippedHtml = companyDescriptionFormatted.StripHtml(); 38 39 string companyDescriptionFormattedMetaDesc = !string.IsNullOrEmpty(companyDescriptionFormattedStrippedHtml) ? companyDescriptionFormattedStrippedHtml : espressoProduct.Company.Name; 40 41 if ( companyDescriptionFormattedStrippedHtml.Length > 160 ) 42 { 43 companyDescriptionFormattedMetaDesc = !string.IsNullOrEmpty(companyDescriptionFormattedStrippedHtml) ? companyDescriptionFormattedStrippedHtml.Substring(0, 160) : espressoProduct.Company.Name; 44 } 45 46 string companyColor = ""; 47 48 if (espressoProduct.Company.BrandColor.IsNullOrEmpty()) 49 { 50 companyColor = MCH365Context.Current.TradeShowDetails.PrimaryColor; 51 } 52 else 53 { 54 companyColor = espressoProduct.Company.BrandColor; 55 } 56 57 // CUSTOM COMPANY COLOR SCHEME 58 Regex hexcodeRegex = new Regex(@"^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"); 59 companyColor = hexcodeRegex.IsMatch( companyColor ) ? companyColor : "#000000"; 60 ColorHelper.HSL brandExhibitor = ColorHelper.Instance.HexToHsl(companyColor); 61 62 ViewBag.TextColor = brandExhibitor.L < 60 ? "e-text-light" : "e-text-dark"; 63 64 // VIDEO 65 string presentationVideo = ""; 66 67 if (espressoProduct.Presentation != null && espressoProduct.Presentation.Video != null && !string.IsNullOrEmpty(espressoProduct.Presentation.Video)) 68 { 69 string presentationVideoRaw = espressoProduct.Presentation.Video; 70 71 if (presentationVideoRaw.Contains("https://vimeo.com/")) 72 { 73 presentationVideo = "https://player.vimeo.com/video/" + (presentationVideoRaw.Replace("https://vimeo.com/", "")); 74 } 75 else if (presentationVideoRaw.Contains("https://youtu")) 76 { 77 presentationVideo = ("https://www.youtube.com/embed/" + presentationVideoRaw.Replace("https://youtu.be/", "").Replace("https://www.youtube.com/embed/", "")); 78 } 79 else if (presentationVideoRaw.Contains("https://www.youtube.com/watch?v=")) 80 { 81 presentationVideo = ("https://www.youtube.com/embed/" + presentationVideoRaw.Replace("https://www.youtube.com/watch?v=", "")); 82 } 83 else 84 { 85 presentationVideo = ("https://www.youtube.com/embed/" + presentationVideoRaw); 86 } 87 } 88 } 89 90 <style> 91 :root { 92 --exhibitor-color: @brandExhibitor.ToString(); 93 --exhibitor-color-darken: @brandExhibitor.Darken(10).ToString(); 94 --exhibition-profile-exhibitor-brand-color: hsl(var(--exhibitor-color)); 95 --exhibition-profile-exhibitor-brand-color-darken: hsl(var(--exhibitor-color-darken)); 96 --exhibition-profile-exhibitor-brand-color-opaque: hsla(var(--exhibitor-color), 0.85); 97 } 98 99 .breadcrumb.nav { 100 background-color: var(--exhibition-profile-exhibitor-brand-color-darken); 101 } 102103 </style> 104105 @RenderingService.Instance.SectionEnd() 106 @RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-topsection.cshtml", espressoProduct) 107 @RenderingService.Instance.SectionStart(new SectionSettings 108 { 109 Classes = new ClassList("e-section mch365-custom-product-details-wrapper") 110 }) 111112113 @RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-sidebar.cshtml", espressoProduct) 114 <div class="col-12 col-md-8 col-lg-9 p-columns mch365-custom-product-details-wrapper-main-content"> 115116 <div class="row align-items-end pt-3"> 117 <div class="col-12 col-md-6 col-lg-7"> 118 @if ( hasPresentation ) 119 { 120 <p class="lead font-weight-light mb-0">@Translate( "MCH365 - Exhibitor details topSectionFairInfoOn - Text", "på" ) @MCH365Context.Current.TradeShowDetails.Name</p> 121 } 122 <h1 class="mega my-0">@espressoProduct.Company.Name</h1> 123 </div> 124 @if (booths != null) 125 { 126 <div class="col-12 col-md-6 col-lg-5 mt-3 mt-md-0 d-flex flex-column justify-content-md-end align-items-md-end"> 127 <p class="h4 mb-0">@Translate("Stand")</p> 128 @if (booths.Count() == 1) 129 { 130 BoothInfo booth = booths.FirstOrDefault(); 131 if (booth.Hall != null && booth.Booth != null) 132 { 133 <h2 class="mb-0 font-weight-extrabold mt-0"> 134 <span class="enlarge-text">@booth.Hall.Name</span> @booth.Booth.Number 135 </h2> 136 } 137 } 138 else 139 { 140 <div class="d-flex flex-wrap justify-content-md-end w-100" style="column-gap: 1em;"> 141 @foreach (BoothInfo booth in booths) 142 { 143144 if (booth.Hall != null && booth.Booth != null) 145 { 146 <h2 class="small mt-0 mb-0 font-weight-extrabold flex-nowrap"> 147 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number</span> 148 </h2> 149 } 150 } 151 </div> 152 } 153 </div> 154 } 155 <div class="col-12 pt-1"> 156 <hr/> 157 </div> 158 </div> 159160 <div class="row mt-2"> 161 <div class="col-12"> 162 <div class="row"> 163 <div class="col-12 col-lg-8 mb-2 pr-lg-2 pr-xl-3" id="presentation"> 164 @if (!string.IsNullOrEmpty(companyDescriptionFormatted)) 165 { 166 <p>@companyDescriptionFormatted</p> 167 } 168 else 169 { 170 <h4>@Translate("MCH365 - Exhibitor details descriptionNoInfoHeader - Heading", "Vi har registreret udstilleren som leverandør eller udstiller på messen.")</h4> 171 <p>@Translate("MCH365 - Exhibitor details descriptionNoInfoText - Text", "Dog har de endnu ikke oplyst yderligere beskrivelse på deres profil.")</p> 172 } 173174175 </div> 176 @if (espressoProduct.ContactPersons.Products.Any()) 177 { 178 @RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-contactpersons.cshtml", espressoProduct) 179 } 180 </div> 181182 @if (espressoProduct.Products.Products.Any()) 183 { 184 <div class="row"> 185 @RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-products.cshtml", espressoProduct) 186 </div> 187 } 188 @if (espressoProduct.Articles.Products.Any()) 189 { 190 <div class="row"> 191 @RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-articles.cshtml", espressoProduct) 192 </div> 193 } 194 @if (espressoProduct.Cases.Products.Any()) 195 { 196 <div class="row"> 197 @RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-cases.cshtml", espressoProduct) 198 </div> 199 } 200 @if (espressoProduct.Events.Products.Any()) 201 { 202 <div class="row"> 203 @RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-events.cshtml", espressoProduct) 204 </div> 205 } 206207 </div> 208 </div> 209 </div> 210 @RenderingService.Instance.SectionEnd() 211 @RenderingService.Instance.SectionStart(new SectionSettings()) 212213 @SnippetStart("profileProductCompanyDescription")@companyDescriptionFormattedMetaDesc@SnippetEnd("profileProductCompanyDescription") @* Avoid using linebreaks in this snippet, as it will also add linebreaks to the content *@

Virksomhedsprofiler samt speciale- og interesseområder er udfyldt og tilføjet af leverandørerne og er ikke baseret på viden eller vurdering fra hi Tech & Industry.