Adnart / Asobu
We participate at Formland Autumn 2026
Asobu is a Canadian brand based in Montreal, designing innovative, functional, and stylish drinkware since 1998. We blend modern design with everyday convenience, delivering high-quality products that are as practical as they are fun.
Step into a vibrant world of bottles, cups, and containers—each one featuring charming, collectible characters. The Besties are playful, adorable, and irresistibly lovable, bringing joy to both kids and adults alike.
And just when you think you’ve seen it all, Asobu surprises you again—with fresh designs, new characters, and delightful details that make every sip more fun. Whether you're shopping for littl
Error executing template "Designs/exhibition_site/QueryPublisher/partials/mch365-profile-item.cshtml" System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Co3.MCH.Website.Frontend.Services.MCH365.ProfileService.GetProfileSubAssetInfo(Profile profile) in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Services\MCH365\ProfileService.cs:line 104 at Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct.get_SubAssetInfo() in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Models\Frontend\Ecommerce\ProfileProduct.cs:line 55 at CompiledRazorTemplates.Dynamic.RazorEngine_db139817361046eb92da87d5f9d7fea3.Execute() in E:\Websites\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\QueryPublisher\partials\mch365-profile-item.cshtml:line 187 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()1 @using Co3.MCH.Data.Models.MCH365 2 @using Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce 3 @using Co3.MCH.Website.Frontend.Modules.MCH365 4 @using Co3.MCH.Website.Frontend.Services.Ecommerce 5 @using Dynamicweb.Frontend 6 @inherits Dynamicweb.Rendering.ViewModelTemplate< Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct > 7 8 @{ 9 bool hasPresentation = Model.HasPresentation; 10 bool companyBookMeeting = Model.Contact.BookMeeting; 11 bool companyDirectContact = Model.Contact.DirectContact; 12 string companyEmail = Model.Company.Email; 13 List< ContactPersonProduct > contactPersons; 14 15 string profileText; 16 17 if ( hasPresentation ) 18 { 19 contactPersons = Model.Presentation.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 20 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Presentation.Description, 650 ); 21 } 22 else 23 { 24 contactPersons = Model.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 25 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Company.Description, 650 ); 26 } 27 28 string displayPageId = PageView.Current().Area.Item[ "ProfileDisplayPage" ].ToString(); 29 string formatSyntax = string.IsNullOrEmpty( Model.VariantId ) ? "Default.aspx?ID={0}&ProductID={1}" : "Default.aspx?ID={0}&ProductID={1}&VariantID={2}"; 30 string rawUrl = string.IsNullOrEmpty( Model.VariantId ) ? string.Format( formatSyntax, displayPageId, Model.Id ) : string.Format( formatSyntax, displayPageId, Model.Id, Model.VariantId ); 31 string displayPageLink = SearchEngineFriendlyURLs.GetFriendlyUrl( rawUrl ); 32 string listViewMode = string.IsNullOrEmpty( Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString() ) ? "expanded" : Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString(); 33 IEnumerable<BoothInfo> booths = Model.Booths; 34 } 35 36 @if ( listViewMode == "condensed" ) 37 { 38 <div data-listViewMode="@listViewMode" class="w-100 bg-ultralight border-radius mt-half e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 39 <div class="e-productlist-item-container container-fluid h-100"> 40 <div class="row h-100"> 41 <div class="col-12 p-1 mch365-productlist-item-content-wrapper item-condensed flex-row"> 42 <div class="item-condensed-title"> 43 <div class="d-flex mr-3"> 44 <div class="condensed-list-logo mr-1"> 45 @if ( Model?.Company?.Logo != null ) 46 { 47 string logoImage = Model.Company.Logo; 48 string companyBackgroundColor = Model.Company.BrandColor; 49 50 string noCompanyInfo = ""; 51 string textLight = "e-text-light"; 52 53 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 54 { 55 noCompanyInfo = "bg-light"; 56 textLight = ""; 57 } 58 59 string noLogoBackground = ""; 60 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 61 { 62 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 63 } 64 65 <div class="e-productlist-item-image-container @noCompanyInfo mb-0" @noLogoBackground> 66 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@Model.Link"> 67 @{ 68 if ( string.IsNullOrEmpty( logoImage ) ) 69 { 70 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 71 } 72 else 73 { 74 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 75 } 76 } 77 78 </a> 79 </div> 80 } 81 </div> 82 <div> 83 <h4 class="mb-0 font-weight-extrabold line-clamp-1">@Model.Company.Name</h4> 84 <p class="small line-height-sm mb-0 mt-1 line-clamp-2"> 85 @profileText 86 </p> 87 </div> 88 </div> 89 </div> 90 <div class="item-condensed-booth"> 91 @if (booths != null) 92 { 93 if ( booths.Count() == 1) 94 { 95 BoothInfo booth = booths.FirstOrDefault(); 96 if ( booth.Hall != null && booth.Booth != null ) 97 { 98 <p class="small mb-0"> 99 <small>@Translate("MCH365 - Profile booth - Text", "Stand")</small> 100 </p> 101 <h4 class="mt-half mb-0 font-weight-extrabold mr-xl-2" style="white-space: nowrap"> 102 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number </span> 103 </h4> 104 } 105 } 106 else 107 { 108 <div class="align-items-baseline d-inline-flex flex-wrap justify-content-end justify-content-xl-start mb-1"> 109 <p class="small w-100 mb-0"> 110 <small>@Translate("MCH365 - Profile booths - Text", "Stande")</small> 111 </p> 112 @foreach ( BoothInfo booth in booths ) 113 { 114 if ( booth.Hall != null && booth.Booth != null ) 115 { 116 <h4 class="font-weight-extrabold mb-0 ml-1 ml-xl-0 mr-xl-1 mt-half text-muted" style="white-space: nowrap"> 117 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number</span> 118 </h4> 119 } 120 } 121 </div> 122 } 123 } 124 </div> 125 <div class="item-condensed-subasset"> 126 @if ( Model.SubAssetInfo.Count > 0 ) 127 { 128 <p class="mb-0 font-weight-bold"> 129 <small>@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</small> 130 </p> 131 <p class="small mb-0 mt-half font-weight-normal d-none d-md-block">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 132 } 133 </div> 134 <div class="item-condensed-contacts"> 135 @if ( contactPersons.Any() ) 136 { 137 <div class="mt-auto"> 138 <p class="d-block mb-0 text-right"> 139 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 140 </p> 141 </div> 142 } 143 </div> 144 <div class="item-condensed-options"> 145 @if ( !string.IsNullOrEmpty( companyEmail ) ) 146 { 147 <div class="d-flex small align-items-center justify-content-end mch365-custom-productlist-cta"> 148 @if ( companyDirectContact ) 149 { 150 <span class="mch365-custom-productlist-cta-icon"> 151 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )" alt="" role="presentation"/> 152 </span> 153 } 154 @if ( companyBookMeeting ) 155 { 156 <span class="mch365-custom-productlist-cta-icon"> 157 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )" alt="" role="presentation"/> 158 </span> 159 } 160 </div> 161 } 162 </div> 163 </div> 164 </div> 165 </div> 166 </div> 167 } 168 else 169 { 170 <div class="w-100 bg-ultralight border-radius my-1 e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 171 <div class="e-productlist-item-container container-fluid h-100"> 172 <div class="row h-100"> 173 <div class="col-9 col-lg-7 col-xl-8 p-1 p-lg-2 mch365-productlist-item-content-wrapper"> 174 <h3 class="mb-0 font-weight-extrabold">@Model.Company.Name</h3> 175176 @if (booths != null && booths.Any()) 177 { 178 <p class="mb-0 mt-0 text-primary font-weight-bold">@Translate( "MCH365 - Profile listItem ExhibitOnFestival - Text", "Vi deltager på" ) <!--$$MCH365.Current.TradeShowDetails.Name--></p> 179 } 180181182 <p class="small line-height-sm mb-2 mt-1 line-clamp-10"> 183 @profileText 184 </p> 185186187 @if ( Model.SubAssetInfo.Count > 0 ) 188 { 189 <span class="mch365-productlist-item-bulletin-wrapper mt-auto"> 190 <h4 class="mb-0">@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</h4> 191 <p class="small mb-0 mt-half font-weight-normal">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 192 </span> 193 } 194 </div> 195196 <div class="col-3 col-lg-5 col-xl-4 bg-light p-1 p-lg-2 mch365-productlist-item-sidebar-wrapper"> 197198 @if ( Model?.Company?.Logo != null ) 199 { 200 string logoImage = Model.Company.Logo; 201 string companyBackgroundColor = Model.Company.BrandColor; 202203 string noCompanyInfo = ""; 204 string textLight = "e-text-light"; 205206 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 207 { 208 noCompanyInfo = "bg-light"; 209 textLight = ""; 210 } 211212 string noLogoBackground = ""; 213 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 214 { 215 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 216 } 217218 <div class="e-productlist-item-image-container @noCompanyInfo" @noLogoBackground> 219 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@displayPageLink"> 220 @{ 221 if ( string.IsNullOrEmpty( logoImage ) ) 222 { 223 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 224 } 225 else 226 { 227 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 228 } 229 } 230231 </a> 232 </div> 233 } 234235 @if ( !string.IsNullOrEmpty( companyEmail ) ) 236 { 237 <div class="small flex-column mb-2"> 238 @if ( companyDirectContact ) 239 { 240 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 241 <span class="mch365-custom-productlist-cta-icon"> 242 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" alt="" role="presentation"/> 243 </span><span>@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )</span> 244 </span> 245 } 246 @if ( companyBookMeeting ) 247 { 248 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 249 <span class="mch365-custom-productlist-cta-icon"> 250 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" alt="" role="presentation"/> 251 </span><span>@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )</span> 252 </span> 253 } 254 </div> 255 } 256 @if ( contactPersons.Any() ) 257 { 258 <div class="mt-auto"> 259 <ul class="mch365-productlist-custom-contact-persons"> 260261 @foreach ( ContactPersonProduct contactPerson in contactPersons.OrderBy( cp => cp.Sort ).Take( 3 ) ) 262 { 263 string noImageClasses = ""; 264 string contactPersonImage = contactPerson.Image; 265 if ( string.IsNullOrEmpty( contactPersonImage ) ) 266 { 267 contactPersonImage = "/Files/Templates/Designs/mch365_admin/_assets/img/mch365-noimage.svg"; 268 noImageClasses = "bg-white"; 269 } 270271 <li class="animate animate-triggered fadeIn animate-show @noImageClasses" style="background-image: url('/admin/public/getimage.ashx?Image=@contactPersonImage&Width=100&Height=100&Format=webp&Quality=75&Crop=0');" title="@contactPerson.Name"></li> 272 } 273274 @if ( contactPersons.Count() > 3 ) 275 { 276 <li class="mch365-productlist-custom-contact-persons-add"> </li> 277 } 278279 </ul> 280 <p class="d-block mb-0 mt-1 small text-center"> 281 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 282 </p> 283 </div> 284 } 285 </div> 286 </div> 287 </div> 288 </div> 289 } 290
Error executing template "Designs/exhibition_site/QueryPublisher/partials/mch365-profile-item.cshtml" System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Co3.MCH.Website.Frontend.Services.MCH365.ProfileService.GetProfileSubAssetInfo(Profile profile) in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Services\MCH365\ProfileService.cs:line 104 at Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct.get_SubAssetInfo() in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Models\Frontend\Ecommerce\ProfileProduct.cs:line 55 at CompiledRazorTemplates.Dynamic.RazorEngine_db139817361046eb92da87d5f9d7fea3.Execute() in E:\Websites\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\QueryPublisher\partials\mch365-profile-item.cshtml:line 187 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()1 @using Co3.MCH.Data.Models.MCH365 2 @using Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce 3 @using Co3.MCH.Website.Frontend.Modules.MCH365 4 @using Co3.MCH.Website.Frontend.Services.Ecommerce 5 @using Dynamicweb.Frontend 6 @inherits Dynamicweb.Rendering.ViewModelTemplate< Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct > 7 8 @{ 9 bool hasPresentation = Model.HasPresentation; 10 bool companyBookMeeting = Model.Contact.BookMeeting; 11 bool companyDirectContact = Model.Contact.DirectContact; 12 string companyEmail = Model.Company.Email; 13 List< ContactPersonProduct > contactPersons; 14 15 string profileText; 16 17 if ( hasPresentation ) 18 { 19 contactPersons = Model.Presentation.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 20 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Presentation.Description, 650 ); 21 } 22 else 23 { 24 contactPersons = Model.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 25 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Company.Description, 650 ); 26 } 27 28 string displayPageId = PageView.Current().Area.Item[ "ProfileDisplayPage" ].ToString(); 29 string formatSyntax = string.IsNullOrEmpty( Model.VariantId ) ? "Default.aspx?ID={0}&ProductID={1}" : "Default.aspx?ID={0}&ProductID={1}&VariantID={2}"; 30 string rawUrl = string.IsNullOrEmpty( Model.VariantId ) ? string.Format( formatSyntax, displayPageId, Model.Id ) : string.Format( formatSyntax, displayPageId, Model.Id, Model.VariantId ); 31 string displayPageLink = SearchEngineFriendlyURLs.GetFriendlyUrl( rawUrl ); 32 string listViewMode = string.IsNullOrEmpty( Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString() ) ? "expanded" : Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString(); 33 IEnumerable<BoothInfo> booths = Model.Booths; 34 } 35 36 @if ( listViewMode == "condensed" ) 37 { 38 <div data-listViewMode="@listViewMode" class="w-100 bg-ultralight border-radius mt-half e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 39 <div class="e-productlist-item-container container-fluid h-100"> 40 <div class="row h-100"> 41 <div class="col-12 p-1 mch365-productlist-item-content-wrapper item-condensed flex-row"> 42 <div class="item-condensed-title"> 43 <div class="d-flex mr-3"> 44 <div class="condensed-list-logo mr-1"> 45 @if ( Model?.Company?.Logo != null ) 46 { 47 string logoImage = Model.Company.Logo; 48 string companyBackgroundColor = Model.Company.BrandColor; 49 50 string noCompanyInfo = ""; 51 string textLight = "e-text-light"; 52 53 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 54 { 55 noCompanyInfo = "bg-light"; 56 textLight = ""; 57 } 58 59 string noLogoBackground = ""; 60 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 61 { 62 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 63 } 64 65 <div class="e-productlist-item-image-container @noCompanyInfo mb-0" @noLogoBackground> 66 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@Model.Link"> 67 @{ 68 if ( string.IsNullOrEmpty( logoImage ) ) 69 { 70 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 71 } 72 else 73 { 74 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 75 } 76 } 77 78 </a> 79 </div> 80 } 81 </div> 82 <div> 83 <h4 class="mb-0 font-weight-extrabold line-clamp-1">@Model.Company.Name</h4> 84 <p class="small line-height-sm mb-0 mt-1 line-clamp-2"> 85 @profileText 86 </p> 87 </div> 88 </div> 89 </div> 90 <div class="item-condensed-booth"> 91 @if (booths != null) 92 { 93 if ( booths.Count() == 1) 94 { 95 BoothInfo booth = booths.FirstOrDefault(); 96 if ( booth.Hall != null && booth.Booth != null ) 97 { 98 <p class="small mb-0"> 99 <small>@Translate("MCH365 - Profile booth - Text", "Stand")</small> 100 </p> 101 <h4 class="mt-half mb-0 font-weight-extrabold mr-xl-2" style="white-space: nowrap"> 102 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number </span> 103 </h4> 104 } 105 } 106 else 107 { 108 <div class="align-items-baseline d-inline-flex flex-wrap justify-content-end justify-content-xl-start mb-1"> 109 <p class="small w-100 mb-0"> 110 <small>@Translate("MCH365 - Profile booths - Text", "Stande")</small> 111 </p> 112 @foreach ( BoothInfo booth in booths ) 113 { 114 if ( booth.Hall != null && booth.Booth != null ) 115 { 116 <h4 class="font-weight-extrabold mb-0 ml-1 ml-xl-0 mr-xl-1 mt-half text-muted" style="white-space: nowrap"> 117 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number</span> 118 </h4> 119 } 120 } 121 </div> 122 } 123 } 124 </div> 125 <div class="item-condensed-subasset"> 126 @if ( Model.SubAssetInfo.Count > 0 ) 127 { 128 <p class="mb-0 font-weight-bold"> 129 <small>@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</small> 130 </p> 131 <p class="small mb-0 mt-half font-weight-normal d-none d-md-block">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 132 } 133 </div> 134 <div class="item-condensed-contacts"> 135 @if ( contactPersons.Any() ) 136 { 137 <div class="mt-auto"> 138 <p class="d-block mb-0 text-right"> 139 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 140 </p> 141 </div> 142 } 143 </div> 144 <div class="item-condensed-options"> 145 @if ( !string.IsNullOrEmpty( companyEmail ) ) 146 { 147 <div class="d-flex small align-items-center justify-content-end mch365-custom-productlist-cta"> 148 @if ( companyDirectContact ) 149 { 150 <span class="mch365-custom-productlist-cta-icon"> 151 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )" alt="" role="presentation"/> 152 </span> 153 } 154 @if ( companyBookMeeting ) 155 { 156 <span class="mch365-custom-productlist-cta-icon"> 157 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )" alt="" role="presentation"/> 158 </span> 159 } 160 </div> 161 } 162 </div> 163 </div> 164 </div> 165 </div> 166 </div> 167 } 168 else 169 { 170 <div class="w-100 bg-ultralight border-radius my-1 e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 171 <div class="e-productlist-item-container container-fluid h-100"> 172 <div class="row h-100"> 173 <div class="col-9 col-lg-7 col-xl-8 p-1 p-lg-2 mch365-productlist-item-content-wrapper"> 174 <h3 class="mb-0 font-weight-extrabold">@Model.Company.Name</h3> 175176 @if (booths != null && booths.Any()) 177 { 178 <p class="mb-0 mt-0 text-primary font-weight-bold">@Translate( "MCH365 - Profile listItem ExhibitOnFestival - Text", "Vi deltager på" ) <!--$$MCH365.Current.TradeShowDetails.Name--></p> 179 } 180181182 <p class="small line-height-sm mb-2 mt-1 line-clamp-10"> 183 @profileText 184 </p> 185186187 @if ( Model.SubAssetInfo.Count > 0 ) 188 { 189 <span class="mch365-productlist-item-bulletin-wrapper mt-auto"> 190 <h4 class="mb-0">@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</h4> 191 <p class="small mb-0 mt-half font-weight-normal">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 192 </span> 193 } 194 </div> 195196 <div class="col-3 col-lg-5 col-xl-4 bg-light p-1 p-lg-2 mch365-productlist-item-sidebar-wrapper"> 197198 @if ( Model?.Company?.Logo != null ) 199 { 200 string logoImage = Model.Company.Logo; 201 string companyBackgroundColor = Model.Company.BrandColor; 202203 string noCompanyInfo = ""; 204 string textLight = "e-text-light"; 205206 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 207 { 208 noCompanyInfo = "bg-light"; 209 textLight = ""; 210 } 211212 string noLogoBackground = ""; 213 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 214 { 215 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 216 } 217218 <div class="e-productlist-item-image-container @noCompanyInfo" @noLogoBackground> 219 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@displayPageLink"> 220 @{ 221 if ( string.IsNullOrEmpty( logoImage ) ) 222 { 223 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 224 } 225 else 226 { 227 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 228 } 229 } 230231 </a> 232 </div> 233 } 234235 @if ( !string.IsNullOrEmpty( companyEmail ) ) 236 { 237 <div class="small flex-column mb-2"> 238 @if ( companyDirectContact ) 239 { 240 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 241 <span class="mch365-custom-productlist-cta-icon"> 242 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" alt="" role="presentation"/> 243 </span><span>@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )</span> 244 </span> 245 } 246 @if ( companyBookMeeting ) 247 { 248 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 249 <span class="mch365-custom-productlist-cta-icon"> 250 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" alt="" role="presentation"/> 251 </span><span>@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )</span> 252 </span> 253 } 254 </div> 255 } 256 @if ( contactPersons.Any() ) 257 { 258 <div class="mt-auto"> 259 <ul class="mch365-productlist-custom-contact-persons"> 260261 @foreach ( ContactPersonProduct contactPerson in contactPersons.OrderBy( cp => cp.Sort ).Take( 3 ) ) 262 { 263 string noImageClasses = ""; 264 string contactPersonImage = contactPerson.Image; 265 if ( string.IsNullOrEmpty( contactPersonImage ) ) 266 { 267 contactPersonImage = "/Files/Templates/Designs/mch365_admin/_assets/img/mch365-noimage.svg"; 268 noImageClasses = "bg-white"; 269 } 270271 <li class="animate animate-triggered fadeIn animate-show @noImageClasses" style="background-image: url('/admin/public/getimage.ashx?Image=@contactPersonImage&Width=100&Height=100&Format=webp&Quality=75&Crop=0');" title="@contactPerson.Name"></li> 272 } 273274 @if ( contactPersons.Count() > 3 ) 275 { 276 <li class="mch365-productlist-custom-contact-persons-add"> </li> 277 } 278279 </ul> 280 <p class="d-block mb-0 mt-1 small text-center"> 281 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 282 </p> 283 </div> 284 } 285 </div> 286 </div> 287 </div> 288 </div> 289 } 290
Error executing template "Designs/exhibition_site/QueryPublisher/partials/mch365-profile-item.cshtml" System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Co3.MCH.Website.Frontend.Services.MCH365.ProfileService.GetProfileSubAssetInfo(Profile profile) in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Services\MCH365\ProfileService.cs:line 104 at Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct.get_SubAssetInfo() in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Models\Frontend\Ecommerce\ProfileProduct.cs:line 55 at CompiledRazorTemplates.Dynamic.RazorEngine_db139817361046eb92da87d5f9d7fea3.Execute() in E:\Websites\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\QueryPublisher\partials\mch365-profile-item.cshtml:line 187 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()1 @using Co3.MCH.Data.Models.MCH365 2 @using Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce 3 @using Co3.MCH.Website.Frontend.Modules.MCH365 4 @using Co3.MCH.Website.Frontend.Services.Ecommerce 5 @using Dynamicweb.Frontend 6 @inherits Dynamicweb.Rendering.ViewModelTemplate< Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct > 7 8 @{ 9 bool hasPresentation = Model.HasPresentation; 10 bool companyBookMeeting = Model.Contact.BookMeeting; 11 bool companyDirectContact = Model.Contact.DirectContact; 12 string companyEmail = Model.Company.Email; 13 List< ContactPersonProduct > contactPersons; 14 15 string profileText; 16 17 if ( hasPresentation ) 18 { 19 contactPersons = Model.Presentation.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 20 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Presentation.Description, 650 ); 21 } 22 else 23 { 24 contactPersons = Model.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 25 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Company.Description, 650 ); 26 } 27 28 string displayPageId = PageView.Current().Area.Item[ "ProfileDisplayPage" ].ToString(); 29 string formatSyntax = string.IsNullOrEmpty( Model.VariantId ) ? "Default.aspx?ID={0}&ProductID={1}" : "Default.aspx?ID={0}&ProductID={1}&VariantID={2}"; 30 string rawUrl = string.IsNullOrEmpty( Model.VariantId ) ? string.Format( formatSyntax, displayPageId, Model.Id ) : string.Format( formatSyntax, displayPageId, Model.Id, Model.VariantId ); 31 string displayPageLink = SearchEngineFriendlyURLs.GetFriendlyUrl( rawUrl ); 32 string listViewMode = string.IsNullOrEmpty( Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString() ) ? "expanded" : Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString(); 33 IEnumerable<BoothInfo> booths = Model.Booths; 34 } 35 36 @if ( listViewMode == "condensed" ) 37 { 38 <div data-listViewMode="@listViewMode" class="w-100 bg-ultralight border-radius mt-half e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 39 <div class="e-productlist-item-container container-fluid h-100"> 40 <div class="row h-100"> 41 <div class="col-12 p-1 mch365-productlist-item-content-wrapper item-condensed flex-row"> 42 <div class="item-condensed-title"> 43 <div class="d-flex mr-3"> 44 <div class="condensed-list-logo mr-1"> 45 @if ( Model?.Company?.Logo != null ) 46 { 47 string logoImage = Model.Company.Logo; 48 string companyBackgroundColor = Model.Company.BrandColor; 49 50 string noCompanyInfo = ""; 51 string textLight = "e-text-light"; 52 53 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 54 { 55 noCompanyInfo = "bg-light"; 56 textLight = ""; 57 } 58 59 string noLogoBackground = ""; 60 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 61 { 62 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 63 } 64 65 <div class="e-productlist-item-image-container @noCompanyInfo mb-0" @noLogoBackground> 66 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@Model.Link"> 67 @{ 68 if ( string.IsNullOrEmpty( logoImage ) ) 69 { 70 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 71 } 72 else 73 { 74 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 75 } 76 } 77 78 </a> 79 </div> 80 } 81 </div> 82 <div> 83 <h4 class="mb-0 font-weight-extrabold line-clamp-1">@Model.Company.Name</h4> 84 <p class="small line-height-sm mb-0 mt-1 line-clamp-2"> 85 @profileText 86 </p> 87 </div> 88 </div> 89 </div> 90 <div class="item-condensed-booth"> 91 @if (booths != null) 92 { 93 if ( booths.Count() == 1) 94 { 95 BoothInfo booth = booths.FirstOrDefault(); 96 if ( booth.Hall != null && booth.Booth != null ) 97 { 98 <p class="small mb-0"> 99 <small>@Translate("MCH365 - Profile booth - Text", "Stand")</small> 100 </p> 101 <h4 class="mt-half mb-0 font-weight-extrabold mr-xl-2" style="white-space: nowrap"> 102 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number </span> 103 </h4> 104 } 105 } 106 else 107 { 108 <div class="align-items-baseline d-inline-flex flex-wrap justify-content-end justify-content-xl-start mb-1"> 109 <p class="small w-100 mb-0"> 110 <small>@Translate("MCH365 - Profile booths - Text", "Stande")</small> 111 </p> 112 @foreach ( BoothInfo booth in booths ) 113 { 114 if ( booth.Hall != null && booth.Booth != null ) 115 { 116 <h4 class="font-weight-extrabold mb-0 ml-1 ml-xl-0 mr-xl-1 mt-half text-muted" style="white-space: nowrap"> 117 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number</span> 118 </h4> 119 } 120 } 121 </div> 122 } 123 } 124 </div> 125 <div class="item-condensed-subasset"> 126 @if ( Model.SubAssetInfo.Count > 0 ) 127 { 128 <p class="mb-0 font-weight-bold"> 129 <small>@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</small> 130 </p> 131 <p class="small mb-0 mt-half font-weight-normal d-none d-md-block">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 132 } 133 </div> 134 <div class="item-condensed-contacts"> 135 @if ( contactPersons.Any() ) 136 { 137 <div class="mt-auto"> 138 <p class="d-block mb-0 text-right"> 139 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 140 </p> 141 </div> 142 } 143 </div> 144 <div class="item-condensed-options"> 145 @if ( !string.IsNullOrEmpty( companyEmail ) ) 146 { 147 <div class="d-flex small align-items-center justify-content-end mch365-custom-productlist-cta"> 148 @if ( companyDirectContact ) 149 { 150 <span class="mch365-custom-productlist-cta-icon"> 151 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )" alt="" role="presentation"/> 152 </span> 153 } 154 @if ( companyBookMeeting ) 155 { 156 <span class="mch365-custom-productlist-cta-icon"> 157 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )" alt="" role="presentation"/> 158 </span> 159 } 160 </div> 161 } 162 </div> 163 </div> 164 </div> 165 </div> 166 </div> 167 } 168 else 169 { 170 <div class="w-100 bg-ultralight border-radius my-1 e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 171 <div class="e-productlist-item-container container-fluid h-100"> 172 <div class="row h-100"> 173 <div class="col-9 col-lg-7 col-xl-8 p-1 p-lg-2 mch365-productlist-item-content-wrapper"> 174 <h3 class="mb-0 font-weight-extrabold">@Model.Company.Name</h3> 175176 @if (booths != null && booths.Any()) 177 { 178 <p class="mb-0 mt-0 text-primary font-weight-bold">@Translate( "MCH365 - Profile listItem ExhibitOnFestival - Text", "Vi deltager på" ) <!--$$MCH365.Current.TradeShowDetails.Name--></p> 179 } 180181182 <p class="small line-height-sm mb-2 mt-1 line-clamp-10"> 183 @profileText 184 </p> 185186187 @if ( Model.SubAssetInfo.Count > 0 ) 188 { 189 <span class="mch365-productlist-item-bulletin-wrapper mt-auto"> 190 <h4 class="mb-0">@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</h4> 191 <p class="small mb-0 mt-half font-weight-normal">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 192 </span> 193 } 194 </div> 195196 <div class="col-3 col-lg-5 col-xl-4 bg-light p-1 p-lg-2 mch365-productlist-item-sidebar-wrapper"> 197198 @if ( Model?.Company?.Logo != null ) 199 { 200 string logoImage = Model.Company.Logo; 201 string companyBackgroundColor = Model.Company.BrandColor; 202203 string noCompanyInfo = ""; 204 string textLight = "e-text-light"; 205206 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 207 { 208 noCompanyInfo = "bg-light"; 209 textLight = ""; 210 } 211212 string noLogoBackground = ""; 213 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 214 { 215 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 216 } 217218 <div class="e-productlist-item-image-container @noCompanyInfo" @noLogoBackground> 219 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@displayPageLink"> 220 @{ 221 if ( string.IsNullOrEmpty( logoImage ) ) 222 { 223 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 224 } 225 else 226 { 227 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 228 } 229 } 230231 </a> 232 </div> 233 } 234235 @if ( !string.IsNullOrEmpty( companyEmail ) ) 236 { 237 <div class="small flex-column mb-2"> 238 @if ( companyDirectContact ) 239 { 240 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 241 <span class="mch365-custom-productlist-cta-icon"> 242 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" alt="" role="presentation"/> 243 </span><span>@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )</span> 244 </span> 245 } 246 @if ( companyBookMeeting ) 247 { 248 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 249 <span class="mch365-custom-productlist-cta-icon"> 250 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" alt="" role="presentation"/> 251 </span><span>@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )</span> 252 </span> 253 } 254 </div> 255 } 256 @if ( contactPersons.Any() ) 257 { 258 <div class="mt-auto"> 259 <ul class="mch365-productlist-custom-contact-persons"> 260261 @foreach ( ContactPersonProduct contactPerson in contactPersons.OrderBy( cp => cp.Sort ).Take( 3 ) ) 262 { 263 string noImageClasses = ""; 264 string contactPersonImage = contactPerson.Image; 265 if ( string.IsNullOrEmpty( contactPersonImage ) ) 266 { 267 contactPersonImage = "/Files/Templates/Designs/mch365_admin/_assets/img/mch365-noimage.svg"; 268 noImageClasses = "bg-white"; 269 } 270271 <li class="animate animate-triggered fadeIn animate-show @noImageClasses" style="background-image: url('/admin/public/getimage.ashx?Image=@contactPersonImage&Width=100&Height=100&Format=webp&Quality=75&Crop=0');" title="@contactPerson.Name"></li> 272 } 273274 @if ( contactPersons.Count() > 3 ) 275 { 276 <li class="mch365-productlist-custom-contact-persons-add"> </li> 277 } 278279 </ul> 280 <p class="d-block mb-0 mt-1 small text-center"> 281 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 282 </p> 283 </div> 284 } 285 </div> 286 </div> 287 </div> 288 </div> 289 } 290
Error executing template "Designs/exhibition_site/QueryPublisher/partials/mch365-profile-item.cshtml" System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Co3.MCH.Website.Frontend.Services.MCH365.ProfileService.GetProfileSubAssetInfo(Profile profile) in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Services\MCH365\ProfileService.cs:line 104 at Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct.get_SubAssetInfo() in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Models\Frontend\Ecommerce\ProfileProduct.cs:line 55 at CompiledRazorTemplates.Dynamic.RazorEngine_db139817361046eb92da87d5f9d7fea3.Execute() in E:\Websites\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\QueryPublisher\partials\mch365-profile-item.cshtml:line 187 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()1 @using Co3.MCH.Data.Models.MCH365 2 @using Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce 3 @using Co3.MCH.Website.Frontend.Modules.MCH365 4 @using Co3.MCH.Website.Frontend.Services.Ecommerce 5 @using Dynamicweb.Frontend 6 @inherits Dynamicweb.Rendering.ViewModelTemplate< Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct > 7 8 @{ 9 bool hasPresentation = Model.HasPresentation; 10 bool companyBookMeeting = Model.Contact.BookMeeting; 11 bool companyDirectContact = Model.Contact.DirectContact; 12 string companyEmail = Model.Company.Email; 13 List< ContactPersonProduct > contactPersons; 14 15 string profileText; 16 17 if ( hasPresentation ) 18 { 19 contactPersons = Model.Presentation.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 20 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Presentation.Description, 650 ); 21 } 22 else 23 { 24 contactPersons = Model.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 25 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Company.Description, 650 ); 26 } 27 28 string displayPageId = PageView.Current().Area.Item[ "ProfileDisplayPage" ].ToString(); 29 string formatSyntax = string.IsNullOrEmpty( Model.VariantId ) ? "Default.aspx?ID={0}&ProductID={1}" : "Default.aspx?ID={0}&ProductID={1}&VariantID={2}"; 30 string rawUrl = string.IsNullOrEmpty( Model.VariantId ) ? string.Format( formatSyntax, displayPageId, Model.Id ) : string.Format( formatSyntax, displayPageId, Model.Id, Model.VariantId ); 31 string displayPageLink = SearchEngineFriendlyURLs.GetFriendlyUrl( rawUrl ); 32 string listViewMode = string.IsNullOrEmpty( Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString() ) ? "expanded" : Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString(); 33 IEnumerable<BoothInfo> booths = Model.Booths; 34 } 35 36 @if ( listViewMode == "condensed" ) 37 { 38 <div data-listViewMode="@listViewMode" class="w-100 bg-ultralight border-radius mt-half e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 39 <div class="e-productlist-item-container container-fluid h-100"> 40 <div class="row h-100"> 41 <div class="col-12 p-1 mch365-productlist-item-content-wrapper item-condensed flex-row"> 42 <div class="item-condensed-title"> 43 <div class="d-flex mr-3"> 44 <div class="condensed-list-logo mr-1"> 45 @if ( Model?.Company?.Logo != null ) 46 { 47 string logoImage = Model.Company.Logo; 48 string companyBackgroundColor = Model.Company.BrandColor; 49 50 string noCompanyInfo = ""; 51 string textLight = "e-text-light"; 52 53 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 54 { 55 noCompanyInfo = "bg-light"; 56 textLight = ""; 57 } 58 59 string noLogoBackground = ""; 60 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 61 { 62 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 63 } 64 65 <div class="e-productlist-item-image-container @noCompanyInfo mb-0" @noLogoBackground> 66 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@Model.Link"> 67 @{ 68 if ( string.IsNullOrEmpty( logoImage ) ) 69 { 70 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 71 } 72 else 73 { 74 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 75 } 76 } 77 78 </a> 79 </div> 80 } 81 </div> 82 <div> 83 <h4 class="mb-0 font-weight-extrabold line-clamp-1">@Model.Company.Name</h4> 84 <p class="small line-height-sm mb-0 mt-1 line-clamp-2"> 85 @profileText 86 </p> 87 </div> 88 </div> 89 </div> 90 <div class="item-condensed-booth"> 91 @if (booths != null) 92 { 93 if ( booths.Count() == 1) 94 { 95 BoothInfo booth = booths.FirstOrDefault(); 96 if ( booth.Hall != null && booth.Booth != null ) 97 { 98 <p class="small mb-0"> 99 <small>@Translate("MCH365 - Profile booth - Text", "Stand")</small> 100 </p> 101 <h4 class="mt-half mb-0 font-weight-extrabold mr-xl-2" style="white-space: nowrap"> 102 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number </span> 103 </h4> 104 } 105 } 106 else 107 { 108 <div class="align-items-baseline d-inline-flex flex-wrap justify-content-end justify-content-xl-start mb-1"> 109 <p class="small w-100 mb-0"> 110 <small>@Translate("MCH365 - Profile booths - Text", "Stande")</small> 111 </p> 112 @foreach ( BoothInfo booth in booths ) 113 { 114 if ( booth.Hall != null && booth.Booth != null ) 115 { 116 <h4 class="font-weight-extrabold mb-0 ml-1 ml-xl-0 mr-xl-1 mt-half text-muted" style="white-space: nowrap"> 117 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number</span> 118 </h4> 119 } 120 } 121 </div> 122 } 123 } 124 </div> 125 <div class="item-condensed-subasset"> 126 @if ( Model.SubAssetInfo.Count > 0 ) 127 { 128 <p class="mb-0 font-weight-bold"> 129 <small>@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</small> 130 </p> 131 <p class="small mb-0 mt-half font-weight-normal d-none d-md-block">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 132 } 133 </div> 134 <div class="item-condensed-contacts"> 135 @if ( contactPersons.Any() ) 136 { 137 <div class="mt-auto"> 138 <p class="d-block mb-0 text-right"> 139 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 140 </p> 141 </div> 142 } 143 </div> 144 <div class="item-condensed-options"> 145 @if ( !string.IsNullOrEmpty( companyEmail ) ) 146 { 147 <div class="d-flex small align-items-center justify-content-end mch365-custom-productlist-cta"> 148 @if ( companyDirectContact ) 149 { 150 <span class="mch365-custom-productlist-cta-icon"> 151 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )" alt="" role="presentation"/> 152 </span> 153 } 154 @if ( companyBookMeeting ) 155 { 156 <span class="mch365-custom-productlist-cta-icon"> 157 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )" alt="" role="presentation"/> 158 </span> 159 } 160 </div> 161 } 162 </div> 163 </div> 164 </div> 165 </div> 166 </div> 167 } 168 else 169 { 170 <div class="w-100 bg-ultralight border-radius my-1 e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 171 <div class="e-productlist-item-container container-fluid h-100"> 172 <div class="row h-100"> 173 <div class="col-9 col-lg-7 col-xl-8 p-1 p-lg-2 mch365-productlist-item-content-wrapper"> 174 <h3 class="mb-0 font-weight-extrabold">@Model.Company.Name</h3> 175176 @if (booths != null && booths.Any()) 177 { 178 <p class="mb-0 mt-0 text-primary font-weight-bold">@Translate( "MCH365 - Profile listItem ExhibitOnFestival - Text", "Vi deltager på" ) <!--$$MCH365.Current.TradeShowDetails.Name--></p> 179 } 180181182 <p class="small line-height-sm mb-2 mt-1 line-clamp-10"> 183 @profileText 184 </p> 185186187 @if ( Model.SubAssetInfo.Count > 0 ) 188 { 189 <span class="mch365-productlist-item-bulletin-wrapper mt-auto"> 190 <h4 class="mb-0">@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</h4> 191 <p class="small mb-0 mt-half font-weight-normal">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 192 </span> 193 } 194 </div> 195196 <div class="col-3 col-lg-5 col-xl-4 bg-light p-1 p-lg-2 mch365-productlist-item-sidebar-wrapper"> 197198 @if ( Model?.Company?.Logo != null ) 199 { 200 string logoImage = Model.Company.Logo; 201 string companyBackgroundColor = Model.Company.BrandColor; 202203 string noCompanyInfo = ""; 204 string textLight = "e-text-light"; 205206 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 207 { 208 noCompanyInfo = "bg-light"; 209 textLight = ""; 210 } 211212 string noLogoBackground = ""; 213 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 214 { 215 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 216 } 217218 <div class="e-productlist-item-image-container @noCompanyInfo" @noLogoBackground> 219 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@displayPageLink"> 220 @{ 221 if ( string.IsNullOrEmpty( logoImage ) ) 222 { 223 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 224 } 225 else 226 { 227 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 228 } 229 } 230231 </a> 232 </div> 233 } 234235 @if ( !string.IsNullOrEmpty( companyEmail ) ) 236 { 237 <div class="small flex-column mb-2"> 238 @if ( companyDirectContact ) 239 { 240 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 241 <span class="mch365-custom-productlist-cta-icon"> 242 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" alt="" role="presentation"/> 243 </span><span>@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )</span> 244 </span> 245 } 246 @if ( companyBookMeeting ) 247 { 248 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 249 <span class="mch365-custom-productlist-cta-icon"> 250 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" alt="" role="presentation"/> 251 </span><span>@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )</span> 252 </span> 253 } 254 </div> 255 } 256 @if ( contactPersons.Any() ) 257 { 258 <div class="mt-auto"> 259 <ul class="mch365-productlist-custom-contact-persons"> 260261 @foreach ( ContactPersonProduct contactPerson in contactPersons.OrderBy( cp => cp.Sort ).Take( 3 ) ) 262 { 263 string noImageClasses = ""; 264 string contactPersonImage = contactPerson.Image; 265 if ( string.IsNullOrEmpty( contactPersonImage ) ) 266 { 267 contactPersonImage = "/Files/Templates/Designs/mch365_admin/_assets/img/mch365-noimage.svg"; 268 noImageClasses = "bg-white"; 269 } 270271 <li class="animate animate-triggered fadeIn animate-show @noImageClasses" style="background-image: url('/admin/public/getimage.ashx?Image=@contactPersonImage&Width=100&Height=100&Format=webp&Quality=75&Crop=0');" title="@contactPerson.Name"></li> 272 } 273274 @if ( contactPersons.Count() > 3 ) 275 { 276 <li class="mch365-productlist-custom-contact-persons-add"> </li> 277 } 278279 </ul> 280 <p class="d-block mb-0 mt-1 small text-center"> 281 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 282 </p> 283 </div> 284 } 285 </div> 286 </div> 287 </div> 288 </div> 289 } 290
Error executing template "Designs/exhibition_site/QueryPublisher/partials/mch365-profile-item.cshtml" System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Co3.MCH.Website.Frontend.Services.MCH365.ProfileService.GetProfileSubAssetInfo(Profile profile) in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Services\MCH365\ProfileService.cs:line 104 at Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct.get_SubAssetInfo() in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Models\Frontend\Ecommerce\ProfileProduct.cs:line 55 at CompiledRazorTemplates.Dynamic.RazorEngine_db139817361046eb92da87d5f9d7fea3.Execute() in E:\Websites\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\QueryPublisher\partials\mch365-profile-item.cshtml:line 187 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()1 @using Co3.MCH.Data.Models.MCH365 2 @using Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce 3 @using Co3.MCH.Website.Frontend.Modules.MCH365 4 @using Co3.MCH.Website.Frontend.Services.Ecommerce 5 @using Dynamicweb.Frontend 6 @inherits Dynamicweb.Rendering.ViewModelTemplate< Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct > 7 8 @{ 9 bool hasPresentation = Model.HasPresentation; 10 bool companyBookMeeting = Model.Contact.BookMeeting; 11 bool companyDirectContact = Model.Contact.DirectContact; 12 string companyEmail = Model.Company.Email; 13 List< ContactPersonProduct > contactPersons; 14 15 string profileText; 16 17 if ( hasPresentation ) 18 { 19 contactPersons = Model.Presentation.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 20 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Presentation.Description, 650 ); 21 } 22 else 23 { 24 contactPersons = Model.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 25 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Company.Description, 650 ); 26 } 27 28 string displayPageId = PageView.Current().Area.Item[ "ProfileDisplayPage" ].ToString(); 29 string formatSyntax = string.IsNullOrEmpty( Model.VariantId ) ? "Default.aspx?ID={0}&ProductID={1}" : "Default.aspx?ID={0}&ProductID={1}&VariantID={2}"; 30 string rawUrl = string.IsNullOrEmpty( Model.VariantId ) ? string.Format( formatSyntax, displayPageId, Model.Id ) : string.Format( formatSyntax, displayPageId, Model.Id, Model.VariantId ); 31 string displayPageLink = SearchEngineFriendlyURLs.GetFriendlyUrl( rawUrl ); 32 string listViewMode = string.IsNullOrEmpty( Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString() ) ? "expanded" : Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString(); 33 IEnumerable<BoothInfo> booths = Model.Booths; 34 } 35 36 @if ( listViewMode == "condensed" ) 37 { 38 <div data-listViewMode="@listViewMode" class="w-100 bg-ultralight border-radius mt-half e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 39 <div class="e-productlist-item-container container-fluid h-100"> 40 <div class="row h-100"> 41 <div class="col-12 p-1 mch365-productlist-item-content-wrapper item-condensed flex-row"> 42 <div class="item-condensed-title"> 43 <div class="d-flex mr-3"> 44 <div class="condensed-list-logo mr-1"> 45 @if ( Model?.Company?.Logo != null ) 46 { 47 string logoImage = Model.Company.Logo; 48 string companyBackgroundColor = Model.Company.BrandColor; 49 50 string noCompanyInfo = ""; 51 string textLight = "e-text-light"; 52 53 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 54 { 55 noCompanyInfo = "bg-light"; 56 textLight = ""; 57 } 58 59 string noLogoBackground = ""; 60 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 61 { 62 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 63 } 64 65 <div class="e-productlist-item-image-container @noCompanyInfo mb-0" @noLogoBackground> 66 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@Model.Link"> 67 @{ 68 if ( string.IsNullOrEmpty( logoImage ) ) 69 { 70 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 71 } 72 else 73 { 74 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 75 } 76 } 77 78 </a> 79 </div> 80 } 81 </div> 82 <div> 83 <h4 class="mb-0 font-weight-extrabold line-clamp-1">@Model.Company.Name</h4> 84 <p class="small line-height-sm mb-0 mt-1 line-clamp-2"> 85 @profileText 86 </p> 87 </div> 88 </div> 89 </div> 90 <div class="item-condensed-booth"> 91 @if (booths != null) 92 { 93 if ( booths.Count() == 1) 94 { 95 BoothInfo booth = booths.FirstOrDefault(); 96 if ( booth.Hall != null && booth.Booth != null ) 97 { 98 <p class="small mb-0"> 99 <small>@Translate("MCH365 - Profile booth - Text", "Stand")</small> 100 </p> 101 <h4 class="mt-half mb-0 font-weight-extrabold mr-xl-2" style="white-space: nowrap"> 102 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number </span> 103 </h4> 104 } 105 } 106 else 107 { 108 <div class="align-items-baseline d-inline-flex flex-wrap justify-content-end justify-content-xl-start mb-1"> 109 <p class="small w-100 mb-0"> 110 <small>@Translate("MCH365 - Profile booths - Text", "Stande")</small> 111 </p> 112 @foreach ( BoothInfo booth in booths ) 113 { 114 if ( booth.Hall != null && booth.Booth != null ) 115 { 116 <h4 class="font-weight-extrabold mb-0 ml-1 ml-xl-0 mr-xl-1 mt-half text-muted" style="white-space: nowrap"> 117 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number</span> 118 </h4> 119 } 120 } 121 </div> 122 } 123 } 124 </div> 125 <div class="item-condensed-subasset"> 126 @if ( Model.SubAssetInfo.Count > 0 ) 127 { 128 <p class="mb-0 font-weight-bold"> 129 <small>@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</small> 130 </p> 131 <p class="small mb-0 mt-half font-weight-normal d-none d-md-block">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 132 } 133 </div> 134 <div class="item-condensed-contacts"> 135 @if ( contactPersons.Any() ) 136 { 137 <div class="mt-auto"> 138 <p class="d-block mb-0 text-right"> 139 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 140 </p> 141 </div> 142 } 143 </div> 144 <div class="item-condensed-options"> 145 @if ( !string.IsNullOrEmpty( companyEmail ) ) 146 { 147 <div class="d-flex small align-items-center justify-content-end mch365-custom-productlist-cta"> 148 @if ( companyDirectContact ) 149 { 150 <span class="mch365-custom-productlist-cta-icon"> 151 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )" alt="" role="presentation"/> 152 </span> 153 } 154 @if ( companyBookMeeting ) 155 { 156 <span class="mch365-custom-productlist-cta-icon"> 157 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )" alt="" role="presentation"/> 158 </span> 159 } 160 </div> 161 } 162 </div> 163 </div> 164 </div> 165 </div> 166 </div> 167 } 168 else 169 { 170 <div class="w-100 bg-ultralight border-radius my-1 e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 171 <div class="e-productlist-item-container container-fluid h-100"> 172 <div class="row h-100"> 173 <div class="col-9 col-lg-7 col-xl-8 p-1 p-lg-2 mch365-productlist-item-content-wrapper"> 174 <h3 class="mb-0 font-weight-extrabold">@Model.Company.Name</h3> 175176 @if (booths != null && booths.Any()) 177 { 178 <p class="mb-0 mt-0 text-primary font-weight-bold">@Translate( "MCH365 - Profile listItem ExhibitOnFestival - Text", "Vi deltager på" ) <!--$$MCH365.Current.TradeShowDetails.Name--></p> 179 } 180181182 <p class="small line-height-sm mb-2 mt-1 line-clamp-10"> 183 @profileText 184 </p> 185186187 @if ( Model.SubAssetInfo.Count > 0 ) 188 { 189 <span class="mch365-productlist-item-bulletin-wrapper mt-auto"> 190 <h4 class="mb-0">@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</h4> 191 <p class="small mb-0 mt-half font-weight-normal">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 192 </span> 193 } 194 </div> 195196 <div class="col-3 col-lg-5 col-xl-4 bg-light p-1 p-lg-2 mch365-productlist-item-sidebar-wrapper"> 197198 @if ( Model?.Company?.Logo != null ) 199 { 200 string logoImage = Model.Company.Logo; 201 string companyBackgroundColor = Model.Company.BrandColor; 202203 string noCompanyInfo = ""; 204 string textLight = "e-text-light"; 205206 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 207 { 208 noCompanyInfo = "bg-light"; 209 textLight = ""; 210 } 211212 string noLogoBackground = ""; 213 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 214 { 215 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 216 } 217218 <div class="e-productlist-item-image-container @noCompanyInfo" @noLogoBackground> 219 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@displayPageLink"> 220 @{ 221 if ( string.IsNullOrEmpty( logoImage ) ) 222 { 223 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 224 } 225 else 226 { 227 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 228 } 229 } 230231 </a> 232 </div> 233 } 234235 @if ( !string.IsNullOrEmpty( companyEmail ) ) 236 { 237 <div class="small flex-column mb-2"> 238 @if ( companyDirectContact ) 239 { 240 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 241 <span class="mch365-custom-productlist-cta-icon"> 242 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" alt="" role="presentation"/> 243 </span><span>@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )</span> 244 </span> 245 } 246 @if ( companyBookMeeting ) 247 { 248 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 249 <span class="mch365-custom-productlist-cta-icon"> 250 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" alt="" role="presentation"/> 251 </span><span>@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )</span> 252 </span> 253 } 254 </div> 255 } 256 @if ( contactPersons.Any() ) 257 { 258 <div class="mt-auto"> 259 <ul class="mch365-productlist-custom-contact-persons"> 260261 @foreach ( ContactPersonProduct contactPerson in contactPersons.OrderBy( cp => cp.Sort ).Take( 3 ) ) 262 { 263 string noImageClasses = ""; 264 string contactPersonImage = contactPerson.Image; 265 if ( string.IsNullOrEmpty( contactPersonImage ) ) 266 { 267 contactPersonImage = "/Files/Templates/Designs/mch365_admin/_assets/img/mch365-noimage.svg"; 268 noImageClasses = "bg-white"; 269 } 270271 <li class="animate animate-triggered fadeIn animate-show @noImageClasses" style="background-image: url('/admin/public/getimage.ashx?Image=@contactPersonImage&Width=100&Height=100&Format=webp&Quality=75&Crop=0');" title="@contactPerson.Name"></li> 272 } 273274 @if ( contactPersons.Count() > 3 ) 275 { 276 <li class="mch365-productlist-custom-contact-persons-add"> </li> 277 } 278279 </ul> 280 <p class="d-block mb-0 mt-1 small text-center"> 281 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 282 </p> 283 </div> 284 } 285 </div> 286 </div> 287 </div> 288 </div> 289 } 290
Error executing template "Designs/exhibition_site/QueryPublisher/partials/mch365-profile-item.cshtml" System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Co3.MCH.Website.Frontend.Services.MCH365.ProfileService.GetProfileSubAssetInfo(Profile profile) in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Services\MCH365\ProfileService.cs:line 104 at Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct.get_SubAssetInfo() in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Models\Frontend\Ecommerce\ProfileProduct.cs:line 55 at CompiledRazorTemplates.Dynamic.RazorEngine_db139817361046eb92da87d5f9d7fea3.Execute() in E:\Websites\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\QueryPublisher\partials\mch365-profile-item.cshtml:line 187 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()1 @using Co3.MCH.Data.Models.MCH365 2 @using Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce 3 @using Co3.MCH.Website.Frontend.Modules.MCH365 4 @using Co3.MCH.Website.Frontend.Services.Ecommerce 5 @using Dynamicweb.Frontend 6 @inherits Dynamicweb.Rendering.ViewModelTemplate< Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct > 7 8 @{ 9 bool hasPresentation = Model.HasPresentation; 10 bool companyBookMeeting = Model.Contact.BookMeeting; 11 bool companyDirectContact = Model.Contact.DirectContact; 12 string companyEmail = Model.Company.Email; 13 List< ContactPersonProduct > contactPersons; 14 15 string profileText; 16 17 if ( hasPresentation ) 18 { 19 contactPersons = Model.Presentation.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 20 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Presentation.Description, 650 ); 21 } 22 else 23 { 24 contactPersons = Model.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 25 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Company.Description, 650 ); 26 } 27 28 string displayPageId = PageView.Current().Area.Item[ "ProfileDisplayPage" ].ToString(); 29 string formatSyntax = string.IsNullOrEmpty( Model.VariantId ) ? "Default.aspx?ID={0}&ProductID={1}" : "Default.aspx?ID={0}&ProductID={1}&VariantID={2}"; 30 string rawUrl = string.IsNullOrEmpty( Model.VariantId ) ? string.Format( formatSyntax, displayPageId, Model.Id ) : string.Format( formatSyntax, displayPageId, Model.Id, Model.VariantId ); 31 string displayPageLink = SearchEngineFriendlyURLs.GetFriendlyUrl( rawUrl ); 32 string listViewMode = string.IsNullOrEmpty( Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString() ) ? "expanded" : Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString(); 33 IEnumerable<BoothInfo> booths = Model.Booths; 34 } 35 36 @if ( listViewMode == "condensed" ) 37 { 38 <div data-listViewMode="@listViewMode" class="w-100 bg-ultralight border-radius mt-half e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 39 <div class="e-productlist-item-container container-fluid h-100"> 40 <div class="row h-100"> 41 <div class="col-12 p-1 mch365-productlist-item-content-wrapper item-condensed flex-row"> 42 <div class="item-condensed-title"> 43 <div class="d-flex mr-3"> 44 <div class="condensed-list-logo mr-1"> 45 @if ( Model?.Company?.Logo != null ) 46 { 47 string logoImage = Model.Company.Logo; 48 string companyBackgroundColor = Model.Company.BrandColor; 49 50 string noCompanyInfo = ""; 51 string textLight = "e-text-light"; 52 53 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 54 { 55 noCompanyInfo = "bg-light"; 56 textLight = ""; 57 } 58 59 string noLogoBackground = ""; 60 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 61 { 62 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 63 } 64 65 <div class="e-productlist-item-image-container @noCompanyInfo mb-0" @noLogoBackground> 66 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@Model.Link"> 67 @{ 68 if ( string.IsNullOrEmpty( logoImage ) ) 69 { 70 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 71 } 72 else 73 { 74 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 75 } 76 } 77 78 </a> 79 </div> 80 } 81 </div> 82 <div> 83 <h4 class="mb-0 font-weight-extrabold line-clamp-1">@Model.Company.Name</h4> 84 <p class="small line-height-sm mb-0 mt-1 line-clamp-2"> 85 @profileText 86 </p> 87 </div> 88 </div> 89 </div> 90 <div class="item-condensed-booth"> 91 @if (booths != null) 92 { 93 if ( booths.Count() == 1) 94 { 95 BoothInfo booth = booths.FirstOrDefault(); 96 if ( booth.Hall != null && booth.Booth != null ) 97 { 98 <p class="small mb-0"> 99 <small>@Translate("MCH365 - Profile booth - Text", "Stand")</small> 100 </p> 101 <h4 class="mt-half mb-0 font-weight-extrabold mr-xl-2" style="white-space: nowrap"> 102 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number </span> 103 </h4> 104 } 105 } 106 else 107 { 108 <div class="align-items-baseline d-inline-flex flex-wrap justify-content-end justify-content-xl-start mb-1"> 109 <p class="small w-100 mb-0"> 110 <small>@Translate("MCH365 - Profile booths - Text", "Stande")</small> 111 </p> 112 @foreach ( BoothInfo booth in booths ) 113 { 114 if ( booth.Hall != null && booth.Booth != null ) 115 { 116 <h4 class="font-weight-extrabold mb-0 ml-1 ml-xl-0 mr-xl-1 mt-half text-muted" style="white-space: nowrap"> 117 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number</span> 118 </h4> 119 } 120 } 121 </div> 122 } 123 } 124 </div> 125 <div class="item-condensed-subasset"> 126 @if ( Model.SubAssetInfo.Count > 0 ) 127 { 128 <p class="mb-0 font-weight-bold"> 129 <small>@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</small> 130 </p> 131 <p class="small mb-0 mt-half font-weight-normal d-none d-md-block">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 132 } 133 </div> 134 <div class="item-condensed-contacts"> 135 @if ( contactPersons.Any() ) 136 { 137 <div class="mt-auto"> 138 <p class="d-block mb-0 text-right"> 139 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 140 </p> 141 </div> 142 } 143 </div> 144 <div class="item-condensed-options"> 145 @if ( !string.IsNullOrEmpty( companyEmail ) ) 146 { 147 <div class="d-flex small align-items-center justify-content-end mch365-custom-productlist-cta"> 148 @if ( companyDirectContact ) 149 { 150 <span class="mch365-custom-productlist-cta-icon"> 151 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )" alt="" role="presentation"/> 152 </span> 153 } 154 @if ( companyBookMeeting ) 155 { 156 <span class="mch365-custom-productlist-cta-icon"> 157 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )" alt="" role="presentation"/> 158 </span> 159 } 160 </div> 161 } 162 </div> 163 </div> 164 </div> 165 </div> 166 </div> 167 } 168 else 169 { 170 <div class="w-100 bg-ultralight border-radius my-1 e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 171 <div class="e-productlist-item-container container-fluid h-100"> 172 <div class="row h-100"> 173 <div class="col-9 col-lg-7 col-xl-8 p-1 p-lg-2 mch365-productlist-item-content-wrapper"> 174 <h3 class="mb-0 font-weight-extrabold">@Model.Company.Name</h3> 175176 @if (booths != null && booths.Any()) 177 { 178 <p class="mb-0 mt-0 text-primary font-weight-bold">@Translate( "MCH365 - Profile listItem ExhibitOnFestival - Text", "Vi deltager på" ) <!--$$MCH365.Current.TradeShowDetails.Name--></p> 179 } 180181182 <p class="small line-height-sm mb-2 mt-1 line-clamp-10"> 183 @profileText 184 </p> 185186187 @if ( Model.SubAssetInfo.Count > 0 ) 188 { 189 <span class="mch365-productlist-item-bulletin-wrapper mt-auto"> 190 <h4 class="mb-0">@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</h4> 191 <p class="small mb-0 mt-half font-weight-normal">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 192 </span> 193 } 194 </div> 195196 <div class="col-3 col-lg-5 col-xl-4 bg-light p-1 p-lg-2 mch365-productlist-item-sidebar-wrapper"> 197198 @if ( Model?.Company?.Logo != null ) 199 { 200 string logoImage = Model.Company.Logo; 201 string companyBackgroundColor = Model.Company.BrandColor; 202203 string noCompanyInfo = ""; 204 string textLight = "e-text-light"; 205206 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 207 { 208 noCompanyInfo = "bg-light"; 209 textLight = ""; 210 } 211212 string noLogoBackground = ""; 213 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 214 { 215 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 216 } 217218 <div class="e-productlist-item-image-container @noCompanyInfo" @noLogoBackground> 219 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@displayPageLink"> 220 @{ 221 if ( string.IsNullOrEmpty( logoImage ) ) 222 { 223 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 224 } 225 else 226 { 227 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 228 } 229 } 230231 </a> 232 </div> 233 } 234235 @if ( !string.IsNullOrEmpty( companyEmail ) ) 236 { 237 <div class="small flex-column mb-2"> 238 @if ( companyDirectContact ) 239 { 240 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 241 <span class="mch365-custom-productlist-cta-icon"> 242 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" alt="" role="presentation"/> 243 </span><span>@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )</span> 244 </span> 245 } 246 @if ( companyBookMeeting ) 247 { 248 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 249 <span class="mch365-custom-productlist-cta-icon"> 250 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" alt="" role="presentation"/> 251 </span><span>@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )</span> 252 </span> 253 } 254 </div> 255 } 256 @if ( contactPersons.Any() ) 257 { 258 <div class="mt-auto"> 259 <ul class="mch365-productlist-custom-contact-persons"> 260261 @foreach ( ContactPersonProduct contactPerson in contactPersons.OrderBy( cp => cp.Sort ).Take( 3 ) ) 262 { 263 string noImageClasses = ""; 264 string contactPersonImage = contactPerson.Image; 265 if ( string.IsNullOrEmpty( contactPersonImage ) ) 266 { 267 contactPersonImage = "/Files/Templates/Designs/mch365_admin/_assets/img/mch365-noimage.svg"; 268 noImageClasses = "bg-white"; 269 } 270271 <li class="animate animate-triggered fadeIn animate-show @noImageClasses" style="background-image: url('/admin/public/getimage.ashx?Image=@contactPersonImage&Width=100&Height=100&Format=webp&Quality=75&Crop=0');" title="@contactPerson.Name"></li> 272 } 273274 @if ( contactPersons.Count() > 3 ) 275 { 276 <li class="mch365-productlist-custom-contact-persons-add"> </li> 277 } 278279 </ul> 280 <p class="d-block mb-0 mt-1 small text-center"> 281 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 282 </p> 283 </div> 284 } 285 </div> 286 </div> 287 </div> 288 </div> 289 } 290
Error executing template "Designs/exhibition_site/QueryPublisher/partials/mch365-profile-item.cshtml" System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Co3.MCH.Website.Frontend.Services.MCH365.ProfileService.GetProfileSubAssetInfo(Profile profile) in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Services\MCH365\ProfileService.cs:line 104 at Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct.get_SubAssetInfo() in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Models\Frontend\Ecommerce\ProfileProduct.cs:line 55 at CompiledRazorTemplates.Dynamic.RazorEngine_db139817361046eb92da87d5f9d7fea3.Execute() in E:\Websites\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\QueryPublisher\partials\mch365-profile-item.cshtml:line 187 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()1 @using Co3.MCH.Data.Models.MCH365 2 @using Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce 3 @using Co3.MCH.Website.Frontend.Modules.MCH365 4 @using Co3.MCH.Website.Frontend.Services.Ecommerce 5 @using Dynamicweb.Frontend 6 @inherits Dynamicweb.Rendering.ViewModelTemplate< Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct > 7 8 @{ 9 bool hasPresentation = Model.HasPresentation; 10 bool companyBookMeeting = Model.Contact.BookMeeting; 11 bool companyDirectContact = Model.Contact.DirectContact; 12 string companyEmail = Model.Company.Email; 13 List< ContactPersonProduct > contactPersons; 14 15 string profileText; 16 17 if ( hasPresentation ) 18 { 19 contactPersons = Model.Presentation.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 20 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Presentation.Description, 650 ); 21 } 22 else 23 { 24 contactPersons = Model.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 25 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Company.Description, 650 ); 26 } 27 28 string displayPageId = PageView.Current().Area.Item[ "ProfileDisplayPage" ].ToString(); 29 string formatSyntax = string.IsNullOrEmpty( Model.VariantId ) ? "Default.aspx?ID={0}&ProductID={1}" : "Default.aspx?ID={0}&ProductID={1}&VariantID={2}"; 30 string rawUrl = string.IsNullOrEmpty( Model.VariantId ) ? string.Format( formatSyntax, displayPageId, Model.Id ) : string.Format( formatSyntax, displayPageId, Model.Id, Model.VariantId ); 31 string displayPageLink = SearchEngineFriendlyURLs.GetFriendlyUrl( rawUrl ); 32 string listViewMode = string.IsNullOrEmpty( Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString() ) ? "expanded" : Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString(); 33 IEnumerable<BoothInfo> booths = Model.Booths; 34 } 35 36 @if ( listViewMode == "condensed" ) 37 { 38 <div data-listViewMode="@listViewMode" class="w-100 bg-ultralight border-radius mt-half e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 39 <div class="e-productlist-item-container container-fluid h-100"> 40 <div class="row h-100"> 41 <div class="col-12 p-1 mch365-productlist-item-content-wrapper item-condensed flex-row"> 42 <div class="item-condensed-title"> 43 <div class="d-flex mr-3"> 44 <div class="condensed-list-logo mr-1"> 45 @if ( Model?.Company?.Logo != null ) 46 { 47 string logoImage = Model.Company.Logo; 48 string companyBackgroundColor = Model.Company.BrandColor; 49 50 string noCompanyInfo = ""; 51 string textLight = "e-text-light"; 52 53 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 54 { 55 noCompanyInfo = "bg-light"; 56 textLight = ""; 57 } 58 59 string noLogoBackground = ""; 60 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 61 { 62 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 63 } 64 65 <div class="e-productlist-item-image-container @noCompanyInfo mb-0" @noLogoBackground> 66 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@Model.Link"> 67 @{ 68 if ( string.IsNullOrEmpty( logoImage ) ) 69 { 70 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 71 } 72 else 73 { 74 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 75 } 76 } 77 78 </a> 79 </div> 80 } 81 </div> 82 <div> 83 <h4 class="mb-0 font-weight-extrabold line-clamp-1">@Model.Company.Name</h4> 84 <p class="small line-height-sm mb-0 mt-1 line-clamp-2"> 85 @profileText 86 </p> 87 </div> 88 </div> 89 </div> 90 <div class="item-condensed-booth"> 91 @if (booths != null) 92 { 93 if ( booths.Count() == 1) 94 { 95 BoothInfo booth = booths.FirstOrDefault(); 96 if ( booth.Hall != null && booth.Booth != null ) 97 { 98 <p class="small mb-0"> 99 <small>@Translate("MCH365 - Profile booth - Text", "Stand")</small> 100 </p> 101 <h4 class="mt-half mb-0 font-weight-extrabold mr-xl-2" style="white-space: nowrap"> 102 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number </span> 103 </h4> 104 } 105 } 106 else 107 { 108 <div class="align-items-baseline d-inline-flex flex-wrap justify-content-end justify-content-xl-start mb-1"> 109 <p class="small w-100 mb-0"> 110 <small>@Translate("MCH365 - Profile booths - Text", "Stande")</small> 111 </p> 112 @foreach ( BoothInfo booth in booths ) 113 { 114 if ( booth.Hall != null && booth.Booth != null ) 115 { 116 <h4 class="font-weight-extrabold mb-0 ml-1 ml-xl-0 mr-xl-1 mt-half text-muted" style="white-space: nowrap"> 117 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number</span> 118 </h4> 119 } 120 } 121 </div> 122 } 123 } 124 </div> 125 <div class="item-condensed-subasset"> 126 @if ( Model.SubAssetInfo.Count > 0 ) 127 { 128 <p class="mb-0 font-weight-bold"> 129 <small>@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</small> 130 </p> 131 <p class="small mb-0 mt-half font-weight-normal d-none d-md-block">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 132 } 133 </div> 134 <div class="item-condensed-contacts"> 135 @if ( contactPersons.Any() ) 136 { 137 <div class="mt-auto"> 138 <p class="d-block mb-0 text-right"> 139 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 140 </p> 141 </div> 142 } 143 </div> 144 <div class="item-condensed-options"> 145 @if ( !string.IsNullOrEmpty( companyEmail ) ) 146 { 147 <div class="d-flex small align-items-center justify-content-end mch365-custom-productlist-cta"> 148 @if ( companyDirectContact ) 149 { 150 <span class="mch365-custom-productlist-cta-icon"> 151 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )" alt="" role="presentation"/> 152 </span> 153 } 154 @if ( companyBookMeeting ) 155 { 156 <span class="mch365-custom-productlist-cta-icon"> 157 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )" alt="" role="presentation"/> 158 </span> 159 } 160 </div> 161 } 162 </div> 163 </div> 164 </div> 165 </div> 166 </div> 167 } 168 else 169 { 170 <div class="w-100 bg-ultralight border-radius my-1 e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 171 <div class="e-productlist-item-container container-fluid h-100"> 172 <div class="row h-100"> 173 <div class="col-9 col-lg-7 col-xl-8 p-1 p-lg-2 mch365-productlist-item-content-wrapper"> 174 <h3 class="mb-0 font-weight-extrabold">@Model.Company.Name</h3> 175176 @if (booths != null && booths.Any()) 177 { 178 <p class="mb-0 mt-0 text-primary font-weight-bold">@Translate( "MCH365 - Profile listItem ExhibitOnFestival - Text", "Vi deltager på" ) <!--$$MCH365.Current.TradeShowDetails.Name--></p> 179 } 180181182 <p class="small line-height-sm mb-2 mt-1 line-clamp-10"> 183 @profileText 184 </p> 185186187 @if ( Model.SubAssetInfo.Count > 0 ) 188 { 189 <span class="mch365-productlist-item-bulletin-wrapper mt-auto"> 190 <h4 class="mb-0">@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</h4> 191 <p class="small mb-0 mt-half font-weight-normal">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 192 </span> 193 } 194 </div> 195196 <div class="col-3 col-lg-5 col-xl-4 bg-light p-1 p-lg-2 mch365-productlist-item-sidebar-wrapper"> 197198 @if ( Model?.Company?.Logo != null ) 199 { 200 string logoImage = Model.Company.Logo; 201 string companyBackgroundColor = Model.Company.BrandColor; 202203 string noCompanyInfo = ""; 204 string textLight = "e-text-light"; 205206 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 207 { 208 noCompanyInfo = "bg-light"; 209 textLight = ""; 210 } 211212 string noLogoBackground = ""; 213 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 214 { 215 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 216 } 217218 <div class="e-productlist-item-image-container @noCompanyInfo" @noLogoBackground> 219 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@displayPageLink"> 220 @{ 221 if ( string.IsNullOrEmpty( logoImage ) ) 222 { 223 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 224 } 225 else 226 { 227 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 228 } 229 } 230231 </a> 232 </div> 233 } 234235 @if ( !string.IsNullOrEmpty( companyEmail ) ) 236 { 237 <div class="small flex-column mb-2"> 238 @if ( companyDirectContact ) 239 { 240 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 241 <span class="mch365-custom-productlist-cta-icon"> 242 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" alt="" role="presentation"/> 243 </span><span>@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )</span> 244 </span> 245 } 246 @if ( companyBookMeeting ) 247 { 248 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 249 <span class="mch365-custom-productlist-cta-icon"> 250 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" alt="" role="presentation"/> 251 </span><span>@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )</span> 252 </span> 253 } 254 </div> 255 } 256 @if ( contactPersons.Any() ) 257 { 258 <div class="mt-auto"> 259 <ul class="mch365-productlist-custom-contact-persons"> 260261 @foreach ( ContactPersonProduct contactPerson in contactPersons.OrderBy( cp => cp.Sort ).Take( 3 ) ) 262 { 263 string noImageClasses = ""; 264 string contactPersonImage = contactPerson.Image; 265 if ( string.IsNullOrEmpty( contactPersonImage ) ) 266 { 267 contactPersonImage = "/Files/Templates/Designs/mch365_admin/_assets/img/mch365-noimage.svg"; 268 noImageClasses = "bg-white"; 269 } 270271 <li class="animate animate-triggered fadeIn animate-show @noImageClasses" style="background-image: url('/admin/public/getimage.ashx?Image=@contactPersonImage&Width=100&Height=100&Format=webp&Quality=75&Crop=0');" title="@contactPerson.Name"></li> 272 } 273274 @if ( contactPersons.Count() > 3 ) 275 { 276 <li class="mch365-productlist-custom-contact-persons-add"> </li> 277 } 278279 </ul> 280 <p class="d-block mb-0 mt-1 small text-center"> 281 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 282 </p> 283 </div> 284 } 285 </div> 286 </div> 287 </div> 288 </div> 289 } 290
Error executing template "Designs/exhibition_site/QueryPublisher/partials/mch365-profile-item.cshtml" System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Co3.MCH.Website.Frontend.Services.MCH365.ProfileService.GetProfileSubAssetInfo(Profile profile) in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Services\MCH365\ProfileService.cs:line 104 at Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct.get_SubAssetInfo() in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Models\Frontend\Ecommerce\ProfileProduct.cs:line 55 at CompiledRazorTemplates.Dynamic.RazorEngine_db139817361046eb92da87d5f9d7fea3.Execute() in E:\Websites\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\QueryPublisher\partials\mch365-profile-item.cshtml:line 187 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()1 @using Co3.MCH.Data.Models.MCH365 2 @using Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce 3 @using Co3.MCH.Website.Frontend.Modules.MCH365 4 @using Co3.MCH.Website.Frontend.Services.Ecommerce 5 @using Dynamicweb.Frontend 6 @inherits Dynamicweb.Rendering.ViewModelTemplate< Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct > 7 8 @{ 9 bool hasPresentation = Model.HasPresentation; 10 bool companyBookMeeting = Model.Contact.BookMeeting; 11 bool companyDirectContact = Model.Contact.DirectContact; 12 string companyEmail = Model.Company.Email; 13 List< ContactPersonProduct > contactPersons; 14 15 string profileText; 16 17 if ( hasPresentation ) 18 { 19 contactPersons = Model.Presentation.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 20 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Presentation.Description, 650 ); 21 } 22 else 23 { 24 contactPersons = Model.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 25 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Company.Description, 650 ); 26 } 27 28 string displayPageId = PageView.Current().Area.Item[ "ProfileDisplayPage" ].ToString(); 29 string formatSyntax = string.IsNullOrEmpty( Model.VariantId ) ? "Default.aspx?ID={0}&ProductID={1}" : "Default.aspx?ID={0}&ProductID={1}&VariantID={2}"; 30 string rawUrl = string.IsNullOrEmpty( Model.VariantId ) ? string.Format( formatSyntax, displayPageId, Model.Id ) : string.Format( formatSyntax, displayPageId, Model.Id, Model.VariantId ); 31 string displayPageLink = SearchEngineFriendlyURLs.GetFriendlyUrl( rawUrl ); 32 string listViewMode = string.IsNullOrEmpty( Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString() ) ? "expanded" : Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString(); 33 IEnumerable<BoothInfo> booths = Model.Booths; 34 } 35 36 @if ( listViewMode == "condensed" ) 37 { 38 <div data-listViewMode="@listViewMode" class="w-100 bg-ultralight border-radius mt-half e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 39 <div class="e-productlist-item-container container-fluid h-100"> 40 <div class="row h-100"> 41 <div class="col-12 p-1 mch365-productlist-item-content-wrapper item-condensed flex-row"> 42 <div class="item-condensed-title"> 43 <div class="d-flex mr-3"> 44 <div class="condensed-list-logo mr-1"> 45 @if ( Model?.Company?.Logo != null ) 46 { 47 string logoImage = Model.Company.Logo; 48 string companyBackgroundColor = Model.Company.BrandColor; 49 50 string noCompanyInfo = ""; 51 string textLight = "e-text-light"; 52 53 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 54 { 55 noCompanyInfo = "bg-light"; 56 textLight = ""; 57 } 58 59 string noLogoBackground = ""; 60 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 61 { 62 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 63 } 64 65 <div class="e-productlist-item-image-container @noCompanyInfo mb-0" @noLogoBackground> 66 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@Model.Link"> 67 @{ 68 if ( string.IsNullOrEmpty( logoImage ) ) 69 { 70 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 71 } 72 else 73 { 74 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 75 } 76 } 77 78 </a> 79 </div> 80 } 81 </div> 82 <div> 83 <h4 class="mb-0 font-weight-extrabold line-clamp-1">@Model.Company.Name</h4> 84 <p class="small line-height-sm mb-0 mt-1 line-clamp-2"> 85 @profileText 86 </p> 87 </div> 88 </div> 89 </div> 90 <div class="item-condensed-booth"> 91 @if (booths != null) 92 { 93 if ( booths.Count() == 1) 94 { 95 BoothInfo booth = booths.FirstOrDefault(); 96 if ( booth.Hall != null && booth.Booth != null ) 97 { 98 <p class="small mb-0"> 99 <small>@Translate("MCH365 - Profile booth - Text", "Stand")</small> 100 </p> 101 <h4 class="mt-half mb-0 font-weight-extrabold mr-xl-2" style="white-space: nowrap"> 102 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number </span> 103 </h4> 104 } 105 } 106 else 107 { 108 <div class="align-items-baseline d-inline-flex flex-wrap justify-content-end justify-content-xl-start mb-1"> 109 <p class="small w-100 mb-0"> 110 <small>@Translate("MCH365 - Profile booths - Text", "Stande")</small> 111 </p> 112 @foreach ( BoothInfo booth in booths ) 113 { 114 if ( booth.Hall != null && booth.Booth != null ) 115 { 116 <h4 class="font-weight-extrabold mb-0 ml-1 ml-xl-0 mr-xl-1 mt-half text-muted" style="white-space: nowrap"> 117 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number</span> 118 </h4> 119 } 120 } 121 </div> 122 } 123 } 124 </div> 125 <div class="item-condensed-subasset"> 126 @if ( Model.SubAssetInfo.Count > 0 ) 127 { 128 <p class="mb-0 font-weight-bold"> 129 <small>@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</small> 130 </p> 131 <p class="small mb-0 mt-half font-weight-normal d-none d-md-block">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 132 } 133 </div> 134 <div class="item-condensed-contacts"> 135 @if ( contactPersons.Any() ) 136 { 137 <div class="mt-auto"> 138 <p class="d-block mb-0 text-right"> 139 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 140 </p> 141 </div> 142 } 143 </div> 144 <div class="item-condensed-options"> 145 @if ( !string.IsNullOrEmpty( companyEmail ) ) 146 { 147 <div class="d-flex small align-items-center justify-content-end mch365-custom-productlist-cta"> 148 @if ( companyDirectContact ) 149 { 150 <span class="mch365-custom-productlist-cta-icon"> 151 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )" alt="" role="presentation"/> 152 </span> 153 } 154 @if ( companyBookMeeting ) 155 { 156 <span class="mch365-custom-productlist-cta-icon"> 157 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )" alt="" role="presentation"/> 158 </span> 159 } 160 </div> 161 } 162 </div> 163 </div> 164 </div> 165 </div> 166 </div> 167 } 168 else 169 { 170 <div class="w-100 bg-ultralight border-radius my-1 e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 171 <div class="e-productlist-item-container container-fluid h-100"> 172 <div class="row h-100"> 173 <div class="col-9 col-lg-7 col-xl-8 p-1 p-lg-2 mch365-productlist-item-content-wrapper"> 174 <h3 class="mb-0 font-weight-extrabold">@Model.Company.Name</h3> 175176 @if (booths != null && booths.Any()) 177 { 178 <p class="mb-0 mt-0 text-primary font-weight-bold">@Translate( "MCH365 - Profile listItem ExhibitOnFestival - Text", "Vi deltager på" ) <!--$$MCH365.Current.TradeShowDetails.Name--></p> 179 } 180181182 <p class="small line-height-sm mb-2 mt-1 line-clamp-10"> 183 @profileText 184 </p> 185186187 @if ( Model.SubAssetInfo.Count > 0 ) 188 { 189 <span class="mch365-productlist-item-bulletin-wrapper mt-auto"> 190 <h4 class="mb-0">@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</h4> 191 <p class="small mb-0 mt-half font-weight-normal">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 192 </span> 193 } 194 </div> 195196 <div class="col-3 col-lg-5 col-xl-4 bg-light p-1 p-lg-2 mch365-productlist-item-sidebar-wrapper"> 197198 @if ( Model?.Company?.Logo != null ) 199 { 200 string logoImage = Model.Company.Logo; 201 string companyBackgroundColor = Model.Company.BrandColor; 202203 string noCompanyInfo = ""; 204 string textLight = "e-text-light"; 205206 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 207 { 208 noCompanyInfo = "bg-light"; 209 textLight = ""; 210 } 211212 string noLogoBackground = ""; 213 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 214 { 215 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 216 } 217218 <div class="e-productlist-item-image-container @noCompanyInfo" @noLogoBackground> 219 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@displayPageLink"> 220 @{ 221 if ( string.IsNullOrEmpty( logoImage ) ) 222 { 223 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 224 } 225 else 226 { 227 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 228 } 229 } 230231 </a> 232 </div> 233 } 234235 @if ( !string.IsNullOrEmpty( companyEmail ) ) 236 { 237 <div class="small flex-column mb-2"> 238 @if ( companyDirectContact ) 239 { 240 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 241 <span class="mch365-custom-productlist-cta-icon"> 242 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" alt="" role="presentation"/> 243 </span><span>@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )</span> 244 </span> 245 } 246 @if ( companyBookMeeting ) 247 { 248 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 249 <span class="mch365-custom-productlist-cta-icon"> 250 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" alt="" role="presentation"/> 251 </span><span>@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )</span> 252 </span> 253 } 254 </div> 255 } 256 @if ( contactPersons.Any() ) 257 { 258 <div class="mt-auto"> 259 <ul class="mch365-productlist-custom-contact-persons"> 260261 @foreach ( ContactPersonProduct contactPerson in contactPersons.OrderBy( cp => cp.Sort ).Take( 3 ) ) 262 { 263 string noImageClasses = ""; 264 string contactPersonImage = contactPerson.Image; 265 if ( string.IsNullOrEmpty( contactPersonImage ) ) 266 { 267 contactPersonImage = "/Files/Templates/Designs/mch365_admin/_assets/img/mch365-noimage.svg"; 268 noImageClasses = "bg-white"; 269 } 270271 <li class="animate animate-triggered fadeIn animate-show @noImageClasses" style="background-image: url('/admin/public/getimage.ashx?Image=@contactPersonImage&Width=100&Height=100&Format=webp&Quality=75&Crop=0');" title="@contactPerson.Name"></li> 272 } 273274 @if ( contactPersons.Count() > 3 ) 275 { 276 <li class="mch365-productlist-custom-contact-persons-add"> </li> 277 } 278279 </ul> 280 <p class="d-block mb-0 mt-1 small text-center"> 281 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 282 </p> 283 </div> 284 } 285 </div> 286 </div> 287 </div> 288 </div> 289 } 290
Error executing template "Designs/exhibition_site/QueryPublisher/partials/mch365-profile-item.cshtml" System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Co3.MCH.Website.Frontend.Services.MCH365.ProfileService.GetProfileSubAssetInfo(Profile profile) in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Services\MCH365\ProfileService.cs:line 104 at Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct.get_SubAssetInfo() in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Models\Frontend\Ecommerce\ProfileProduct.cs:line 55 at CompiledRazorTemplates.Dynamic.RazorEngine_db139817361046eb92da87d5f9d7fea3.Execute() in E:\Websites\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\QueryPublisher\partials\mch365-profile-item.cshtml:line 187 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()1 @using Co3.MCH.Data.Models.MCH365 2 @using Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce 3 @using Co3.MCH.Website.Frontend.Modules.MCH365 4 @using Co3.MCH.Website.Frontend.Services.Ecommerce 5 @using Dynamicweb.Frontend 6 @inherits Dynamicweb.Rendering.ViewModelTemplate< Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct > 7 8 @{ 9 bool hasPresentation = Model.HasPresentation; 10 bool companyBookMeeting = Model.Contact.BookMeeting; 11 bool companyDirectContact = Model.Contact.DirectContact; 12 string companyEmail = Model.Company.Email; 13 List< ContactPersonProduct > contactPersons; 14 15 string profileText; 16 17 if ( hasPresentation ) 18 { 19 contactPersons = Model.Presentation.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 20 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Presentation.Description, 650 ); 21 } 22 else 23 { 24 contactPersons = Model.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 25 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Company.Description, 650 ); 26 } 27 28 string displayPageId = PageView.Current().Area.Item[ "ProfileDisplayPage" ].ToString(); 29 string formatSyntax = string.IsNullOrEmpty( Model.VariantId ) ? "Default.aspx?ID={0}&ProductID={1}" : "Default.aspx?ID={0}&ProductID={1}&VariantID={2}"; 30 string rawUrl = string.IsNullOrEmpty( Model.VariantId ) ? string.Format( formatSyntax, displayPageId, Model.Id ) : string.Format( formatSyntax, displayPageId, Model.Id, Model.VariantId ); 31 string displayPageLink = SearchEngineFriendlyURLs.GetFriendlyUrl( rawUrl ); 32 string listViewMode = string.IsNullOrEmpty( Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString() ) ? "expanded" : Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString(); 33 IEnumerable<BoothInfo> booths = Model.Booths; 34 } 35 36 @if ( listViewMode == "condensed" ) 37 { 38 <div data-listViewMode="@listViewMode" class="w-100 bg-ultralight border-radius mt-half e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 39 <div class="e-productlist-item-container container-fluid h-100"> 40 <div class="row h-100"> 41 <div class="col-12 p-1 mch365-productlist-item-content-wrapper item-condensed flex-row"> 42 <div class="item-condensed-title"> 43 <div class="d-flex mr-3"> 44 <div class="condensed-list-logo mr-1"> 45 @if ( Model?.Company?.Logo != null ) 46 { 47 string logoImage = Model.Company.Logo; 48 string companyBackgroundColor = Model.Company.BrandColor; 49 50 string noCompanyInfo = ""; 51 string textLight = "e-text-light"; 52 53 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 54 { 55 noCompanyInfo = "bg-light"; 56 textLight = ""; 57 } 58 59 string noLogoBackground = ""; 60 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 61 { 62 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 63 } 64 65 <div class="e-productlist-item-image-container @noCompanyInfo mb-0" @noLogoBackground> 66 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@Model.Link"> 67 @{ 68 if ( string.IsNullOrEmpty( logoImage ) ) 69 { 70 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 71 } 72 else 73 { 74 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 75 } 76 } 77 78 </a> 79 </div> 80 } 81 </div> 82 <div> 83 <h4 class="mb-0 font-weight-extrabold line-clamp-1">@Model.Company.Name</h4> 84 <p class="small line-height-sm mb-0 mt-1 line-clamp-2"> 85 @profileText 86 </p> 87 </div> 88 </div> 89 </div> 90 <div class="item-condensed-booth"> 91 @if (booths != null) 92 { 93 if ( booths.Count() == 1) 94 { 95 BoothInfo booth = booths.FirstOrDefault(); 96 if ( booth.Hall != null && booth.Booth != null ) 97 { 98 <p class="small mb-0"> 99 <small>@Translate("MCH365 - Profile booth - Text", "Stand")</small> 100 </p> 101 <h4 class="mt-half mb-0 font-weight-extrabold mr-xl-2" style="white-space: nowrap"> 102 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number </span> 103 </h4> 104 } 105 } 106 else 107 { 108 <div class="align-items-baseline d-inline-flex flex-wrap justify-content-end justify-content-xl-start mb-1"> 109 <p class="small w-100 mb-0"> 110 <small>@Translate("MCH365 - Profile booths - Text", "Stande")</small> 111 </p> 112 @foreach ( BoothInfo booth in booths ) 113 { 114 if ( booth.Hall != null && booth.Booth != null ) 115 { 116 <h4 class="font-weight-extrabold mb-0 ml-1 ml-xl-0 mr-xl-1 mt-half text-muted" style="white-space: nowrap"> 117 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number</span> 118 </h4> 119 } 120 } 121 </div> 122 } 123 } 124 </div> 125 <div class="item-condensed-subasset"> 126 @if ( Model.SubAssetInfo.Count > 0 ) 127 { 128 <p class="mb-0 font-weight-bold"> 129 <small>@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</small> 130 </p> 131 <p class="small mb-0 mt-half font-weight-normal d-none d-md-block">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 132 } 133 </div> 134 <div class="item-condensed-contacts"> 135 @if ( contactPersons.Any() ) 136 { 137 <div class="mt-auto"> 138 <p class="d-block mb-0 text-right"> 139 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 140 </p> 141 </div> 142 } 143 </div> 144 <div class="item-condensed-options"> 145 @if ( !string.IsNullOrEmpty( companyEmail ) ) 146 { 147 <div class="d-flex small align-items-center justify-content-end mch365-custom-productlist-cta"> 148 @if ( companyDirectContact ) 149 { 150 <span class="mch365-custom-productlist-cta-icon"> 151 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )" alt="" role="presentation"/> 152 </span> 153 } 154 @if ( companyBookMeeting ) 155 { 156 <span class="mch365-custom-productlist-cta-icon"> 157 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )" alt="" role="presentation"/> 158 </span> 159 } 160 </div> 161 } 162 </div> 163 </div> 164 </div> 165 </div> 166 </div> 167 } 168 else 169 { 170 <div class="w-100 bg-ultralight border-radius my-1 e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 171 <div class="e-productlist-item-container container-fluid h-100"> 172 <div class="row h-100"> 173 <div class="col-9 col-lg-7 col-xl-8 p-1 p-lg-2 mch365-productlist-item-content-wrapper"> 174 <h3 class="mb-0 font-weight-extrabold">@Model.Company.Name</h3> 175176 @if (booths != null && booths.Any()) 177 { 178 <p class="mb-0 mt-0 text-primary font-weight-bold">@Translate( "MCH365 - Profile listItem ExhibitOnFestival - Text", "Vi deltager på" ) <!--$$MCH365.Current.TradeShowDetails.Name--></p> 179 } 180181182 <p class="small line-height-sm mb-2 mt-1 line-clamp-10"> 183 @profileText 184 </p> 185186187 @if ( Model.SubAssetInfo.Count > 0 ) 188 { 189 <span class="mch365-productlist-item-bulletin-wrapper mt-auto"> 190 <h4 class="mb-0">@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</h4> 191 <p class="small mb-0 mt-half font-weight-normal">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 192 </span> 193 } 194 </div> 195196 <div class="col-3 col-lg-5 col-xl-4 bg-light p-1 p-lg-2 mch365-productlist-item-sidebar-wrapper"> 197198 @if ( Model?.Company?.Logo != null ) 199 { 200 string logoImage = Model.Company.Logo; 201 string companyBackgroundColor = Model.Company.BrandColor; 202203 string noCompanyInfo = ""; 204 string textLight = "e-text-light"; 205206 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 207 { 208 noCompanyInfo = "bg-light"; 209 textLight = ""; 210 } 211212 string noLogoBackground = ""; 213 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 214 { 215 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 216 } 217218 <div class="e-productlist-item-image-container @noCompanyInfo" @noLogoBackground> 219 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@displayPageLink"> 220 @{ 221 if ( string.IsNullOrEmpty( logoImage ) ) 222 { 223 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 224 } 225 else 226 { 227 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 228 } 229 } 230231 </a> 232 </div> 233 } 234235 @if ( !string.IsNullOrEmpty( companyEmail ) ) 236 { 237 <div class="small flex-column mb-2"> 238 @if ( companyDirectContact ) 239 { 240 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 241 <span class="mch365-custom-productlist-cta-icon"> 242 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" alt="" role="presentation"/> 243 </span><span>@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )</span> 244 </span> 245 } 246 @if ( companyBookMeeting ) 247 { 248 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 249 <span class="mch365-custom-productlist-cta-icon"> 250 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" alt="" role="presentation"/> 251 </span><span>@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )</span> 252 </span> 253 } 254 </div> 255 } 256 @if ( contactPersons.Any() ) 257 { 258 <div class="mt-auto"> 259 <ul class="mch365-productlist-custom-contact-persons"> 260261 @foreach ( ContactPersonProduct contactPerson in contactPersons.OrderBy( cp => cp.Sort ).Take( 3 ) ) 262 { 263 string noImageClasses = ""; 264 string contactPersonImage = contactPerson.Image; 265 if ( string.IsNullOrEmpty( contactPersonImage ) ) 266 { 267 contactPersonImage = "/Files/Templates/Designs/mch365_admin/_assets/img/mch365-noimage.svg"; 268 noImageClasses = "bg-white"; 269 } 270271 <li class="animate animate-triggered fadeIn animate-show @noImageClasses" style="background-image: url('/admin/public/getimage.ashx?Image=@contactPersonImage&Width=100&Height=100&Format=webp&Quality=75&Crop=0');" title="@contactPerson.Name"></li> 272 } 273274 @if ( contactPersons.Count() > 3 ) 275 { 276 <li class="mch365-productlist-custom-contact-persons-add"> </li> 277 } 278279 </ul> 280 <p class="d-block mb-0 mt-1 small text-center"> 281 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 282 </p> 283 </div> 284 } 285 </div> 286 </div> 287 </div> 288 </div> 289 } 290
Error executing template "Designs/exhibition_site/QueryPublisher/partials/mch365-profile-item.cshtml" System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Co3.MCH.Website.Frontend.Services.MCH365.ProfileService.GetProfileSubAssetInfo(Profile profile) in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Services\MCH365\ProfileService.cs:line 104 at Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct.get_SubAssetInfo() in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Models\Frontend\Ecommerce\ProfileProduct.cs:line 55 at CompiledRazorTemplates.Dynamic.RazorEngine_db139817361046eb92da87d5f9d7fea3.Execute() in E:\Websites\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\QueryPublisher\partials\mch365-profile-item.cshtml:line 187 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()1 @using Co3.MCH.Data.Models.MCH365 2 @using Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce 3 @using Co3.MCH.Website.Frontend.Modules.MCH365 4 @using Co3.MCH.Website.Frontend.Services.Ecommerce 5 @using Dynamicweb.Frontend 6 @inherits Dynamicweb.Rendering.ViewModelTemplate< Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct > 7 8 @{ 9 bool hasPresentation = Model.HasPresentation; 10 bool companyBookMeeting = Model.Contact.BookMeeting; 11 bool companyDirectContact = Model.Contact.DirectContact; 12 string companyEmail = Model.Company.Email; 13 List< ContactPersonProduct > contactPersons; 14 15 string profileText; 16 17 if ( hasPresentation ) 18 { 19 contactPersons = Model.Presentation.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 20 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Presentation.Description, 650 ); 21 } 22 else 23 { 24 contactPersons = Model.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 25 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Company.Description, 650 ); 26 } 27 28 string displayPageId = PageView.Current().Area.Item[ "ProfileDisplayPage" ].ToString(); 29 string formatSyntax = string.IsNullOrEmpty( Model.VariantId ) ? "Default.aspx?ID={0}&ProductID={1}" : "Default.aspx?ID={0}&ProductID={1}&VariantID={2}"; 30 string rawUrl = string.IsNullOrEmpty( Model.VariantId ) ? string.Format( formatSyntax, displayPageId, Model.Id ) : string.Format( formatSyntax, displayPageId, Model.Id, Model.VariantId ); 31 string displayPageLink = SearchEngineFriendlyURLs.GetFriendlyUrl( rawUrl ); 32 string listViewMode = string.IsNullOrEmpty( Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString() ) ? "expanded" : Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString(); 33 IEnumerable<BoothInfo> booths = Model.Booths; 34 } 35 36 @if ( listViewMode == "condensed" ) 37 { 38 <div data-listViewMode="@listViewMode" class="w-100 bg-ultralight border-radius mt-half e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 39 <div class="e-productlist-item-container container-fluid h-100"> 40 <div class="row h-100"> 41 <div class="col-12 p-1 mch365-productlist-item-content-wrapper item-condensed flex-row"> 42 <div class="item-condensed-title"> 43 <div class="d-flex mr-3"> 44 <div class="condensed-list-logo mr-1"> 45 @if ( Model?.Company?.Logo != null ) 46 { 47 string logoImage = Model.Company.Logo; 48 string companyBackgroundColor = Model.Company.BrandColor; 49 50 string noCompanyInfo = ""; 51 string textLight = "e-text-light"; 52 53 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 54 { 55 noCompanyInfo = "bg-light"; 56 textLight = ""; 57 } 58 59 string noLogoBackground = ""; 60 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 61 { 62 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 63 } 64 65 <div class="e-productlist-item-image-container @noCompanyInfo mb-0" @noLogoBackground> 66 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@Model.Link"> 67 @{ 68 if ( string.IsNullOrEmpty( logoImage ) ) 69 { 70 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 71 } 72 else 73 { 74 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 75 } 76 } 77 78 </a> 79 </div> 80 } 81 </div> 82 <div> 83 <h4 class="mb-0 font-weight-extrabold line-clamp-1">@Model.Company.Name</h4> 84 <p class="small line-height-sm mb-0 mt-1 line-clamp-2"> 85 @profileText 86 </p> 87 </div> 88 </div> 89 </div> 90 <div class="item-condensed-booth"> 91 @if (booths != null) 92 { 93 if ( booths.Count() == 1) 94 { 95 BoothInfo booth = booths.FirstOrDefault(); 96 if ( booth.Hall != null && booth.Booth != null ) 97 { 98 <p class="small mb-0"> 99 <small>@Translate("MCH365 - Profile booth - Text", "Stand")</small> 100 </p> 101 <h4 class="mt-half mb-0 font-weight-extrabold mr-xl-2" style="white-space: nowrap"> 102 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number </span> 103 </h4> 104 } 105 } 106 else 107 { 108 <div class="align-items-baseline d-inline-flex flex-wrap justify-content-end justify-content-xl-start mb-1"> 109 <p class="small w-100 mb-0"> 110 <small>@Translate("MCH365 - Profile booths - Text", "Stande")</small> 111 </p> 112 @foreach ( BoothInfo booth in booths ) 113 { 114 if ( booth.Hall != null && booth.Booth != null ) 115 { 116 <h4 class="font-weight-extrabold mb-0 ml-1 ml-xl-0 mr-xl-1 mt-half text-muted" style="white-space: nowrap"> 117 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number</span> 118 </h4> 119 } 120 } 121 </div> 122 } 123 } 124 </div> 125 <div class="item-condensed-subasset"> 126 @if ( Model.SubAssetInfo.Count > 0 ) 127 { 128 <p class="mb-0 font-weight-bold"> 129 <small>@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</small> 130 </p> 131 <p class="small mb-0 mt-half font-weight-normal d-none d-md-block">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 132 } 133 </div> 134 <div class="item-condensed-contacts"> 135 @if ( contactPersons.Any() ) 136 { 137 <div class="mt-auto"> 138 <p class="d-block mb-0 text-right"> 139 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 140 </p> 141 </div> 142 } 143 </div> 144 <div class="item-condensed-options"> 145 @if ( !string.IsNullOrEmpty( companyEmail ) ) 146 { 147 <div class="d-flex small align-items-center justify-content-end mch365-custom-productlist-cta"> 148 @if ( companyDirectContact ) 149 { 150 <span class="mch365-custom-productlist-cta-icon"> 151 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )" alt="" role="presentation"/> 152 </span> 153 } 154 @if ( companyBookMeeting ) 155 { 156 <span class="mch365-custom-productlist-cta-icon"> 157 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )" alt="" role="presentation"/> 158 </span> 159 } 160 </div> 161 } 162 </div> 163 </div> 164 </div> 165 </div> 166 </div> 167 } 168 else 169 { 170 <div class="w-100 bg-ultralight border-radius my-1 e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 171 <div class="e-productlist-item-container container-fluid h-100"> 172 <div class="row h-100"> 173 <div class="col-9 col-lg-7 col-xl-8 p-1 p-lg-2 mch365-productlist-item-content-wrapper"> 174 <h3 class="mb-0 font-weight-extrabold">@Model.Company.Name</h3> 175176 @if (booths != null && booths.Any()) 177 { 178 <p class="mb-0 mt-0 text-primary font-weight-bold">@Translate( "MCH365 - Profile listItem ExhibitOnFestival - Text", "Vi deltager på" ) <!--$$MCH365.Current.TradeShowDetails.Name--></p> 179 } 180181182 <p class="small line-height-sm mb-2 mt-1 line-clamp-10"> 183 @profileText 184 </p> 185186187 @if ( Model.SubAssetInfo.Count > 0 ) 188 { 189 <span class="mch365-productlist-item-bulletin-wrapper mt-auto"> 190 <h4 class="mb-0">@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</h4> 191 <p class="small mb-0 mt-half font-weight-normal">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 192 </span> 193 } 194 </div> 195196 <div class="col-3 col-lg-5 col-xl-4 bg-light p-1 p-lg-2 mch365-productlist-item-sidebar-wrapper"> 197198 @if ( Model?.Company?.Logo != null ) 199 { 200 string logoImage = Model.Company.Logo; 201 string companyBackgroundColor = Model.Company.BrandColor; 202203 string noCompanyInfo = ""; 204 string textLight = "e-text-light"; 205206 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 207 { 208 noCompanyInfo = "bg-light"; 209 textLight = ""; 210 } 211212 string noLogoBackground = ""; 213 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 214 { 215 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 216 } 217218 <div class="e-productlist-item-image-container @noCompanyInfo" @noLogoBackground> 219 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@displayPageLink"> 220 @{ 221 if ( string.IsNullOrEmpty( logoImage ) ) 222 { 223 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 224 } 225 else 226 { 227 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 228 } 229 } 230231 </a> 232 </div> 233 } 234235 @if ( !string.IsNullOrEmpty( companyEmail ) ) 236 { 237 <div class="small flex-column mb-2"> 238 @if ( companyDirectContact ) 239 { 240 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 241 <span class="mch365-custom-productlist-cta-icon"> 242 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" alt="" role="presentation"/> 243 </span><span>@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )</span> 244 </span> 245 } 246 @if ( companyBookMeeting ) 247 { 248 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 249 <span class="mch365-custom-productlist-cta-icon"> 250 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" alt="" role="presentation"/> 251 </span><span>@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )</span> 252 </span> 253 } 254 </div> 255 } 256 @if ( contactPersons.Any() ) 257 { 258 <div class="mt-auto"> 259 <ul class="mch365-productlist-custom-contact-persons"> 260261 @foreach ( ContactPersonProduct contactPerson in contactPersons.OrderBy( cp => cp.Sort ).Take( 3 ) ) 262 { 263 string noImageClasses = ""; 264 string contactPersonImage = contactPerson.Image; 265 if ( string.IsNullOrEmpty( contactPersonImage ) ) 266 { 267 contactPersonImage = "/Files/Templates/Designs/mch365_admin/_assets/img/mch365-noimage.svg"; 268 noImageClasses = "bg-white"; 269 } 270271 <li class="animate animate-triggered fadeIn animate-show @noImageClasses" style="background-image: url('/admin/public/getimage.ashx?Image=@contactPersonImage&Width=100&Height=100&Format=webp&Quality=75&Crop=0');" title="@contactPerson.Name"></li> 272 } 273274 @if ( contactPersons.Count() > 3 ) 275 { 276 <li class="mch365-productlist-custom-contact-persons-add"> </li> 277 } 278279 </ul> 280 <p class="d-block mb-0 mt-1 small text-center"> 281 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 282 </p> 283 </div> 284 } 285 </div> 286 </div> 287 </div> 288 </div> 289 } 290
Error executing template "Designs/exhibition_site/QueryPublisher/partials/mch365-profile-item.cshtml" System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Co3.MCH.Website.Frontend.Services.MCH365.ProfileService.GetProfileSubAssetInfo(Profile profile) in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Services\MCH365\ProfileService.cs:line 104 at Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct.get_SubAssetInfo() in C:\Users\ThomasLarsen\source\repos\co3.mch\Co3.MCH.Website.Frontend\Models\Frontend\Ecommerce\ProfileProduct.cs:line 55 at CompiledRazorTemplates.Dynamic.RazorEngine_db139817361046eb92da87d5f9d7fea3.Execute() in E:\Websites\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\QueryPublisher\partials\mch365-profile-item.cshtml:line 187 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()1 @using Co3.MCH.Data.Models.MCH365 2 @using Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce 3 @using Co3.MCH.Website.Frontend.Modules.MCH365 4 @using Co3.MCH.Website.Frontend.Services.Ecommerce 5 @using Dynamicweb.Frontend 6 @inherits Dynamicweb.Rendering.ViewModelTemplate< Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct > 7 8 @{ 9 bool hasPresentation = Model.HasPresentation; 10 bool companyBookMeeting = Model.Contact.BookMeeting; 11 bool companyDirectContact = Model.Contact.DirectContact; 12 string companyEmail = Model.Company.Email; 13 List< ContactPersonProduct > contactPersons; 14 15 string profileText; 16 17 if ( hasPresentation ) 18 { 19 contactPersons = Model.Presentation.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 20 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Presentation.Description, 650 ); 21 } 22 else 23 { 24 contactPersons = Model.ContactPersons.Products.Select( p => ( ContactPersonProduct )p ).ToList(); 25 profileText = ProductService.Instance.GetTruncatedFormattedString( Model.Company.Description, 650 ); 26 } 27 28 string displayPageId = PageView.Current().Area.Item[ "ProfileDisplayPage" ].ToString(); 29 string formatSyntax = string.IsNullOrEmpty( Model.VariantId ) ? "Default.aspx?ID={0}&ProductID={1}" : "Default.aspx?ID={0}&ProductID={1}&VariantID={2}"; 30 string rawUrl = string.IsNullOrEmpty( Model.VariantId ) ? string.Format( formatSyntax, displayPageId, Model.Id ) : string.Format( formatSyntax, displayPageId, Model.Id, Model.VariantId ); 31 string displayPageLink = SearchEngineFriendlyURLs.GetFriendlyUrl( rawUrl ); 32 string listViewMode = string.IsNullOrEmpty( Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString() ) ? "expanded" : Dynamicweb.Context.Current.Session[ "ListViewMode" ]?.ToString(); 33 IEnumerable<BoothInfo> booths = Model.Booths; 34 } 35 36 @if ( listViewMode == "condensed" ) 37 { 38 <div data-listViewMode="@listViewMode" class="w-100 bg-ultralight border-radius mt-half e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 39 <div class="e-productlist-item-container container-fluid h-100"> 40 <div class="row h-100"> 41 <div class="col-12 p-1 mch365-productlist-item-content-wrapper item-condensed flex-row"> 42 <div class="item-condensed-title"> 43 <div class="d-flex mr-3"> 44 <div class="condensed-list-logo mr-1"> 45 @if ( Model?.Company?.Logo != null ) 46 { 47 string logoImage = Model.Company.Logo; 48 string companyBackgroundColor = Model.Company.BrandColor; 49 50 string noCompanyInfo = ""; 51 string textLight = "e-text-light"; 52 53 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 54 { 55 noCompanyInfo = "bg-light"; 56 textLight = ""; 57 } 58 59 string noLogoBackground = ""; 60 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 61 { 62 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 63 } 64 65 <div class="e-productlist-item-image-container @noCompanyInfo mb-0" @noLogoBackground> 66 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@Model.Link"> 67 @{ 68 if ( string.IsNullOrEmpty( logoImage ) ) 69 { 70 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 71 } 72 else 73 { 74 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 75 } 76 } 77 78 </a> 79 </div> 80 } 81 </div> 82 <div> 83 <h4 class="mb-0 font-weight-extrabold line-clamp-1">@Model.Company.Name</h4> 84 <p class="small line-height-sm mb-0 mt-1 line-clamp-2"> 85 @profileText 86 </p> 87 </div> 88 </div> 89 </div> 90 <div class="item-condensed-booth"> 91 @if (booths != null) 92 { 93 if ( booths.Count() == 1) 94 { 95 BoothInfo booth = booths.FirstOrDefault(); 96 if ( booth.Hall != null && booth.Booth != null ) 97 { 98 <p class="small mb-0"> 99 <small>@Translate("MCH365 - Profile booth - Text", "Stand")</small> 100 </p> 101 <h4 class="mt-half mb-0 font-weight-extrabold mr-xl-2" style="white-space: nowrap"> 102 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number </span> 103 </h4> 104 } 105 } 106 else 107 { 108 <div class="align-items-baseline d-inline-flex flex-wrap justify-content-end justify-content-xl-start mb-1"> 109 <p class="small w-100 mb-0"> 110 <small>@Translate("MCH365 - Profile booths - Text", "Stande")</small> 111 </p> 112 @foreach ( BoothInfo booth in booths ) 113 { 114 if ( booth.Hall != null && booth.Booth != null ) 115 { 116 <h4 class="font-weight-extrabold mb-0 ml-1 ml-xl-0 mr-xl-1 mt-half text-muted" style="white-space: nowrap"> 117 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number</span> 118 </h4> 119 } 120 } 121 </div> 122 } 123 } 124 </div> 125 <div class="item-condensed-subasset"> 126 @if ( Model.SubAssetInfo.Count > 0 ) 127 { 128 <p class="mb-0 font-weight-bold"> 129 <small>@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</small> 130 </p> 131 <p class="small mb-0 mt-half font-weight-normal d-none d-md-block">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 132 } 133 </div> 134 <div class="item-condensed-contacts"> 135 @if ( contactPersons.Any() ) 136 { 137 <div class="mt-auto"> 138 <p class="d-block mb-0 text-right"> 139 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 140 </p> 141 </div> 142 } 143 </div> 144 <div class="item-condensed-options"> 145 @if ( !string.IsNullOrEmpty( companyEmail ) ) 146 { 147 <div class="d-flex small align-items-center justify-content-end mch365-custom-productlist-cta"> 148 @if ( companyDirectContact ) 149 { 150 <span class="mch365-custom-productlist-cta-icon"> 151 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )" alt="" role="presentation"/> 152 </span> 153 } 154 @if ( companyBookMeeting ) 155 { 156 <span class="mch365-custom-productlist-cta-icon"> 157 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" title="@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )" alt="" role="presentation"/> 158 </span> 159 } 160 </div> 161 } 162 </div> 163 </div> 164 </div> 165 </div> 166 </div> 167 } 168 else 169 { 170 <div class="w-100 bg-ultralight border-radius my-1 e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item-@Model.Id" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 171 <div class="e-productlist-item-container container-fluid h-100"> 172 <div class="row h-100"> 173 <div class="col-9 col-lg-7 col-xl-8 p-1 p-lg-2 mch365-productlist-item-content-wrapper"> 174 <h3 class="mb-0 font-weight-extrabold">@Model.Company.Name</h3> 175176 @if (booths != null && booths.Any()) 177 { 178 <p class="mb-0 mt-0 text-primary font-weight-bold">@Translate( "MCH365 - Profile listItem ExhibitOnFestival - Text", "Vi deltager på" ) <!--$$MCH365.Current.TradeShowDetails.Name--></p> 179 } 180181182 <p class="small line-height-sm mb-2 mt-1 line-clamp-10"> 183 @profileText 184 </p> 185186187 @if ( Model.SubAssetInfo.Count > 0 ) 188 { 189 <span class="mch365-productlist-item-bulletin-wrapper mt-auto"> 190 <h4 class="mb-0">@Model.SubAssetInfo.Count @Translate( "MCH365 - Profile listItem SubAssetInfo - Text", "opslag" )</h4> 191 <p class="small mb-0 mt-half font-weight-normal">@Translate( "MCH365 - Profile listItem latestUpdate - Text", "seneste fra" ) @Model.SubAssetInfo.LatestDate.ToString( "d. MMMM yyyy" )</p> 192 </span> 193 } 194 </div> 195196 <div class="col-3 col-lg-5 col-xl-4 bg-light p-1 p-lg-2 mch365-productlist-item-sidebar-wrapper"> 197198 @if ( Model?.Company?.Logo != null ) 199 { 200 string logoImage = Model.Company.Logo; 201 string companyBackgroundColor = Model.Company.BrandColor; 202203 string noCompanyInfo = ""; 204 string textLight = "e-text-light"; 205206 if ( string.IsNullOrEmpty( logoImage ) && string.IsNullOrEmpty( companyBackgroundColor ) ) 207 { 208 noCompanyInfo = "bg-light"; 209 textLight = ""; 210 } 211212 string noLogoBackground = ""; 213 if ( string.IsNullOrEmpty( logoImage ) && !string.IsNullOrEmpty( companyBackgroundColor ) ) 214 { 215 noLogoBackground = "style=\"background:" + companyBackgroundColor + ";\""; 216 } 217218 <div class="e-productlist-item-image-container @noCompanyInfo" @noLogoBackground> 219 <a class="e-productlist-item-image-wrapper justify-content-center align-items-center d-flex @textLight" href="@displayPageLink"> 220 @{ 221 if ( string.IsNullOrEmpty( logoImage ) ) 222 { 223 <span class="h1 mb-0">@Model.Company.Name.Substring( 0, 1 ).ToLower()</span> 224 } 225 else 226 { 227 <img alt="@Model.Company.Name" class="e-productlist-item-image w-100 p-1" src="@logoImage"/> 228 } 229 } 230231 </a> 232 </div> 233 } 234235 @if ( !string.IsNullOrEmpty( companyEmail ) ) 236 { 237 <div class="small flex-column mb-2"> 238 @if ( companyDirectContact ) 239 { 240 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 241 <span class="mch365-custom-productlist-cta-icon"> 242 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-email-action-edit@48x48.svg" alt="" role="presentation"/> 243 </span><span>@Translate( "MCH365 - Profile listItem contactDirect - Text", "Direkte kontakt" )</span> 244 </span> 245 } 246 @if ( companyBookMeeting ) 247 { 248 <span class="d-flex small font-weight-normal mb-1 align-items-center text-center mch365-custom-productlist-cta"> 249 <span class="mch365-custom-productlist-cta-icon"> 250 <img src="/Files/Templates/Designs/exhibition_site/_assets/img/streamline/streamline-icon-calendar-edit@48x48.svg" alt="" role="presentation"/> 251 </span><span>@Translate( "MCH365 - Profile listItem bookMeeting - Text", "Møde­booking" )</span> 252 </span> 253 } 254 </div> 255 } 256 @if ( contactPersons.Any() ) 257 { 258 <div class="mt-auto"> 259 <ul class="mch365-productlist-custom-contact-persons"> 260261 @foreach ( ContactPersonProduct contactPerson in contactPersons.OrderBy( cp => cp.Sort ).Take( 3 ) ) 262 { 263 string noImageClasses = ""; 264 string contactPersonImage = contactPerson.Image; 265 if ( string.IsNullOrEmpty( contactPersonImage ) ) 266 { 267 contactPersonImage = "/Files/Templates/Designs/mch365_admin/_assets/img/mch365-noimage.svg"; 268 noImageClasses = "bg-white"; 269 } 270271 <li class="animate animate-triggered fadeIn animate-show @noImageClasses" style="background-image: url('/admin/public/getimage.ashx?Image=@contactPersonImage&Width=100&Height=100&Format=webp&Quality=75&Crop=0');" title="@contactPerson.Name"></li> 272 } 273274 @if ( contactPersons.Count() > 3 ) 275 { 276 <li class="mch365-productlist-custom-contact-persons-add"> </li> 277 } 278279 </ul> 280 <p class="d-block mb-0 mt-1 small text-center"> 281 <small>@contactPersons.Count() @Translate( "MCH365 - Profile listItem contactPersons - Text", "kontakt­personer" )</small> 282 </p> 283 </div> 284 } 285 </div> 286 </div> 287 </div> 288 </div> 289 } 290