Error executing template "Designs/Rapido/_parsed/NZNewsArticle.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_6f9a52ebe5d54eaead06d4ea06423a88.<RenderLanguageSelector>b__37_0(TextWriter __razor_helper_writer) in E:\Solutions\Dynamicweb\S_DW_Enkotec_Rapido\Files\Templates\Designs\Rapido\_parsed\NZNewsArticle.parsed.cshtml:line 1612
at RazorEngine.Templating.TemplateWriter.ToString()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at CompiledRazorTemplates.Dynamic.RazorEngine_6f9a52ebe5d54eaead06d4ea06423a88.<>c__DisplayClass3_0.<RenderBlock>b__0(TextWriter __razor_helper_writer) in E:\Solutions\Dynamicweb\S_DW_Enkotec_Rapido\Files\Templates\Designs\Rapido\_parsed\NZNewsArticle.parsed.cshtml:line 220
at CompiledRazorTemplates.Dynamic.RazorEngine_6f9a52ebe5d54eaead06d4ea06423a88.<>c__DisplayClass2_0.<RenderBlockList>b__0(TextWriter __razor_helper_writer) in E:\Solutions\Dynamicweb\S_DW_Enkotec_Rapido\Files\Templates\Designs\Rapido\_parsed\NZNewsArticle.parsed.cshtml:line 186
at CompiledRazorTemplates.Dynamic.RazorEngine_6f9a52ebe5d54eaead06d4ea06423a88.<RenderDesktopActionsMenu>b__36_0(TextWriter __razor_helper_writer) in E:\Solutions\Dynamicweb\S_DW_Enkotec_Rapido\Files\Templates\Designs\Rapido\_parsed\NZNewsArticle.parsed.cshtml:line 1602
at RazorEngine.Templating.TemplateWriter.ToString()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at CompiledRazorTemplates.Dynamic.RazorEngine_6f9a52ebe5d54eaead06d4ea06423a88.<>c__DisplayClass3_0.<RenderBlock>b__0(TextWriter __razor_helper_writer) in E:\Solutions\Dynamicweb\S_DW_Enkotec_Rapido\Files\Templates\Designs\Rapido\_parsed\NZNewsArticle.parsed.cshtml:line 220
at CompiledRazorTemplates.Dynamic.RazorEngine_6f9a52ebe5d54eaead06d4ea06423a88.<>c__DisplayClass2_0.<RenderBlockList>b__0(TextWriter __razor_helper_writer) in E:\Solutions\Dynamicweb\S_DW_Enkotec_Rapido\Files\Templates\Designs\Rapido\_parsed\NZNewsArticle.parsed.cshtml:line 186
at CompiledRazorTemplates.Dynamic.RazorEngine_6f9a52ebe5d54eaead06d4ea06423a88.<>c__DisplayClass3_0.<RenderBlock>b__0(TextWriter __razor_helper_writer) in E:\Solutions\Dynamicweb\S_DW_Enkotec_Rapido\Files\Templates\Designs\Rapido\_parsed\NZNewsArticle.parsed.cshtml:line 227
at CompiledRazorTemplates.Dynamic.RazorEngine_6f9a52ebe5d54eaead06d4ea06423a88.<>c__DisplayClass2_0.<RenderBlockList>b__0(TextWriter __razor_helper_writer) in E:\Solutions\Dynamicweb\S_DW_Enkotec_Rapido\Files\Templates\Designs\Rapido\_parsed\NZNewsArticle.parsed.cshtml:line 204
at CompiledRazorTemplates.Dynamic.RazorEngine_6f9a52ebe5d54eaead06d4ea06423a88.<RenderDesktopNavigation>b__32_0(TextWriter __razor_helper_writer) in E:\Solutions\Dynamicweb\S_DW_Enkotec_Rapido\Files\Templates\Designs\Rapido\_parsed\NZNewsArticle.parsed.cshtml:line 1501
at RazorEngine.Templating.TemplateWriter.ToString()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at CompiledRazorTemplates.Dynamic.RazorEngine_6f9a52ebe5d54eaead06d4ea06423a88.<>c__DisplayClass3_0.<RenderBlock>b__0(TextWriter __razor_helper_writer) in E:\Solutions\Dynamicweb\S_DW_Enkotec_Rapido\Files\Templates\Designs\Rapido\_parsed\NZNewsArticle.parsed.cshtml:line 220
at CompiledRazorTemplates.Dynamic.RazorEngine_6f9a52ebe5d54eaead06d4ea06423a88.<>c__DisplayClass2_0.<RenderBlockList>b__0(TextWriter __razor_helper_writer) in E:\Solutions\Dynamicweb\S_DW_Enkotec_Rapido\Files\Templates\Designs\Rapido\_parsed\NZNewsArticle.parsed.cshtml:line 186
at CompiledRazorTemplates.Dynamic.RazorEngine_6f9a52ebe5d54eaead06d4ea06423a88.<RenderMasterHeader>b__62_0(TextWriter __razor_helper_writer) in E:\Solutions\Dynamicweb\S_DW_Enkotec_Rapido\Files\Templates\Designs\Rapido\_parsed\NZNewsArticle.parsed.cshtml:line 3254
at RazorEngine.Templating.TemplateWriter.ToString()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at CompiledRazorTemplates.Dynamic.RazorEngine_6f9a52ebe5d54eaead06d4ea06423a88.<>c__DisplayClass3_0.<RenderBlock>b__0(TextWriter __razor_helper_writer) in E:\Solutions\Dynamicweb\S_DW_Enkotec_Rapido\Files\Templates\Designs\Rapido\_parsed\NZNewsArticle.parsed.cshtml:line 220
at CompiledRazorTemplates.Dynamic.RazorEngine_6f9a52ebe5d54eaead06d4ea06423a88.<>c__DisplayClass2_0.<RenderBlockList>b__0(TextWriter __razor_helper_writer) in E:\Solutions\Dynamicweb\S_DW_Enkotec_Rapido\Files\Templates\Designs\Rapido\_parsed\NZNewsArticle.parsed.cshtml:line 186
at CompiledRazorTemplates.Dynamic.RazorEngine_6f9a52ebe5d54eaead06d4ea06423a88.<RenderMain>b__63_0(TextWriter __razor_helper_writer) in E:\Solutions\Dynamicweb\S_DW_Enkotec_Rapido\Files\Templates\Designs\Rapido\_parsed\NZNewsArticle.parsed.cshtml:line 3263
at RazorEngine.Templating.TemplateWriter.ToString()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at CompiledRazorTemplates.Dynamic.RazorEngine_6f9a52ebe5d54eaead06d4ea06423a88.<>c__DisplayClass3_0.<RenderBlock>b__0(TextWriter __razor_helper_writer) in E:\Solutions\Dynamicweb\S_DW_Enkotec_Rapido\Files\Templates\Designs\Rapido\_parsed\NZNewsArticle.parsed.cshtml:line 220
at CompiledRazorTemplates.Dynamic.RazorEngine_6f9a52ebe5d54eaead06d4ea06423a88.<>c__DisplayClass2_0.<RenderBlockList>b__0(TextWriter __razor_helper_writer) in E:\Solutions\Dynamicweb\S_DW_Enkotec_Rapido\Files\Templates\Designs\Rapido\_parsed\NZNewsArticle.parsed.cshtml:line 186
at CompiledRazorTemplates.Dynamic.RazorEngine_6f9a52ebe5d54eaead06d4ea06423a88.<>c__DisplayClass3_0.<RenderBlock>b__0(TextWriter __razor_helper_writer) in E:\Solutions\Dynamicweb\S_DW_Enkotec_Rapido\Files\Templates\Designs\Rapido\_parsed\NZNewsArticle.parsed.cshtml:line 227
at CompiledRazorTemplates.Dynamic.RazorEngine_6f9a52ebe5d54eaead06d4ea06423a88.<>c__DisplayClass2_0.<RenderBlockList>b__0(TextWriter __razor_helper_writer) in E:\Solutions\Dynamicweb\S_DW_Enkotec_Rapido\Files\Templates\Designs\Rapido\_parsed\NZNewsArticle.parsed.cshtml:line 186
at CompiledRazorTemplates.Dynamic.RazorEngine_6f9a52ebe5d54eaead06d4ea06423a88.Execute() in E:\Solutions\Dynamicweb\S_DW_Enkotec_Rapido\Files\Templates\Designs\Rapido\_parsed\NZNewsArticle.parsed.cshtml:line 3244
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 2 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 3 4 @* Rapido version 3.0 *@ 5 6 @using System.Web; 7 @using Dynamicweb.Frontend 8 @using Dynamicweb.Frontend.Devices 9 @using Dynamicweb.Extensibility 10 @using Dynamicweb.Content 11 @using Dynamicweb.Security 12 @using Dynamicweb.Core 13 @using System 14 @using System.Web 15 @using System.IO 16 @using Dynamicweb.Rapido.Blocks 17 18 @{ 19 string assetsVersion = Model.Area.Item.GetItem("Custom").GetString("AssetsVersion"); 20 } 21 22 23 @functions { 24 BlocksPage masterPage = BlocksPage.GetBlockPage("Master"); 25 26 string getFontFamily(params string[] items) 27 { 28 var itemParent = Pageview.AreaSettings; 29 foreach (var item in items) 30 { 31 itemParent = itemParent.GetItem(item); 32 if (itemParent == null) 33 { 34 return null; 35 } 36 } 37 38 var googleFont = itemParent.GetGoogleFont("FontFamily"); 39 if (googleFont == null) 40 { 41 return null; 42 } 43 return googleFont.Family.Replace(" ", "+"); 44 } 45 } 46 @{ 47 //Font settings 48 var fonts = new string[] { 49 getFontFamily("Layout", "HeaderFont"), 50 getFontFamily("Layout", "SubheaderFont"), 51 getFontFamily("Layout", "TertiaryHeaderFont"), 52 getFontFamily("Layout", "Header", "ToolsFont"), 53 getFontFamily("Layout", "Header", "NavigationFont"), 54 getFontFamily("Layout", "MobileNavigation", "Font"), 55 getFontFamily("ProductList", "Facets", "HeaderFont"), 56 getFontFamily("ProductPage", "PriceFontDesign"), 57 getFontFamily("Ecommerce", "SaleSticker", "Font"), 58 getFontFamily("Ecommerce", "NewSticker", "Font"), 59 getFontFamily("Ecommerce", "CustomSticker", "Font") 60 }; 61 62 string autoCssLink = "/Files/Templates/Designs/Rapido/css/rapido/rapido_" + Model.Area.ID.ToString() + ".min.css?ticks=" + Model.Area.UpdatedDate.Ticks; 63 64 string favicon = Model.Area.Item.GetItem("Layout").GetFile("LogoFavicon") != null ? Model.Area.Item.GetItem("Layout").GetFile("LogoFavicon").Path : "/Files/Images/favicon.png"; 65 66 string siteURL = Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host; 67 68 string canonical = Pageview.SearchFriendlyUrl.ToString(); 69 70 71 72 if (siteURL.Contains("nozebrahosting") || siteURL.Contains("dynamicweb")) 73 { 74 canonical = Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host + Pageview.SearchFriendlyUrl.ToString(); 75 } 76 77 // Remove query in canonical 78 int index = canonical.IndexOf("?"); 79 if (index > 0) 80 { 81 canonical = canonical.Substring(0, index); 82 } 83 84 var userAgent = HttpContext.Current.Request.UserAgent.ToString(); 85 var ie9String = userAgent.Contains("Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"); 86 var ie10String = userAgent.Contains("Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)"); 87 var ie11String = userAgent.Contains("Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko"); 88 var firefoxNewest = userAgent.Contains("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/66.0"); 89 var firefoxSecondV = userAgent.Contains("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0"); 90 var firefoxThirdV = userAgent.Contains("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/64.0"); 91 92 string businessPhotoPath = Model.Area.Item.GetItem("Settings").GetFile("BusinessPhoto") != null ? Model.Area.Item.GetItem("Settings").GetFile("BusinessPhoto").Path : ""; 93 string businessName = Model.Area.Item.GetItem("Settings").GetString("BusinessName"); 94 var address = Model.Area.Item.GetItem("Settings").GetItem("Address"); 95 string streetAddress = ""; 96 string addressLocality = ""; 97 string addressRegion = ""; 98 string postalCode = ""; 99 string addressCountry = ""; 100101 if (address != null) 102 { 103 streetAddress = address.GetString("StreetAddress"); 104 addressLocality = address.GetString("City"); 105 addressRegion = address.GetString("Region"); 106 postalCode = address.GetString("PostalCode"); 107 addressCountry = address.GetString("Country"); 108 } 109 string contactEmail = Model.Area.Item.GetItem("Settings").GetString("ContactEmail"); 110 string contactNumber = Model.Area.Item.GetItem("Settings").GetString("ContactNumber"); 111112 try 113 { 114 NoZebra.DW.ItpCookies.ViewHandler.SetCookies(); 115 } 116 catch (Exception ex) 117 { 118 //log exception here 119 } 120 } 121122 @{ 123 Block master = new Block() 124 { 125 Id = "Master", 126 BlocksList = new List<Block> { 127 new Block { 128 Id = "MasterTopSnippets", 129 SortId = 10 130 }, 131 new Block { 132 Id = "MasterMain", 133 SortId = 20, 134 Template = RenderMain(), 135 SkipRenderBlocksList = true, 136 BlocksList = new List<Block> { 137 new Block 138 { 139 Id = "MasterHeader", 140 SortId = 10, 141 Template = RenderMasterHeader(), 142 SkipRenderBlocksList = true 143 }, 144 new Block { 145 Id = "MasterPageContent", 146 SortId = 20, 147 Template = RenderPageContent() 148 } 149 } 150 }, 151 new Block { 152 Id = "MasterFooter", 153 SortId = 30 154 }, 155 new Block { 156 Id = "MasterReferences", 157 SortId = 40 158 }, 159 new Block { 160 Id = "MasterBottomSnippets", 161 SortId = 50 162 } 163 } 164 }; 165 masterPage.Add(master); 166 } 167168 @* Include the required Grid builder (Contains the methods @RenderBlockList and @RenderBlock) *@ 169 @using System.Text.RegularExpressions 170 @using System.Collections.Generic 171 @using Dynamicweb.Rapido.Blocks 172173174 @*--- START: Base block renderers ---*@ 175176 @helper RenderBlockList(List<Block> blocks) 177 { 178 blocks = blocks.OrderBy(item => item.SortId).ToList(); 179180 foreach (Block item in blocks) 181 { 182 <!-- START: @item.Id --> 183184 if (item.Design == null) 185 { 186 @RenderBlock(item) 187 } 188 else if (item.Design.RenderType != RenderType.Hide) 189 { 190 if (item.Design.RenderType == RenderType.Row) 191 { 192 <div class="grid grid--align-content-start"> 193 @RenderBlock(item) 194 </div> 195 } 196197 if (item.Design.RenderType == RenderType.Column) 198 { 199 string hidePadding = item.Design.HidePadding ? "u-no-padding" : ""; 200 string size = item.Design.Size != null ? item.Design.Size : "12"; 201 size = Regex.IsMatch(size, @"\d") ? "md-" + item.Design.Size : item.Design.Size; 202203 <div class="grid__col-lg-@item.Design.Size grid__col-md-@item.Design.Size grid__col-sm-12 grid__col-xs-12 @hidePadding" id="Block__@item.Id"> 204 @RenderBlock(item) 205 </div> 206 } 207208 if (item.SkipRenderBlocksList == true) 209 { 210 @RenderBlock(item) 211 } 212 } 213214 <!-- END: @item.Id --> 215 } 216 } 217218 @helper RenderBlock(Block item) 219 { 220 if (item.Template != null) 221 { 222 @BlocksPage.RenderTemplate(item.Template) 223 } 224225 if (item.BlocksList.Count > 0 && item.SkipRenderBlocksList == false) 226 { 227 @RenderBlockList(item.BlocksList) 228 } 229 } 230231 @*--- END: Base block renderers ---*@ 232233234 @* Include the Blocks for the page *@ 235 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 236237 @using System 238 @using System.Web 239 @using System.Collections.Generic 240 @using Dynamicweb.Rapido.Blocks.Extensibility 241 @using Dynamicweb.Rapido.Blocks 242243 @{ 244 BlocksPage topSnippetsBlocksPage = BlocksPage.GetBlockPage("Master"); 245246 Block tagManager = new Block() 247 { 248 Id = "TagManager", 249 SortId = 1, 250 Template = RenderGoogleTagManager() 251 }; 252253 Block facebookPixel = new Block() 254 { 255 Id = "FacebookPixel", 256 SortId = 2, 257 Template = RenderFacebookPixel() 258 }; 259260 Block ServiceWorker = new Block() 261 { 262 Id = "ServiceWorker", 263 SortId = 3, 264 Template = RenderServiceWorker() 265 }; 266267 topSnippetsBlocksPage.Add(MasterBlockId.MasterTopSnippets, tagManager); 268 topSnippetsBlocksPage.Add(MasterBlockId.MasterTopSnippets, facebookPixel); 269 topSnippetsBlocksPage.Add(MasterBlockId.MasterTopSnippets, ServiceWorker); 270271 } 272273 @helper RenderGoogleTagManager() 274 { 275 string GoogleTagManagerID = Model.Area.Item.GetItem("Settings").GetString("GoogleTagManagerID") != null ? Model.Area.Item.GetItem("Settings").GetString("GoogleTagManagerID") : ""; 276277 if (!string.IsNullOrWhiteSpace(GoogleTagManagerID)) 278 { 279 <!-- Google Tag Manager (noscript) --> 280 <noscript> 281 <iframe src="https://www.googletagmanager.com/ns.html?id=@GoogleTagManagerID" 282 height="0" width="0" style="display:none;visibility:hidden"></iframe> 283 </noscript> 284 <!-- End Google Tag Manager (noscript) --> 285 } 286 } 287288 @helper RenderFacebookPixel() 289 { 290 string FacebookPixelID = Model.Area.Item.GetItem("Settings").GetString("FacebookPixelID") != null ? Model.Area.Item.GetItem("Settings").GetString("FacebookPixelID") : ""; 291292 if (!string.IsNullOrWhiteSpace(FacebookPixelID)) 293 { 294 <!-- Facebook Pixel Code --> 295 <script async> 296 !function(f,b,e,v,n,t,s) 297 {if(f.fbq)return;n=f.fbq=function(){n.callMethod? 298 n.callMethod.apply(n,arguments):n.queue.push(arguments)}; 299 if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; 300 n.queue=[];t=b.createElement(e);t.async=!0; 301 t.src=v;s=b.getElementsByTagName(e)[0]; 302 s.parentNode.insertBefore(t,s)}(window, document,'script', 303 'https://connect.facebook.net/en_US/fbevents.js'); 304 fbq('init', '@FacebookPixelID'); 305 fbq('track', 'PageView'); 306 </script> 307 <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=@FacebookPixelID&ev=PageView&noscript=1" alt="" /></noscript> 308 } 309 } 310311 @helper RenderServiceWorker() 312 { 313 @* 314 <script> 315 if ('serviceWorker' in navigator) { 316 window.addEventListener('load', () => { 317 navigator.serviceWorker.register('sw.js').then(registration => { 318 console.log('SW registered: ', registration); 319 }).catch(registrationError => { 320 console.log('SW registration failed: ', registrationError); 321 }); 322 }); 323 } 324 </script> 325 *@ 326327 } 328 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 329330 @using System 331 @using System.Web 332 @using System.Collections.Generic 333 @using Dynamicweb.Rapido.Blocks.Extensibility 334 @using Dynamicweb.Rapido.Blocks 335336337 @{ 338 BlocksPage loginBlocksPage = BlocksPage.GetBlockPage("Master"); 339340 Block loginModal = new Block() 341 { 342 Id = "LoginModal", 343 SortId = 10, 344 Template = LoginModal() 345 }; 346347 loginBlocksPage.Add(MasterBlockId.MasterTopSnippets, loginModal); 348 } 349350 @helper LoginModal() { 351 int pageId = Model.TopPage.ID; 352 string userSignedInError = !Model.LogOnFailed ? "" : "checked"; 353 string userSignedInErrorText = ""; 354 int signInProfilePageId = GetPageIdByNavigationTag("SignInPage"); 355 string forgotPasswordPageLink = "/Default.aspx?ID=" + signInProfilePageId + "&LoginAction=Recovery"; 356 int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); 357 bool hideCreateAccountLink = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("SignInHideCreateAccount"); 358359 if (Model.LogOnFailed) { 360 switch (Model.LogOnFailedReason) 361 { 362 case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordLengthInvalid: 363 userSignedInErrorText = Translate("Password length is invalid"); 364 break; 365 case Dynamicweb.Security.UserManagement.LogOnFailedReason.IncorrectLogin: 366 userSignedInErrorText = Translate("Invalid email or password"); 367 break; 368 case Dynamicweb.Security.UserManagement.LogOnFailedReason.ExceededFailedLogOnLimit: 369 userSignedInErrorText = Translate("You have exceeded the limit of allowed login attempts. The user account is temporarily locked"); 370 break; 371 case Dynamicweb.Security.UserManagement.LogOnFailedReason.LoginLocked: 372 userSignedInErrorText = Translate("The user account is temporarily locked"); 373 break; 374 case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordExpired: 375 userSignedInErrorText = Translate("The password has expired and needs to be renewed"); 376 break; 377 default: 378 userSignedInErrorText = Translate("An unknown error occured"); 379 break; 380 } 381 } 382383 <!-- Trigger for the login modal --> 384 <input type="checkbox" id="SignInModalTrigger" class="modal-trigger" @userSignedInError /> 385386 <!-- Login modal --> 387 <div class="modal-container"> 388 <label for="SignInModalTrigger" id="SignInModalOverlay" class="modal-overlay"></label> 389 <div class="modal modal--xs" id="SignInModal"> 390 <div class="modal__header"> 391 <h2>@Translate("Sign in")</h2> 392 </div> 393 <div class="modal__body"> 394 <form method="post" id="LoginForm" class="u-no-margin"> 395 <input type="hidden" name="ID" value="@pageId" /> 396 <input type="hidden" name="DWExtranetUsernameRemember" value="True" /> 397 <input type="hidden" name="DWExtranetPasswordRemember" value="True" /> 398 <input type="text" class="u-full-width" id="LoginUsername" name="username" placeholder="@Translate("Username")" /> 399 <input type="password" class="u-full-width" id="LoginPassword" name="password" placeholder="@Translate("Password")" /> 400 <div class="field-error dw-mod">@userSignedInErrorText</div> 401402 <div class="form__field-group dw-mod"> 403 <input type="checkbox" id="rememberMe" name="Autologin" checked="checked" value="True" class="form__control"> 404 <label for="rememberMe"> 405 @Translate("Remember me", "Remember me") 406 </label> 407 </div> 408409 <button type="submit" class="btn btn--primary btn--full dw-mod" name="LoginAction" value="Login" onclick="Buttons.LockButton(event)">@Translate("Sign in")</button> 410411 <a class="btn btn--link-clean dw-mod u-margin-top--lg" href="@forgotPasswordPageLink">@Translate("Forgot your password?", "Forgot your password?")</a> 412 @if (!hideCreateAccountLink) 413 { 414 <a class="btn btn--link-clean dw-mod" href="/default.aspx?ID=@createAccountPageId">@Translate("Create account")?</a> 415 } 416 </form> 417 </div> 418 </div> 419 </div> 420 } 421 @if (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") 422 { 423 <text>@inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 424425 @using System 426 @using System.Web 427 @using System.Collections.Generic 428 @using Dynamicweb.Rapido.Blocks.Extensibility 429 @using Dynamicweb.Rapido.Blocks 430431432 @functions { 433 BlocksPage mobileHeaderBlocksPage = BlocksPage.GetBlockPage("Master"); 434 } 435436 @{ 437 var mobileTopLayout = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Layout").GetItem("MobileTop").GetString("Design")) ? Model.Area.Item.GetItem("Layout").GetItem("MobileTop").GetList("Design").SelectedValue : "nav-left"; 438439 Block mobileHeader = new Block() 440 { 441 Id = "MobileTop", 442 SortId = 10, 443 Template = RenderMobileTop(), 444 SkipRenderBlocksList = true 445 }; 446 mobileHeaderBlocksPage.Add(MasterBlockId.MasterHeader, mobileHeader); 447448 Block mobileHeaderNavigation = new Block() 449 { 450 Id = "MobileHeaderNavigation", 451 SortId = 10, 452 Template = RenderMobileHeaderNavigation(), 453 SkipRenderBlocksList = true, 454 BlocksList = new List<Block> { 455 new Block { 456 Id = "MobileHeaderNavigationTrigger", 457 SortId = 10, 458 Template = RenderMobileHeaderNavigationTrigger() 459 } 460 } 461 }; 462 mobileHeaderBlocksPage.Add("MobileTop", mobileHeaderNavigation); 463464465 Block mobileHeaderLogo = new Block() 466 { 467 Id = "MobileHeaderLogo", 468 SortId = 20, 469 Template = RenderMobileHeaderLogo(), 470 SkipRenderBlocksList = true 471 }; 472 mobileHeaderBlocksPage.Add("MobileTop", mobileHeaderLogo); 473474 Block mobileHeaderActions = new Block() 475 { 476 Id = "MobileHeaderActions", 477 SortId = 30, 478 Template = RenderMobileTopActions(), 479 SkipRenderBlocksList = true 480 }; 481 mobileHeaderBlocksPage.Add("MobileTop", mobileHeaderActions); 482483 Block mobileHeaderSearch = new Block 484 { 485 Id = "MobileHeaderSearch", 486 SortId = 10, 487 Template = RenderMobileTopSearch() 488 }; 489 mobileHeaderBlocksPage.Add("MobileHeaderActions", mobileHeaderSearch); 490491 Block mobileHeaderMiniCart = new Block 492 { 493 Id = "MobileHeaderMiniCart", 494 SortId = 20, 495 Template = RenderMobileTopMiniCart() 496 }; 497498 Block mobileHeaderSearchBar = new Block() 499 { 500 Id = "MobileHeaderSearchBar", 501 SortId = 30, 502 Template = RenderMobileTopSearchBar() 503 }; 504 mobileHeaderBlocksPage.Add(MasterBlockId.MasterHeader, mobileHeaderSearchBar); 505506 switch (mobileTopLayout) 507 { 508 case "nav-left": 509 mobileHeaderNavigation.SortId = 10; 510 mobileHeaderLogo.SortId = 20; 511 mobileHeaderActions.SortId = 30; 512 mobileHeaderBlocksPage.Add("MobileHeaderActions", mobileHeaderMiniCart); 513 break; 514 case "nav-right": 515 mobileHeaderLogo.SortId = 10; 516 mobileHeaderActions.SortId = 20; 517 mobileHeaderNavigation.SortId = 30; 518 mobileHeaderBlocksPage.Add("MobileHeaderActions", mobileHeaderMiniCart); 519 break; 520 case "nav-search-left": 521 mobileHeaderNavigation.SortId = 10; 522 mobileHeaderLogo.SortId = 20; 523 mobileHeaderActions.SortId = 30; 524 mobileHeaderBlocksPage.Add("MobileHeaderNavigation", mobileHeaderMiniCart); 525 break; 526 case "search-left": 527 mobileHeaderActions.SortId = 10; 528 mobileHeaderLogo.SortId = 20; 529 mobileHeaderNavigation.SortId = 30; 530 mobileHeaderMiniCart.SortId = 0; 531 mobileHeaderBlocksPage.Add("MobileHeaderNavigation", mobileHeaderMiniCart); 532 break; 533 } 534 } 535536537 @helper RenderMobileTop() 538 { 539 List<Block> subBlocks = this.mobileHeaderBlocksPage.GetBlockListById("MobileTop").OrderBy(item => item.SortId).ToList(); 540541 <nav class="main-navigation-mobile dw-mod"> 542 <div class="center-container top-container__center-container dw-mod"> 543 <div class="grid grid--align-center"> 544 @RenderBlockList(subBlocks) 545 </div> 546 </div> 547 </nav> 548 } 549550 @helper RenderMobileHeaderNavigation() 551 { 552 List<Block> subBlocks = this.mobileHeaderBlocksPage.GetBlockListById("MobileHeaderNavigation").OrderBy(item => item.SortId).ToList(); 553554 <div class="grid__col-auto-width"> 555 <ul class="menu dw-mod"> 556 @RenderBlockList(subBlocks) 557 </ul> 558 </div> 559 } 560561 @helper RenderMobileHeaderNavigationTrigger() 562 { 563 <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 564 <label for="MobileNavTrigger" class="mobile-nav-trigger-button menu__link menu__link--icon menu__link--mobile dw-mod"></label> 565 </li> 566 } 567568 @helper RenderMobileHeaderLogo() 569 { 570 List<Block> subBlocks = this.mobileHeaderBlocksPage.GetBlockListById("MobileHeaderLogo").OrderBy(item => item.SortId).ToList(); 571572 string firstPageId = Model.Area.FirstActivePage.ID.ToString(); 573 string businessName = Model.Area.Item.GetItem("Settings").GetString("BusinessName"); 574575 string mobileLogo = "/Files/Images/logo-dynamicweb.png"; 576 if (Model.Area.Item.GetItem("Layout").GetItem("MobileTop") != null && Model.Area.Item.GetItem("Layout").GetItem("MobileTop").GetFile("Logo") != null) 577 { 578 mobileLogo = Model.Area.Item.GetItem("Layout").GetItem("MobileTop").GetFile("Logo").PathUrlEncoded; 579 } 580581 if (Path.GetExtension(mobileLogo).ToLower() != ".svg") 582 { 583 mobileLogo = "/Admin/Public/GetImage.ashx?height=40&amp;crop=5&amp;Compression=75&amp;image=" + mobileLogo; 584 } 585 else 586 { 587 mobileLogo = HttpUtility.UrlDecode(mobileLogo); 588 } 589590 <div class="grid__col-auto"> 591 <div class="logo dw-mod"> 592 <a href="/Default.aspx?ID=@firstPageId"> 593 <img class="grid__cell-img logo__img logo__img--mobile dw-mod" src="@mobileLogo" alt="@businessName" /> 594 </a> 595 </div> 596597 @RenderBlockList(subBlocks) 598 </div> 599 } 600601 @helper RenderMobileTopActions() 602 { 603 List<Block> subBlocks = this.mobileHeaderBlocksPage.GetBlockListById("MobileHeaderActions").OrderBy(item => item.SortId).ToList(); 604605 <div class="grid__col-auto-width"> 606 <ul class="menu dw-mod"> 607 @RenderBlockList(subBlocks) 608 </ul> 609 </div> 610 } 611612 @helper RenderMobileTopSearch() 613 { 614 <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 615 <label for="MobileSearchTrigger" class="menu__link menu__link--icon menu__link--mobile dw-mod"> 616 <i class="@Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("SearchIcon").SelectedValue fa-1_5x"></i> 617 </label> 618 </li> 619 } 620621622 @helper RenderMobileTopMiniCart() 623 { 624 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 625 int cartPageId = GetPageIdByNavigationTag("CartPage"); 626 double cartProductsCount = Model.Cart.TotalProductsCount; 627628 @* 629 <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod" id="miniCartWrapper" onmouseenter="Cart.UpdateMiniCart('miniCartWrapper', 'miniCart', 'cartCounter', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')"> 630 <div class="mini-cart dw-mod"> 631 <a href="/Default.aspx?ID=@cartPageId&Purge=True" id="miniCartCounterWrap" class="menu__link menu__link--icon menu__link--mobile dw-mod js-mini-cart-button u-w50px"> 632 <i class="@Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("CartIcon").SelectedValue fa-1_5x"></i> 633 <div class="mini-cart__counter mini-cart__counter--inline dw-mod"> 634 <div class="js-handlebars-root js-mini-cart-counter" id="cartCounter" data-template="MiniCartCounterContent" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=Counter" data-init-onload="false" data-preloader="false"> 635 <div class="js-mini-cart-counter-content"> 636 @cartProductsCount 637 </div> 638 </div> 639 </div> 640 </a> 641 @if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 642 { 643 <div class="mini-cart-dropdown js-handlebars-root js-mini-cart dw-mod" id="miniCart" data-template="MiniCartContent" data-cart-id="@miniCartFeedPageId" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart" data-init-onload="false"></div> 644 } 645 </div> 646 </li> 647 *@ 648 } 649650 @helper RenderMobileTopSearchBar() 651 { 652 string searchFeedId = ""; 653 string searchSecondFeedId = ""; 654 int groupsFeedId; 655 int productsPageId = GetPageIdByNavigationTag("ProductsPage"); 656 string contentSearchPageLink = GetPageIdByNavigationTag("ContentSearchResults") + "&Areaid=" + Model.Area.ID; 657 string resultPageLink; 658 string searchPlaceholder; 659 string searchType = "product-search"; 660 string searchTemplate; 661 string searchContentTemplate = ""; 662 string searchValue = HttpContext.Current.Request.QueryString.Get("Search") != null ? HttpContext.Current.Request.QueryString.Get("Search") : ""; 663 bool showGroups = true; 664665 if (Model.Area.Item.GetItem("Layout").GetList("TopSearch").SelectedValue == "contentSearch") 666 { 667 searchFeedId = GetPageIdByNavigationTag("ContentSearchFeed") + "&Areaid=" + Model.Area.ID + "&pagesOnly=true"; 668 resultPageLink = contentSearchPageLink; 669 searchPlaceholder = Translate("Search page"); 670 groupsFeedId = 0; 671 searchType = "content-search"; 672 searchTemplate = "SearchPagesTemplate"; 673 showGroups = false; 674 } 675 else if (Model.Area.Item.GetItem("Layout").GetList("TopSearch").SelectedValue == "combinedSearch") 676 { 677 searchFeedId = productsPageId + "&feed=true"; 678 searchSecondFeedId = GetPageIdByNavigationTag("ContentSearchFeed") + "&Areaid=" + Model.Area.ID + "&pagesOnly=true"; 679 resultPageLink = Converter.ToString(productsPageId); 680 searchPlaceholder = Translate("Search"); 681 groupsFeedId = GetPageIdByNavigationTag("ProductGroupsFeed"); 682 searchType = "combined-search"; 683 searchTemplate = "SearchProductsTemplateWrap"; 684 searchContentTemplate = "SearchPagesTemplateWrap"; 685 showGroups = Model.Area.Item.GetItem("Layout").GetBoolean("ShowGroupsSelector"); 686 } 687 else 688 { 689 resultPageLink = Converter.ToString(productsPageId); 690 searchFeedId = productsPageId + "&feed=true"; 691 groupsFeedId = GetPageIdByNavigationTag("ProductGroupsFeed"); 692 searchPlaceholder = Translate("Search products"); 693 searchTemplate = "SearchProductsTemplate"; 694 searchType = "product-search"; 695 showGroups = Model.Area.Item.GetItem("Layout").GetBoolean("ShowGroupsSelector"); 696 } 697698699 <input type="checkbox" id="MobileSearchTrigger" class="mobile-search-trigger" /> 700701 <div class="main-navigation-mobile typeahead-mobile dw-mod"> 702 <div class="center-container top-container__center-container dw-mod"> 703 <div class="grid"> 704 <div class="grid__col-auto"> 705 <div class="typeahead-mobile__search-field dw-mod js-typeahead" data-page-size="@(searchType == "combined-search" ? 4 : 8)" id="MobileProductSearch" data-search-feed-id="@searchFeedId" data-search-second-feed-id="@searchSecondFeedId" data-result-page-id="@resultPageLink" data-search-type="@searchType"> 706 <input type="text" class="js-typeahead-search-field u-w160px u-no-margin" placeholder="@searchPlaceholder" value="@searchValue"> 707 @if (string.IsNullOrEmpty(searchSecondFeedId)) 708 { 709 <ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content dw-mod" id="MobileProductSearchBarContent" data-template="@searchTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly" data-init-onload="false"></ul> 710 } 711 else 712 { 713 <div class="dropdown dropdown--absolute-position dropdown--combined grid dropdown--combined-mobile grid"> 714 <div class="js-handlebars-root js-typeahead-search-content grid__col-sm-7 grid__col--bleed-y" id="MobileProductSearchBarContent" data-template="@searchTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly" data-init-onload="false"></div> 715 <div class="js-handlebars-root js-typeahead-additional-search-content grid__col-sm-5 grid__col--bleed-y" id="MobileContentSearchBarContent" data-template="@searchContentTemplate" data-json-feed="/Default.aspx?ID=@searchSecondFeedId" data-init-onload="false"></div> 716 </div> 717 } 718 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod js-typeahead-enter-btn u-pull--right search-btn"><i class="@Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("SearchIcon").SelectedValue"></i></button> 719 </div> 720 </div> 721 <div class="grid__col-auto-width"> 722 <ul class="menu dw-mod"> 723 <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 724 <label for="MobileSearchTrigger" class="menu__link menu__link--icon menu__link--mobile dw-mod"> 725 <i class="fas fa-times fa-1_5x"></i> 726 </label> 727 </li> 728 </ul> 729 </div> 730 </div> 731 </div> 732 </div> 733 } </text> 734 <text>@inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 735736 @using System 737 @using System.Web 738 @using System.Collections.Generic 739 @using Dynamicweb.Rapido.Blocks.Extensibility 740 @using Dynamicweb.Rapido.Blocks 741742 @functions { 743 BlocksPage mobileNavigationBlocksPage = BlocksPage.GetBlockPage("Master"); 744 } 745746 @{ 747 bool navigationItemsHideSignIn = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("HideSignIn"); 748 bool hideCreateAccountLink = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("SignInHideAccount"); 749 bool hideMyProfileLink = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("SignInHideProfile"); 750 bool hideMyOrdersLink = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("SignInHideOrders"); 751 bool hideMySavedCardsLink = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("SignInHideSavedCards"); 752 bool hideMyFavoritesLink = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("SignInHideFavorites"); 753754 Block mobileNavigation = new Block() 755 { 756 Id = "MobileNavigation", 757 SortId = 10, 758 Template = MobileNavigation(), 759 SkipRenderBlocksList = true 760 }; 761 mobileNavigationBlocksPage.Add(MasterBlockId.MasterTopSnippets, mobileNavigation); 762763 if (Model.CurrentUser.ID > 0) 764 { 765 Block mobileNavigationSignIn = new Block 766 { 767 Id = "MobileNavigationSignIn", 768 SortId = 10, 769 Template = RenderMobileNavigationSignIn() 770 }; 771 mobileNavigationBlocksPage.Add("MobileNavigation", mobileNavigationSignIn); 772 } 773774 Block mobileNavigationMenu = new Block 775 { 776 Id = "MobileNavigationMenu", 777 SortId = 20, 778 Template = RenderMobileNavigationMenu() 779 }; 780 mobileNavigationBlocksPage.Add("MobileNavigation", mobileNavigationMenu); 781782 Block mobileNavigationActions = new Block 783 { 784 Id = "MobileNavigationActions", 785 SortId = 30, 786 Template = RenderMobileNavigationActions(), 787 SkipRenderBlocksList = true 788 }; 789 mobileNavigationBlocksPage.Add("MobileNavigation", mobileNavigationActions); 790791 if (!navigationItemsHideSignIn) 792 { 793 if (Model.CurrentUser.ID <= 0) 794 { 795 Block mobileNavigationSignInAction = new Block 796 { 797 Id = "MobileNavigationSignInAction", 798 SortId = 10, 799 Template = RenderMobileNavigationSignInAction() 800 }; 801 mobileNavigationBlocksPage.Add("MobileNavigationActions", mobileNavigationSignInAction); 802803 if (hideCreateAccountLink) 804 { 805 Block mobileNavigationCreateAccountAction = new Block 806 { 807 Id = "MobileNavigationCreateAccountAction", 808 SortId = 20, 809 Template = RenderMobileNavigationCreateAccountAction() 810 }; 811 mobileNavigationBlocksPage.Add("MobileNavigationActions", mobileNavigationSignInAction); 812 } 813 } 814 else 815 { 816 if (hideMyProfileLink) 817 { 818 Block mobileNavigationProfileAction = new Block 819 { 820 Id = "MobileNavigationProfileAction", 821 SortId = 10, 822 Template = RenderMobileNavigationProfileAction() 823 }; 824 mobileNavigationBlocksPage.Add("MobileNavigationActions", mobileNavigationProfileAction); 825 } 826 if (hideMyOrdersLink) 827 { 828 Block mobileNavigationOrdersAction = new Block 829 { 830 Id = "MobileNavigationOrdersAction", 831 SortId = 20, 832 Template = RenderMobileNavigationOrdersAction() 833 }; 834 mobileNavigationBlocksPage.Add("MobileNavigationActions", mobileNavigationOrdersAction); 835 } 836 if (hideMyFavoritesLink) 837 { 838 Block mobileNavigationFavoritesAction = new Block 839 { 840 Id = "MobileNavigationFavoritesAction", 841 SortId = 30, 842 Template = RenderMobileNavigationFavoritesAction() 843 }; 844 mobileNavigationBlocksPage.Add("MobileNavigationActions", mobileNavigationFavoritesAction); 845 } 846847 Block mobileNavigationSignOutAction = new Block 848 { 849 Id = "MobileNavigationSignOutAction", 850 SortId = 40, 851 Template = RenderMobileNavigationSignOutAction() 852 }; 853 mobileNavigationBlocksPage.Add("MobileNavigationActions", mobileNavigationSignOutAction); 854 } 855 } 856857 if (Model.Languages.Count > 1) 858 { 859 Block mobileNavigationLanguagesAction = new Block 860 { 861 Id = "MobileNavigationLanguagesAction", 862 SortId = 50, 863 Template = RenderMobileNavigationLanguagesAction() 864 }; 865 mobileNavigationBlocksPage.Add("MobileNavigationActions", mobileNavigationLanguagesAction); 866 } 867 } 868869870 @helper MobileNavigation() 871 { 872 List<Block> subBlocks = this.mobileNavigationBlocksPage.GetBlockListById("MobileNavigation").OrderBy(item => item.SortId).ToList(); 873874 bool onlyPreview = Model.Area.Item.GetItem("Ecommerce").GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; 875 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 876 int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); 877 string mobileTopDesign = Model.Area.Item.GetItem("Layout").GetItem("MobileTop") != null ? Model.Area.Item.GetItem("Layout").GetItem("MobileTop").GetList("Design").SelectedValue : "nav-left"; 878 string position = mobileTopDesign == "nav-left" || mobileTopDesign == "nav-search-left" ? "left" : "right"; 879880 <!-- Trigger for mobile navigation --> 881 <input type="checkbox" id="MobileNavTrigger" class="mobile-nav-trigger mobile-nav-trigger--@position" autocomplete="off" /> 882883 <!-- Mobile navigation --> 884 <nav class="mobile-navigation mobile-navigation--@position dw-mod"> 885 @RenderBlockList(subBlocks) 886 </nav> 887888 <label class="mobile-nav-trigger-off" for="MobileNavTrigger"></label> 889 @* 890 if (!onlyPreview) 891 { 892 <div class="u-visually-hidden js-handlebars-root js-mini-cart" id="miniCart" data-template="MiniCartContent" data-cart-id="@cartFeedPageId" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart" data-init-onload="false"></div> 893 } 894 *@ 895 } 896897 @helper RenderMobileNavigationSignIn() 898 { 899 int signInProfilePageId = GetPageIdByNavigationTag("SignInPage"); 900 int myProfilePageId = GetPageIdByNavigationTag("MyEnkotec"); 901 string linkStart = Model.CurrentUser.ID <= 0 ? "/Default.aspx?ID=" + signInProfilePageId + "&RedirectPageId=" : "/Default.aspx?ID="; 902 string myProfilePageLink = linkStart + myProfilePageId; 903 string userName = Model.CurrentUser.FirstName != null ? Model.CurrentUser.FirstName : ""; 904 userName += " " + Model.CurrentUser.LastName != null ? Model.CurrentUser.LastName : ""; 905 userName += userName == "" && Model.CurrentUser.UserName != null ? Model.CurrentUser.UserName : ""; 906907 <ul class="menu menu-mobile"> 908 <li class="menu-mobile__item"> 909 <a href="@myProfilePageLink" class="menu-mobile__link dw-mod"><i class="@Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("SignInProfileIcon").SelectedValue menu-mobile__link-icon"></i> @userName</a> 910 </li> 911 </ul> 912 } 913914 @helper RenderMobileNavigationMenu() 915 { 916 bool isSlidesDesign = Model.Area.Item.GetItem("Layout").GetItem("MobileNavigation").GetList("Design").SelectedValue == "Slides"; 917 string menuTemplate = isSlidesDesign ? "BaseMenuForMobileSlides.xslt" : "BaseMenuForMobileExpandable.xslt"; 918 string levels = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Layout").GetItem("MobileNavigation").GetString("Levels")) ? Model.Area.Item.GetItem("Layout").GetItem("MobileNavigation").GetString("Levels") : "3"; 919 bool renderPagesInToolBar = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("RenderPagesInToolBar"); 920 int startLevel = renderPagesInToolBar ? 1 : 0; 921922 if (renderPagesInToolBar) 923 { 924 @RenderNavigation(new 925 { 926 id = "mobilenavigation", 927 cssclass = "menu menu-mobile dwnavigation", 928 startLevel = 0, 929 ecomStartLevel = 0, 930 endlevel = 3, 931 expandmode = "all", 932 template = @menuTemplate 933 }) 934 } 935936 @* 937 if (renderPagesInToolBar) 938 { 939 @RenderNavigation(new 940 { 941 id = "topToolsMobileNavigation", 942 cssclass = "menu menu-mobile dwnavigation", 943 template = "ToolsMenuForMobile.xslt" 944 }) 945 } 946 *@ 947 } 948949 @helper RenderMobileNavigationActions() 950 { 951 List<Block> subBlocks = this.mobileNavigationBlocksPage.GetBlockListById("MobileNavigationActions").OrderBy(item => item.SortId).ToList(); ; 952953 <ul class="menu menu-mobile"> 954 @RenderBlockList(subBlocks) 955 </ul> 956 } 957958 @helper RenderMobileNavigationSignInAction() 959 { 960 <li class="menu-mobile__item"> 961 <label for="SignInModalTrigger" onclick="document.getElementById('MobileNavTrigger').checked = false;" class="menu-mobile__link dw-mod menu-mobile__link--highlighted"><i class="@Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("SignInProfileIcon").SelectedValue menu-mobile__link-icon"></i> @Translate("Sign in")</label> 962 </li> 963 } 964965 @helper RenderMobileNavigationCreateAccountAction() 966 { 967 bool hideCreateAccountLink = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("SignInHideCreateAccount"); 968969 int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); 970 if (!hideCreateAccountLink) 971 { 972 <li class="menu-mobile__item"> 973 <a class="menu-mobile__link menu-mobile__link--highlighted dw-mod" href="/Default.aspx?ID=@createAccountPageId"><i class="@Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("SignInProfileIcon").SelectedValue menu-mobile__link-icon"></i> @Translate("Create account")</a> 974 </li> 975 } 976 } 977978 @helper RenderMobileNavigationProfileAction() 979 { 980 int signInProfilePageId = GetPageIdByNavigationTag("SignInPage"); 981 string linkStart = Model.CurrentUser.ID <= 0 ? "/Default.aspx?ID=" + signInProfilePageId + "&RedirectPageId=" : "/Default.aspx?ID="; 982 int myProfilePageId = GetPageIdByNavigationTag("CustomerProfile"); 983 string myProfilePageLink = linkStart + myProfilePageId; 984985 @* 986 <li class="menu-mobile__item"> 987 <a href="@myProfilePageLink" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="@Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("SignInProfileIcon").SelectedValue menu-mobile__link-icon"></i> @Translate("My Profile")</a> 988 </li> 989 *@ 990 } 991992 @helper RenderMobileNavigationOrdersAction() 993 { 994 int signInProfilePageId = GetPageIdByNavigationTag("SignInPage"); 995 string linkStart = Model.CurrentUser.ID <= 0 ? "/Default.aspx?ID=" + signInProfilePageId + "&RedirectPageId=" : "/Default.aspx?ID="; 996 int myOrdersPageId = GetPageIdByNavigationTag("CustomerOrders"); 997 string myOrdersPageLink = linkStart + myOrdersPageId; 998 @* 999 <li class="menu-mobile__item"> 1000 <a href="@myOrdersPageLink" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="fas fa-list menu-mobile__link-icon"></i> @Translate("My Orders")</a> 1001 </li> 1002 *@ 1003 } 10041005 @helper RenderMobileNavigationFavoritesAction() 1006 { 1007 int signInProfilePageId = GetPageIdByNavigationTag("SignInPage"); 1008 string linkStart = Model.CurrentUser.ID <= 0 ? "/Default.aspx?ID=" + signInProfilePageId + "&RedirectPageId=" : "/Default.aspx?ID="; 1009 int myFavoritesPageId = GetPageIdByNavigationTag("CustomerFavorites"); 1010 string myFavoritesPageLink = linkStart + myFavoritesPageId; 10111012 @* 1013 <li class="menu-mobile__item"> 1014 <a href="@myFavoritesPageLink" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="@Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("FavoriteIcon").SelectedValue menu-mobile__link-icon"></i> @Translate("My Favorites")</a> 1015 </li> 1016 *@ 1017 } 10181019 @helper RenderMobileNavigationSignOutAction() 1020 { 1021 int pageId = Model.TopPage.ID; 10221023 <li class="menu-mobile__item"> 1024 <a class="menu-mobile__link menu-mobile__link--highlighted dw-mod" href="/Admin/Public/ExtranetLogoff.aspx?ID=@pageId"><i class="@Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("SignInProfileIcon").SelectedValue menu-mobile__link-icon"></i> @Translate("Sign out")</a> 1025 </li> 1026 } 10271028 @helper RenderMobileNavigationLanguagesAction() 1029 { 1030 bool isSlidesDesign = Model.Area.Item.GetItem("Layout").GetItem("MobileNavigation").GetList("Design").SelectedValue == "Slides"; 10311032 string selectedLanguage = ""; 1033 foreach (var lang in Model.Languages) 1034 { 1035 if (lang.IsCurrent) 1036 { 1037 selectedLanguage = lang.Name; 1038 } 1039 } 10401041 <li class="menu-mobile__item dw-mod"> 1042 <input id="MobileMenuCheck_Language" type="checkbox" class="expand-trigger"> 1043 <div class="menu-mobile__link__wrap"> 1044 <label for="MobileMenuCheck_Language" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="@Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("LanguageIcon").SelectedValue menu-mobile__link-icon"></i> @selectedLanguage</label> 1045 <label for="MobileMenuCheck_Language" class="menu-mobile__trigger"></label> 1046 </div> 1047 <ul class="menu-mobile menu-mobile__submenu expand-menu"> 1048 @if (isSlidesDesign) 1049 { 1050 <li class="menu-mobile__item dw-mod"> 1051 <div class="menu-mobile__link__wrap"> 1052 <label for="MobileMenuCheck_Language" class="menu-mobile__trigger menu-mobile__trigger--back"></label> 1053 <label for="MobileMenuCheck_Language" class="menu-mobile__link dw-mod ">Back</label> 1054 </div> 1055 </li> 1056 } 1057 @foreach (var lang in Model.Languages) 1058 { 1059 <li class="menu-mobile__item dw-mod"> 1060 <a class="menu-mobile__link menu-mobile__link--highlighted dw-mod menu-mobile__link--level-1" href="/Default.aspx?ID=@lang.Page.ID">@lang.Name</a> 1061 </li> 1062 } 1063 </ul> 1064 </li> 1065 }</text> 1066 } 1067 else 1068 { 1069 <text>@inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 10701071 @using System 1072 @using System.Web 1073 @using System.Collections.Generic 1074 @using Dynamicweb.Controls.Icons 1075 @using Dynamicweb.Rapido.Blocks.Extensibility 1076 @using Dynamicweb.Rapido.Blocks 10771078 @functions { 1079 BlocksPage headerBlocksPage = BlocksPage.GetBlockPage("Master"); 1080 } 10811082 @{ 1083 bool renderPagesInToolBar = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("RenderPagesInToolBar"); 1084 bool navigationActionHideSearch = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("HideSearch"); 1085 bool hideMyFavoritesLink = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("SignInHideFavorites"); 1086 bool showSearchIcon = false; 1087 string topLayout = Model.Area.Item.GetItem("Layout").GetItem("Header").GetList("TopLayout") != null ? Model.Area.Item.GetItem("Layout").GetItem("Header").GetList("TopLayout").SelectedValue : "normal"; 10881089 if (topLayout == "minimal" || topLayout == "minimal-right" || topLayout == "two-lines" || topLayout == "two-lines-centered") 1090 { 1091 showSearchIcon = true; 1092 } 1093 bool headerOnlyPreview = Model.Area.Item.GetItem("Ecommerce").GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; 10941095 if (renderPagesInToolBar && Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 1096 { 1097 Block masterTools = new Block() 1098 { 1099 Id = "MasterDesktopTools", 1100 SortId = 10, 1101 Template = RenderDesktopTools(), 1102 SkipRenderBlocksList = true, 1103 BlocksList = new List<Block> 1104 { 1105 new Block { 1106 Id = "MasterDesktopToolsText", 1107 SortId = 10, 1108 Template = RenderDesktopToolsText(), 1109 Design = new Design 1110 { 1111 Size = "auto", 1112 HidePadding = true, 1113 RenderType = RenderType.Column 1114 } 1115 }, 1116 new Block { 1117 Id = "MasterDesktopToolsNavigation", 1118 SortId = 20, 1119 Design = new Design 1120 { 1121 Size = "auto-width", 1122 HidePadding = true, 1123 RenderType = RenderType.Column 1124 } 1125 } 1126 } 1127 }; 1128 headerBlocksPage.Add(MasterBlockId.MasterHeader, masterTools); 1129 }; 11301131 Block masterDesktopExtra = new Block() 1132 { 1133 Id = "MasterDesktopExtra", 1134 SortId = 10, 1135 Template = RenderDesktopExtra(), 1136 SkipRenderBlocksList = true 1137 }; 1138 headerBlocksPage.Add(MasterBlockId.MasterHeader, masterDesktopExtra); 11391140 Block masterDesktopNavigation = new Block() 1141 { 1142 Id = "MasterDesktopNavigation", 1143 SortId = 20, 1144 Template = RenderDesktopNavigation(), 1145 SkipRenderBlocksList = true 1146 }; 1147 headerBlocksPage.Add(MasterBlockId.MasterHeader, masterDesktopNavigation); 11481149 Block masterDesktopLogo = new Block 1150 { 1151 Id = "MasterDesktopLogo", 1152 SortId = 10, 1153 Template = RenderDesktopLogo(), 1154 Design = new Design 1155 { 1156 Size = "auto-width", 1157 HidePadding = true, 1158 RenderType = RenderType.Column 1159 } 1160 }; 11611162 Block masterDesktopMenu = new Block 1163 { 1164 Id = "MasterDesktopMenu", 1165 SortId = 20, 1166 Template = RenderDesktopMenu(), 1167 Design = new Design() 1168 { 1169 Size = "auto", 1170 HidePadding = true, 1171 RenderType = RenderType.Column 1172 } 1173 }; 11741175 Block masterDesktopActionsMenuContainer = new Block 1176 { 1177 Id = "MasterDesktopActionsMenuContainer", 1178 SortId = 30, 1179 Design = new Design 1180 { 1181 RenderType = RenderType.Column, 1182 Size = "auto" 1183 } 1184 }; 11851186 Block masterDesktopActionsMenu = new Block 1187 { 1188 Id = "MasterDesktopActionsMenu", 1189 SortId = 10, 1190 Template = RenderDesktopActionsMenu(), 1191 SkipRenderBlocksList = true 1192 }; 11931194 if (!navigationActionHideSearch && showSearchIcon) 1195 { 1196 Block masterDesktopActionsMenuSearch = new Block 1197 { 1198 Id = "MasterDesktopActionsMenuSearch", 1199 SortId = 10, 1200 Template = RenderMiniSearch() 1201 }; 1202 masterDesktopActionsMenu.Add(masterDesktopActionsMenuSearch); 1203 } 12041205 Block masterDesktopActionsMenuSignIn = new Block 1206 { 1207 Id = "MasterDesktopActionsMenuSignIn", 1208 SortId = 20, 1209 Template = RenderSignIn() 1210 }; 1211 masterDesktopActionsMenu.Add(masterDesktopActionsMenuSignIn); 12121213 if (!hideMyFavoritesLink && Model.CurrentUser.ID > 0) 1214 { 1215 Block masterDesktopActionsMenuFavorites = new Block 1216 { 1217 Id = "MasterDesktopActionsMenuFavorites", 1218 SortId = 30, 1219 Template = RenderFavorites() 1220 }; 1221 masterDesktopActionsMenu.Add(masterDesktopActionsMenuFavorites); 1222 } 12231224 Block masterDesktopActionsMenuLanguageSelector = new Block 1225 { 1226 Id = "MasterDesktopActionsMenuLanguageSelector", 1227 SortId = 40, 1228 Template = RenderLanguageSelector() 1229 }; 1230 masterDesktopActionsMenu.Add(masterDesktopActionsMenuLanguageSelector); 12311232 if (!headerOnlyPreview) 1233 { 1234 Block masterDesktopActionsMenuMiniCart = new Block 1235 { 1236 Id = "MasterDesktopActionsMenuMiniCart", 1237 SortId = 50, 1238 Template = RenderMiniCart() 1239 }; 1240 masterDesktopActionsMenu.Add(masterDesktopActionsMenuMiniCart); 1241 } 12421243 if (!string.IsNullOrWhiteSpace(Model.Area.Item.GetItem("Layout").GetItem("Header").GetString("HeaderButtonLink"))) 1244 { 1245 Block masterDesktopActionsHeaderButton = new Block 1246 { 1247 Id = "MasterDesktopActionsHeaderButton", 1248 SortId = 60, 1249 Template = RenderHeaderButton() 1250 }; 1251 masterDesktopActionsMenu.Add(masterDesktopActionsHeaderButton); 1252 } 12531254 Block searchBar = new Block() 1255 { 1256 Id = "SearchBar", 1257 SortId = 40, 1258 Template = RenderSearchBar(), 1259 Design = new Design() 1260 { 1261 Size = "auto", 1262 HidePadding = true, 1263 RenderType = RenderType.Column 1264 } 1265 }; 12661267 if (Model.CurrentUser.ID > 0 && Model.SecondaryUsers.Count > 0) 1268 { 1269 Block impersonationBar = new Block() 1270 { 1271 Id = "ImpersonationBar", 1272 SortId = 50, 1273 Template = RenderImpersonationBar(), 1274 Design = new Design() 1275 { 1276 Size = "auto-width", 1277 HidePadding = true, 1278 RenderType = RenderType.Column 1279 } 1280 }; 1281 headerBlocksPage.Add(MasterBlockId.MasterHeader, impersonationBar); 1282 } 12831284 switch (topLayout) 1285 { 1286 case "condensed": //2 1287 masterDesktopLogo.SortId = 10; 1288 masterDesktopLogo.Design.Size = "auto-width"; 1289 headerBlocksPage.Add("MasterDesktopNavigation", masterDesktopLogo); 1290 masterDesktopMenu.SortId = 20; 1291 masterDesktopMenu.Design.Size = "auto"; 1292 headerBlocksPage.Add("MasterDesktopNavigation", masterDesktopMenu); 1293 masterDesktopActionsMenuContainer.SortId = 30; 1294 masterDesktopActionsMenuContainer.Design.Size = "auto-width"; 1295 headerBlocksPage.Add("MasterDesktopNavigation", masterDesktopActionsMenuContainer); 1296 if (!navigationActionHideSearch) 1297 { 1298 searchBar.SortId = 40; 1299 searchBar.Design.Size = "12"; 1300 masterDesktopExtra.SortId = 50; 1301 headerBlocksPage.Add("MasterDesktopExtra", searchBar); 1302 } 1303 break; 1304 case "minimal": //4 1305 masterDesktopLogo.SortId = 10; 1306 masterDesktopLogo.Design.Size = "auto-width"; 1307 headerBlocksPage.Add("MasterDesktopNavigation", masterDesktopLogo); 1308 masterDesktopMenu.SortId = 10; 1309 masterDesktopMenu.Design.Size = "auto"; 1310 headerBlocksPage.Add("MasterDesktopNavigation", masterDesktopMenu); 1311 masterDesktopActionsMenuContainer.SortId = 20; 1312 masterDesktopActionsMenuContainer.Design.Size = "auto-width"; 1313 headerBlocksPage.Add("MasterDesktopNavigation", masterDesktopActionsMenuContainer); 1314 break; 1315 case "minimal-right": //5 1316 masterDesktopLogo.SortId = 10; 1317 masterDesktopLogo.Design.Size = "auto-width"; 1318 headerBlocksPage.Add("MasterDesktopNavigation", masterDesktopLogo); 1319 masterDesktopMenu.SortId = 10; 1320 masterDesktopMenu.Design.Size = "auto"; 1321 headerBlocksPage.Add("MasterDesktopNavigation", masterDesktopMenu); 1322 masterDesktopActionsMenuContainer.SortId = 20; 1323 masterDesktopActionsMenuContainer.Design.Size = "auto-width"; 1324 headerBlocksPage.Add("MasterDesktopNavigation", masterDesktopActionsMenuContainer); 1325 break; 1326 case "two-lines": //6 1327 masterDesktopLogo.SortId = 10; 1328 masterDesktopLogo.Design.Size = "auto"; 1329 headerBlocksPage.Add("MasterDesktopExtra", masterDesktopLogo); 1330 masterDesktopMenu.SortId = 10; 1331 headerBlocksPage.Add("MasterDesktopNavigation", masterDesktopMenu); 1332 masterDesktopActionsMenuContainer.SortId = 20; 1333 masterDesktopActionsMenuContainer.Design.Size = "auto-width"; 1334 headerBlocksPage.Add("MasterDesktopNavigation", masterDesktopActionsMenuContainer); 1335 break; 1336 case "two-lines-centered": //7 1337 masterDesktopLogo.SortId = 10; 1338 masterDesktopLogo.Design.Size = "auto"; 1339 headerBlocksPage.Add("MasterDesktopExtra", masterDesktopLogo); 1340 masterDesktopMenu.SortId = 10; 1341 masterDesktopMenu.Design.Size = "auto"; 1342 headerBlocksPage.Add("MasterDesktopNavigation", masterDesktopMenu); 1343 masterDesktopActionsMenuContainer.SortId = 20; 1344 headerBlocksPage.Add("MasterDesktopNavigation", masterDesktopActionsMenuContainer); 1345 break; 1346 case "splitted": //3 1347 masterDesktopLogo.SortId = 10; 1348 masterDesktopLogo.Design.Size = "auto"; 1349 headerBlocksPage.Add("MasterDesktopExtra", masterDesktopLogo); 1350 if (!navigationActionHideSearch) 1351 { 1352 searchBar.SortId = 20; 1353 searchBar.Design.Size = "auto"; 1354 headerBlocksPage.Add("MasterDesktopExtra", searchBar); 1355 } 1356 masterDesktopMenu.SortId = 10; 1357 headerBlocksPage.Add("MasterDesktopNavigation", masterDesktopMenu); 1358 masterDesktopActionsMenuContainer.SortId = 20; 1359 masterDesktopActionsMenuContainer.Design.Size = "auto-width"; 1360 headerBlocksPage.Add("MasterDesktopNavigation", masterDesktopActionsMenuContainer); 1361 break; 1362 case "normal": //1 1363 default: 1364 masterDesktopLogo.SortId = 10; 1365 headerBlocksPage.Add("MasterDesktopExtra", masterDesktopLogo); 1366 if (!navigationActionHideSearch) 1367 { 1368 searchBar.SortId = 20; 1369 headerBlocksPage.Add("MasterDesktopExtra", searchBar); 1370 } 1371 masterDesktopActionsMenuContainer.SortId = 30; 1372 headerBlocksPage.Add("MasterDesktopExtra", masterDesktopActionsMenuContainer); 1373 masterDesktopMenu.SortId = 10; 1374 masterDesktopActionsMenuContainer.Design.Size = "auto-width"; 1375 headerBlocksPage.Add("MasterDesktopNavigation", masterDesktopMenu); 1376 break; 1377 } 13781379 headerBlocksPage.Add("MasterDesktopActionsMenuContainer", masterDesktopActionsMenu); 1380 } 13811382 @helper RenderDesktopTools() 1383 { 1384 List<Block> subBlocks = this.headerBlocksPage.GetBlockListById("MasterDesktopTools").OrderBy(item => item.SortId).ToList(); 13851386 <div class="tools-navigation dw-mod"> 1387 <div class="center-container grid top-container__center-container dw-mod"> 1388 @RenderBlockList(subBlocks) 1389 </div> 1390 </div> 1391 } 13921393 @helper RenderDesktopToolsText() 1394 { 1395 string USPTextFirst = Model.Area.Item.GetItem("Custom").GetItem("CustomSettings").GetString("USPTextFirst"); 1396 string USPTextSecond = Model.Area.Item.GetItem("Custom").GetItem("CustomSettings").GetString("USPSecondText"); 1397 string USPTextThird = Model.Area.Item.GetItem("Custom").GetItem("CustomSettings").GetString("USPTextThird"); 1398 string USPTextFourth = Model.Area.Item.GetItem("Custom").GetItem("CustomSettings").GetString("USPTextFourth"); 13991400 string USPLinkFirst = Model.Area.Item.GetItem("Custom").GetItem("CustomSettings").GetString("USPLinkFirst"); 1401 string USPLinkSecond = Model.Area.Item.GetItem("Custom").GetItem("CustomSettings").GetString("USPLinkSecond"); 1402 string USPLinkThird = Model.Area.Item.GetItem("Custom").GetItem("CustomSettings").GetString("USPLinkThird"); 1403 string USPLinkFourth = Model.Area.Item.GetItem("Custom").GetItem("CustomSettings").GetString("USPLinkFourth"); 1404140514061407 if (!string.IsNullOrEmpty(USPTextFirst) || !string.IsNullOrEmpty(USPTextSecond) || !string.IsNullOrEmpty(USPTextThird) || !string.IsNullOrEmpty(USPTextFourth) ) 1408 { 1409 <div class="grid grid--align-center grid--justify-space-between u-margin-top u-margin-bottom"> 1410 @if (!string.IsNullOrEmpty(USPTextFirst)) 1411 { 1412 if (!string.IsNullOrEmpty(USPLinkFirst)) 1413 { 1414 <a class="usp-link" href="@USPLinkFirst"> 1415 <div class="grid__cell--align-middle-left dw-mod text-white"> 1416 <i class="@Pageview.AreaSettings.GetItem("Custom").GetItem("CustomSettings").GetList("USPIconFirst").SelectedValue custom-fa-icon"></i> 1417 <span class="u-margin-left">@USPTextFirst</span> 1418 </div> 1419 </a> 1420 } 1421 else 1422 { 1423 <div class="grid__cell--align-middle-left dw-mod"> 1424 <i class="@Pageview.AreaSettings.GetItem("Custom").GetItem("CustomSettings").GetList("USPIconFirst").SelectedValue custom-fa-icon"></i> 1425 <span class="u-margin-left">@USPTextFirst</span> 1426 </div> 1427 } 1428 } 14291430 @if (!string.IsNullOrEmpty(USPTextSecond)) 1431 { 1432 if (!string.IsNullOrEmpty(USPLinkSecond)) 1433 { 1434 <a class="usp-link" href="@USPLinkSecond"> 1435 <div class="grid__cell--align-middle-left dw-mod"> 1436 <i class="@Pageview.AreaSettings.GetItem("Custom").GetItem("CustomSettings").GetList("USPIconSecond").SelectedValue custom-fa-icon"></i> 1437 <span class="u-margin-left">@USPTextSecond</span> 1438 </div> 1439 </a> 1440 } 1441 else 1442 { 1443 <div class="grid__cell--align-middle-left dw-mod"> 1444 <i class="@Pageview.AreaSettings.GetItem("Custom").GetItem("CustomSettings").GetList("USPIconSecond").SelectedValue custom-fa-icon"></i> 1445 <span class="u-margin-left">@USPTextSecond</span> 1446 </div> 1447 } 1448 } 14491450 @if (!string.IsNullOrEmpty(USPTextThird)) 1451 { 1452 if (!string.IsNullOrEmpty(USPLinkThird)) 1453 { 1454 <a class="usp-link" href="@USPLinkThird"> 1455 <div class="grid__cell--align-middle-left dw-mod"> 1456 <i class="@Pageview.AreaSettings.GetItem("Custom").GetItem("CustomSettings").GetList("USPIconThird").SelectedValue custom-fa-icon"></i> 1457 <span class="u-margin-left">@USPTextThird</span> 1458 </div> 1459 </a> 1460 } 1461 else 1462 { 1463 <div class="grid__cell--align-middle-left dw-mod"> 1464 <i class="@Pageview.AreaSettings.GetItem("Custom").GetItem("CustomSettings").GetList("USPIconThird").SelectedValue custom-fa-icon"></i> 1465 <span class="u-margin-left">@USPTextThird</span> 1466 </div> 1467 } 1468 } 14691470 @if (!string.IsNullOrEmpty(USPTextFourth)) 1471 { 1472 if (!string.IsNullOrEmpty(USPLinkFourth)) 1473 { 1474 <a class="usp-link" href="@USPLinkFourth"> 1475 <div class="grid__cell--align-middle-left dw-mod"> 1476 <i class="@Pageview.AreaSettings.GetItem("Custom").GetItem("CustomSettings").GetList("USPIconFourth").SelectedValue custom-fa-icon"></i> 1477 <span class="u-margin-left">@USPTextFourth</span> 1478 </div> 1479 </a> 1480 } 1481 else 1482 { 1483 <div class="grid__cell--align-middle-left dw-mod"> 1484 <i class="@Pageview.AreaSettings.GetItem("Custom").GetItem("CustomSettings").GetList("USPIconFourth").SelectedValue custom-fa-icon"></i> 1485 <span class="u-margin-left">@USPTextFourth</span> 1486 </div> 1487 } 1488 } 1489 </div> 1490 } 1491 } 1492149314941495 @helper RenderDesktopNavigation() 1496 { 1497 List<Block> subBlocks = this.headerBlocksPage.GetBlockListById("MasterDesktopNavigation").OrderBy(item => item.SortId).ToList(); 14981499 <nav class="main-navigation dw-mod"> 1500 <div class="center-container top-container__center-container grid grid--align-center dw-mod"> 1501 @RenderBlockList(subBlocks) 1502 </div> 1503 </nav> 1504 } 15051506 @helper RenderDesktopExtra() 1507 { 1508 List<Block> subBlocks = this.headerBlocksPage.GetBlockListById("MasterDesktopExtra").OrderBy(item => item.SortId).ToList(); 15091510 if (subBlocks.Count > 0) 1511 { 1512 <div class="header header-top dw-mod"> 1513 <div class="center-container top-container__center-container grid grid--align-center dw-mod"> 1514 @RenderBlockList(subBlocks) 1515 </div> 1516 </div> 1517 } 1518 } 15191520 @helper RenderDesktopLogo() 1521 { 1522 string firstPageId = Model.Area.FirstActivePage.ID.ToString(); 1523 string topLayout = Model.Area.Item.GetItem("Layout").GetItem("Header").GetList("TopLayout") != null ? Model.Area.Item.GetItem("Layout").GetItem("Header").GetList("TopLayout").SelectedValue : "normal"; 1524 string alignClass = topLayout == "two-lines-centered" || topLayout == "two-lines" ? "grid--align-self-center" : ""; 1525 string logo = Model.Area.Item.GetItem("Layout").GetFile("LogoImage") != null ? Model.Area.Item.GetItem("Layout").GetFile("LogoImage").PathUrlEncoded : "/Files/Images/logo-dynamicweb.png"; 1526 string logoHeight = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Layout").GetString("LogoHeight")) ? Model.Area.Item.GetItem("Layout").GetString("LogoHeight") : "40"; 1527 string businessName = Model.Area.Item.GetItem("Settings").GetString("BusinessName"); 15281529 logoHeight = logoHeight != "0" ? logoHeight : "40"; 1530 if (Path.GetExtension(logo).ToLower() != ".svg") 1531 { 1532 logo = "/Admin/Public/GetImage.ashx?height=" + logoHeight + "&amp;crop=5&amp;Compression=75&amp;image=" + logo; 15331534 if (Pageview.Device.ToString() == "Mobile") 1535 { 1536 logoHeight = "40"; 1537 } 1538 } 1539 else 1540 { 1541 logo = HttpUtility.UrlDecode(logo); 1542 } 15431544 <div class="logo @alignClass dw-mod desktop-logo-container"> 1545 <a href="/Default.aspx?ID=@firstPageId" class="logo__img dw-mod u-block"> 1546 <img class="grid__cell-img logo__img dw-mod" src="@logo" alt="@businessName" /> 1547 </a> 1548 </div> 1549 } 15501551 @helper RenderDesktopMenu() 1552 { 1553 string topLayout = Model.Area.Item.GetItem("Layout").GetItem("Header").GetList("TopLayout") != null ? Model.Area.Item.GetItem("Layout").GetItem("Header").GetList("TopLayout").SelectedValue : "normal"; 1554 string menuAlignment = topLayout == "two-lines-centered" || topLayout == "minimal-right" ? "u-pull--right" : ""; 15551556 bool megaMenu = Model.Area.Item.GetItem("Layout").GetItem("Header").GetList("NavigationMegaMenu").SelectedValue.ToLower() == "true" ? true : false; 1557 string megamenuPromotionImage = Model.Area.Item.GetItem("Layout").GetItem("Header").GetFile("MegamenuPromotionImage") != null ? Model.Area.Item.GetItem("Layout").GetItem("Header").GetFile("MegamenuPromotionImage").PathUrlEncoded : ""; 1558 bool renderPagesInToolBar = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("RenderPagesInToolBar"); 1559 int startLevel = renderPagesInToolBar ? 1 : 0; 15601561 <div class="grid__cell"> 1562 <div class="@menuAlignment"> 1563 @if (!megaMenu) 1564 { 1565 @RenderNavigation(new 1566 { 1567 id = "topnavigation", 1568 cssclass = "menu dw-mod dwnavigation u-full-max-width", 1569 startLevel = 0, 1570 ecomStartLevel = 1, 1571 endlevel = 5, 1572 expandmode = "all", 1573 template = "BaseMenuWithDropdown.xslt" 157415751576 }); 1577 } 1578 else 1579 { 1580 @RenderNavigation(new 1581 { 1582 id = "topnavigation", 1583 cssclass = "menu dw-mod dwnavigation u-full-max-width", 1584 startLevel = @startLevel, 1585 ecomStartLevel = @startLevel + 1, 1586 endlevel = 5, 1587 promotionImage = megamenuPromotionImage, 1588 promotionLink = Model.Area.Item.GetItem("Layout").GetItem("Header").GetString("MegamenuPromotionLink"), 1589 expandmode = "all", 1590 template = "BaseMegaMenu.xslt" 1591 }); 1592 } 1593 </div> 1594 </div> 1595 } 15961597 @helper RenderDesktopActionsMenu() 1598 { 1599 List<Block> subBlocks = this.headerBlocksPage.GetBlockListById("MasterDesktopActionsMenu").OrderBy(item => item.SortId).ToList(); 16001601 <ul class="menu dw-mod"> 1602 @RenderBlockList(subBlocks) 1603 </ul> 1604 } 16051606 @helper RenderLanguageSelector() 1607 { 1608 string topLayout = Model.Area.Item.GetItem("Layout").GetItem("Header").GetList("TopLayout") != null ? Model.Area.Item.GetItem("Layout").GetItem("Header").GetList("TopLayout").SelectedValue : "normal"; 1609 string liClasses = topLayout != "normal" ? "menu__item menu__item--horizontal menu__item--top-level dw-mod u-hidden-xxs" : "menu__item menu__item--horizontal menu--clean dw-mod"; 1610 string menuLinkClass = topLayout != "normal" ? "menu__link" : "header-menu__link"; 1611 string languageViewType = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Layout").GetItem("Header").GetList("LanguageSelector").SelectedValue) ? Model.Area.Item.GetItem("Layout").GetItem("Header").GetList("LanguageSelector").SelectedValue.ToLower() : ""; 1612 bool test = Model.Languages.FirstOrDefault().IsMaster; 1613 if (Model.Languages.Count > 1) { 1614 <li class="@liClasses is-dropdown is-dropdown--no-icon"> 1615 <div class="@menuLinkClass menu__link--icon dw-mod"> 16161617 @foreach (var langnav in Model.Languages) 1618 { 16191620 if (langnav.IsCurrent) 1621 { 1622 string langInfonav = "<span class=\"flag-icon custom-flag flag-icon-" + Dynamicweb.Services.Areas.GetArea(langnav.ID).EcomCountryCode.ToLower() + " u-margin-right\"></span>"; 16231624 @langInfonav 16251626 } 16271628 } 16291630 </div> 1631 <div class="menu menu--dropdown dw-mod"> 1632 @foreach (var lang in Model.Languages) 1633 { 1634 string langInfo = "<span class=\"flag-icon flag-icon-" + Dynamicweb.Services.Areas.GetArea(lang.ID).EcomCountryCode.ToLower() + " u-margin-right\"></span>" + lang.Name; 16351636 if (languageViewType == "flag") 1637 { 1638 langInfo = "<span class=\"flag-icon flag-icon-" + Dynamicweb.Services.Areas.GetArea(lang.ID).EcomCountryCode.ToLower() + "\"></span>"; 1639 } 16401641 if (languageViewType == "name") 1642 { 1643 langInfo = lang.Name; 1644 } 16451646 <a href="/Default.aspx?ID=@lang.Page.ID" class="menu-dropdown__item menu-dropdown__item--link dw-mod">@langInfo</a> 1647 } 1648 </div> 1649 </li> 1650 } 1651 } 16521653 @helper RenderMiniCart() 1654 { 1655 bool navigationItemsHideCart = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("HideCart"); 1656 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 1657 int cartPageId = GetPageIdByNavigationTag("CartPage"); 1658 bool onlyPreview = Model.Area.Item.GetItem("Ecommerce").GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; 16591660 if (!onlyPreview && !navigationItemsHideCart) 1661 { 1662 string topLayout = Model.Area.Item.GetItem("Layout").GetItem("Header").GetList("TopLayout") != null ? Model.Area.Item.GetItem("Layout").GetItem("Header").GetList("TopLayout").SelectedValue : "normal"; 1663 string liClasses = topLayout != "normal" ? "menu__item menu__item--horizontal menu__item--top-level dw-mod" : "menu__item menu__item--horizontal menu--clean dw-mod"; 1664 string menuLinkClass = topLayout != "normal" ? "menu__link" : "header-menu__link"; 1665 string cartProductsCount = Model.Cart.TotalProductsCount.ToString(); 1666 string counterPosition = Model.Area.Item.GetItem("Ecommerce").GetItem("MiniCart").GetList("CounterPosition").SelectedValue; 1667 bool showPrice = Model.Area.Item.GetItem("Ecommerce").GetItem("MiniCart").GetBoolean("ShowPrice"); 1668 string cartProductsTotalPrice = showPrice && Model.Cart.TotalPrice != null ? Model.Cart.TotalPrice.Price.Formatted : ""; 1669 cartProductsTotalPrice = counterPosition == "right" ? cartProductsTotalPrice : ""; 16701671 if (showPrice && counterPosition == "right") 1672 { 1673 cartProductsCount = Translate("Cart") + "(" + cartProductsCount + ")"; 1674 } 167516761677 <li class="@liClasses" id="miniCartWrapper" onmouseenter="Cart.UpdateMiniCart('miniCartWrapper', 'miniCart', 'cartCounter', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')"> 1678 <div class="mini-cart dw-mod"> 1679 <a href="/Default.aspx?ID=@cartPageId&Purge=True" id="miniCartCounterWrap" class="@menuLinkClass menu__link--icon dw-mod js-mini-cart-button"> 1680 <i class="@Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("CartIcon").SelectedValue fa-1_5x"></i> 1681 <div class="mini-cart__counter dw-mod"> 1682 <div class="js-handlebars-root js-mini-cart-counter" id="cartCounter" data-template="MiniCartCounterContent" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=Counter" data-init-onload="false" data-preloader="false"> 1683 <div class="js-mini-cart-counter-content"> 1684 @cartProductsCount 1685 @cartProductsTotalPrice 1686 </div> 1687 </div> 1688 </div> 1689 </a> 1690 @if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 1691 { 1692 <div class="mini-cart-dropdown js-handlebars-root js-mini-cart dw-mod" id="miniCart" data-template="MiniCartContent" data-cart-id="@miniCartFeedPageId" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart" data-init-onload="false"></div> 1693 } 1694 </div> 1695 </li> 1696 } 1697 } 16981699 @helper RenderSignIn() 1700 { 1701 bool navigationItemsHideSignIn = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("HideSignIn"); 1702 string userInitials = ""; 1703 int pageId = Model.TopPage.ID; 1704 int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); 1705 int myDashboardPageId = GetPageIdByNavigationTag("CustomerDashboard"); 1706 int myProfilePageId = GetPageIdByNavigationTag("CustomerProfile"); 1707 object currentLanguage = Model.Area.Item.GetValue("Global:Area.Lang"); 17081709 int myOrdersPageId = GetPageIdByNavigationTag("CustomerOrders"); 1710 int myFavoritesPageId = GetPageIdByNavigationTag("CustomerFavorites"); 1711 int mySavedCardsPageId = GetPageIdByNavigationTag("SavedCards"); 1712 int signInProfilePageId = GetPageIdByNavigationTag("SignInPage"); 1713 bool hideCreateAccountLink = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("SignInHideCreateAccount"); 1714 bool hideMyProfileLink = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("SignInHideProfile"); 1715 bool hideMyOrdersLink = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("SignInHideOrders"); 1716 bool hideMySavedCardsLink = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("SignInHideSavedCards"); 1717 bool hideMyFavoritesLink = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("SignInHideFavorites"); 17181719 string linkStart = "/Default.aspx?ID="; 1720 if (Model.CurrentUser.ID <= 0) 1721 { 1722 linkStart = linkStart + signInProfilePageId + "&RedirectPageId="; 1723 } 17241725 string forgotPasswordPageLink = "/Default.aspx?ID=" + currentLanguage + signInProfilePageId + "&LoginAction=Recovery"; 1726 string myProfilePageLink = linkStart + myProfilePageId; 1727 string myOrdersPageLink = linkStart + myOrdersPageId; 1728 string myFavoritesPageLink = linkStart + myFavoritesPageId; 1729 string mySavedCardsPageLink = linkStart + mySavedCardsPageId; 17301731 if (Model.CurrentUser.ID != 0) 1732 { 17331734 } 17351736 if (!navigationItemsHideSignIn) 1737 { 1738 string topLayout = Model.Area.Item.GetItem("Layout").GetItem("Header").GetList("TopLayout") != null ? Model.Area.Item.GetItem("Layout").GetItem("Header").GetList("TopLayout").SelectedValue : "normal"; 1739 string liClasses = topLayout != "normal" ? "menu__item menu__item--horizontal menu__item--top-level dw-mod u-hidden-xxs" : "menu__item menu__item--horizontal menu__item--clean dw-mod"; 1740 string menuLinkClass = topLayout != "normal" ? "menu__link" : "header-menu__link"; 17411742 <li class="@liClasses is-dropdown is-dropdown--no-icon"> 1743 <div class="@menuLinkClass menu__link--icon dw-mod"> 1744 @if (Model.CurrentUser.ID <= 0) 1745 { 1746 <i class="@Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("SignInProfileIcon").SelectedValue fa-1_5x custom-padding-fa"><span class="custom-link-text">@Translate("LoginNavigationTag")</span></i> 1747 } 1748 else 1749 { 1750 <i class="@Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("SignInProfileIcon").SelectedValue fa-1_5x custom-padding-fa"> 1751 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@pageId" class="u-color-inherit custom-link-text">@Translate("Sign out")</a></i> 175217531754 } 1755 </div> 1756 <div class="menu menu--dropdown sign-in-dropdown dw-mod"> 1757 <ul class="list list--clean dw-mod"> 1758 @if (Model.CurrentUser.ID <= 0) 1759 { 1760 <li> 1761 <label for="SignInModalTrigger" class="btn btn--primary btn--full u-no-margin sign-in-modal-trigger-button dw-mod" onclick="setTimeout(function () { document.getElementById('LoginUsername').focus() }, 10)">@Translate("Sign in")</label> 1762 </li> 17631764 if (!hideCreateAccountLink) 1765 { 1766 <li> 1767 <a href="/default.aspx?ID=@createAccountPageId" class="list__link dw-mod">@Translate("Create account")</a> 1768 </li> 1769 } 17701771 <li> 1772 <a href="@forgotPasswordPageLink" class="list__link dw-mod">@Translate("Forgot your password?")</a> 1773 </li> 1774 if (!hideMyProfileLink || !hideMyOrdersLink || !hideMyFavoritesLink || !hideMySavedCardsLink) 1775 { 1776 <li class="list__seperator dw-mod"></li> 1777 } 1778 } 1779 @if (!hideMyProfileLink) 1780 { 1781 <li> 1782 <a href="@myProfilePageLink" class="list__link dw-mod"><i class="@Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("SignInProfileIcon").SelectedValue u-margin-right"></i>@Translate("My Profile")</a> 1783 </li> 1784 } 1785 @if (!hideMyOrdersLink) 1786 { 1787 <li> 1788 <a href="@myOrdersPageLink" class="list__link dw-mod"><i class="fas fa-list u-margin-right"></i>@Translate("My Orders")</a> 1789 </li> 1790 } 1791 @if (!hideMyFavoritesLink) 1792 { 1793 <li> 1794 <a href="@myFavoritesPageLink" class="list__link dw-mod"><i class="fas fa-@Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("FavoriteIcon").SelectedValue u-margin-right"></i>@Translate("My Favorites")</a> 1795 </li> 1796 } 1797 @if (!hideMySavedCardsLink) 1798 { 1799 <li> 1800 <a href="@mySavedCardsPageLink" class="list__link dw-mod"><i class="fas fa-credit-card u-margin-right"></i>@Translate("My Saved cards")</a> 1801 </li> 1802 } 1803 @if (Model.CurrentUser.ID > 0) 1804 { 1805 if (!hideMyProfileLink || !hideMyOrdersLink || !hideMyFavoritesLink || !hideMySavedCardsLink) 1806 { 1807 <li class="list__seperator dw-mod"></li> 1808 } 1809 <li> 1810 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@pageId" class="list__link dw-mod">@Translate("Sign out")</a> 1811 </li> 1812 } 1813 </ul> 1814 </div> 1815 </li> 1816 } 1817 } 18181819 @helper RenderFavorites() 1820 { 1821 bool navigationItemsHideFavorites = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("HideFavorites"); 1822 int signInProfilePageId = GetPageIdByNavigationTag("SignInPage"); 1823 int myFavoritesPageId = GetPageIdByNavigationTag("CustomerFavorites"); 18241825 string linkStart = "/Default.aspx?ID="; 1826 if (Model.CurrentUser.ID <= 0) 1827 { 1828 linkStart = linkStart + signInProfilePageId + "&RedirectPageId="; 1829 } 18301831 string myFavoritesPageLink = linkStart + myFavoritesPageId; 1832 string topLayout = Model.Area.Item.GetItem("Layout").GetItem("Header").GetList("TopLayout") != null ? Model.Area.Item.GetItem("Layout").GetItem("Header").GetList("TopLayout").SelectedValue : "normal"; 1833 string liClasses = topLayout != "normal" ? "menu__item menu__item--horizontal menu__item--top-level dw-mod u-hidden-xxs" : "menu__item menu__item--horizontal menu--clean dw-mod"; 1834 string menuLinkClass = topLayout != "normal" ? "menu__link" : "header-menu__link"; 18351836 <li class="@liClasses"> 1837 <a href="@myFavoritesPageLink" class="@menuLinkClass menu__link--icon dw-mod"> 1838 <i class="fas fa-@Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("FavoriteIcon").SelectedValue fa-1_5x"></i> 1839 </a> 1840 </li> 1841 } 18421843 @helper RenderHeaderButton() 1844 { 1845 string headerButtonText = Model.Area.Item.GetItem("Layout").GetItem("Header").GetString("HeaderButtonText"); 1846 string headerButtonLink = Model.Area.Item.GetItem("Layout").GetItem("Header").GetString("HeaderButtonLink"); 1847 string headerButtonType = Model.Area.Item.GetItem("Layout").GetItem("Header").GetList("HeaderButtonType") != null ? "btn--" + Model.Area.Item.GetItem("Layout").GetItem("Header").GetList("HeaderButtonType").SelectedName.ToLower() : ""; 18481849 <li class="menu__item menu__item--horizontal menu--clean dw-mod"> 1850 <a class="btn @headerButtonType dw-mod u-no-margin u-margin-top u-margin-left" href="@headerButtonLink">@headerButtonText</a> 1851 </li> 1852 } 18531854 @helper RenderSearchBar(string alignment = "left") 1855 { 1856 string searchFeedId = ""; 1857 string searchSecondFeedId = ""; 1858 int groupsFeedId; 1859 int productsPageId = GetPageIdByNavigationTag("ProductsPage"); 1860 string contentSearchPageLink = GetPageIdByNavigationTag("ContentSearchResults") + "&Areaid=" + Model.Area.ID; 1861 string resultPageLink; 1862 string searchPlaceholder; 1863 string searchType = "product-search"; 1864 string searchTemplate; 1865 string searchContentTemplate = ""; 1866 string searchValue = HttpContext.Current.Request.QueryString.Get("Search") != null ? HttpContext.Current.Request.QueryString.Get("Search") : ""; 1867 bool showGroups = true; 18681869 if (Model.Area.Item.GetItem("Layout").GetList("TopSearch").SelectedValue == "contentSearch") 1870 { 1871 searchFeedId = GetPageIdByNavigationTag("ContentSearchFeed") + "&Areaid=" + Model.Area.ID + "&pagesOnly=true"; 1872 resultPageLink = contentSearchPageLink; 1873 searchPlaceholder = Translate("Search page"); 1874 groupsFeedId = 0; 1875 searchType = "content-search"; 1876 searchTemplate = "SearchPagesTemplate"; 1877 showGroups = false; 1878 } 1879 else if (Model.Area.Item.GetItem("Layout").GetList("TopSearch").SelectedValue == "combinedSearch") 1880 { 1881 searchFeedId = productsPageId + "&feed=true"; 1882 searchSecondFeedId = GetPageIdByNavigationTag("ContentSearchFeed") + "&Areaid=" + Model.Area.ID + "&pagesOnly=true"; 1883 resultPageLink = Converter.ToString(productsPageId); 1884 searchPlaceholder = Translate("Search products or pages"); 1885 groupsFeedId = GetPageIdByNavigationTag("ProductGroupsFeed"); 1886 searchType = "combined-search"; 1887 searchTemplate = "SearchProductsTemplateWrap"; 1888 searchContentTemplate = "SearchPagesTemplateWrap"; 1889 showGroups = Model.Area.Item.GetItem("Layout").GetBoolean("ShowGroupsSelector"); 1890 } 1891 else 1892 { 1893 resultPageLink = Converter.ToString(productsPageId); 1894 searchFeedId = productsPageId + "&feed=true"; 1895 groupsFeedId = GetPageIdByNavigationTag("ProductGroupsFeed"); 1896 searchPlaceholder = Translate("Search products"); 1897 searchTemplate = "SearchProductsTemplate"; 1898 searchType = "product-search"; 1899 showGroups = Model.Area.Item.GetItem("Layout").GetBoolean("ShowGroupsSelector"); 1900 } 19011902 <div class="typeahead typeahead--centered u-color-inherit js-typeahead dw-mod" data-page-size="7" id="ProductSearchBar" data-search-feed-id="@searchFeedId" data-search-second-feed-id="@searchSecondFeedId" data-result-page-id="@resultPageLink" data-groups-page-id="@groupsFeedId" data-search-type="@searchType"> 1903 @if (showGroups) 1904 { 1905 <button type="button" class="btn btn--condensed u-color-light-gray--bg typeahead-group-btn dw-mod js-typeahead-groups-btn" data-group-id="all">@Translate("All")</button> 1906 <ul class="dropdown dropdown--absolute-position u-min-w220px js-handlebars-root js-typeahead-groups-content dw-mod" id="ProductSearchBarGroupsContent" data-template="SearchGroupsTemplate" data-json-feed="/Default.aspx?ID=@groupsFeedId&feedType=productGroups" data-init-onload="false" data-preloader="minimal"></ul> 1907 } 1908 <div class="typeahead-search-field"> 1909 <input type="text" class="u-no-margin u-full-width u-full-height js-typeahead-search-field" placeholder="@searchPlaceholder" value="@searchValue"> 1910 @if (string.IsNullOrEmpty(searchSecondFeedId)) 1911 { 1912 <ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content dw-mod" id="ProductSearchBarContent" data-template="@searchTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly" data-init-onload="false"></ul> 1913 } 1914 else 1915 { 1916 <div class="dropdown dropdown--absolute-position dropdown--combined grid @(alignment == "right" ? "dropdown--right-aligned" : "")"> 1917 <div class="js-handlebars-root js-typeahead-search-content grid__col-sm-12 grid__col--bleed-y" id="ProductSearchBarContent" data-template="@searchTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly" data-init-onload="false"></div> 1918 <div class="js-handlebars-root js-typeahead-additional-search-content grid__col-sm-5 grid__col--bleed-y" id="ContentSearchBarContent" data-template="@searchContentTemplate" data-json-feed="/Default.aspx?ID=@searchSecondFeedId" data-init-onload="false"></div> 1919 </div> 1920 } 1921 </div> 1922 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod js-typeahead-enter-btn"><i class="@Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("SearchIcon").SelectedValue"></i></button> 1923 </div> 1924 } 19251926 @helper RenderMiniSearch() 1927 { 1928 string searchFeedId = ""; 1929 string searchSecondFeedId = ""; 1930 int groupsFeedId; 1931 int productsPageId = GetPageIdByNavigationTag("ProductsPage"); 1932 string contentSearchPageLink = GetPageIdByNavigationTag("ContentSearchResults") + "&Areaid=" + Model.Area.ID; 1933 string resultPageLink; 1934 string searchPlaceholder; 1935 string searchType = "product-search"; 1936 string searchTemplate; 1937 string searchContentTemplate = ""; 1938 string searchValue = HttpContext.Current.Request.QueryString.Get("Search") != null ? HttpContext.Current.Request.QueryString.Get("Search") : ""; 1939 bool showGroups = true; 19401941 if (Model.Area.Item.GetItem("Layout").GetList("TopSearch").SelectedValue == "contentSearch") 1942 { 1943 searchFeedId = GetPageIdByNavigationTag("ContentSearchFeed") + "&Areaid=" + Model.Area.ID + "&pagesOnly=true"; 1944 resultPageLink = contentSearchPageLink; 1945 searchPlaceholder = Translate("Search page"); 1946 groupsFeedId = 0; 1947 searchType = "content-search"; 1948 searchTemplate = "SearchPagesTemplate"; 1949 showGroups = false; 1950 } 1951 else if (Model.Area.Item.GetItem("Layout").GetList("TopSearch").SelectedValue == "combinedSearch") 1952 { 1953 searchFeedId = productsPageId + "&feed=true"; 1954 searchSecondFeedId = GetPageIdByNavigationTag("ContentSearchFeed") + "&Areaid=" + Model.Area.ID + "&pagesOnly=true"; 1955 resultPageLink = Converter.ToString(productsPageId); 1956 searchPlaceholder = Translate("Search products or pages"); 1957 groupsFeedId = GetPageIdByNavigationTag("ProductGroupsFeed"); 1958 searchType = "combined-search"; 1959 searchTemplate = "SearchProductsTemplateWrap"; 1960 searchContentTemplate = "SearchPagesTemplateWrap"; 1961 showGroups = Model.Area.Item.GetItem("Layout").GetBoolean("ShowGroupsSelector"); 1962 } 1963 else 1964 { 1965 resultPageLink = Converter.ToString(productsPageId); 1966 searchFeedId = productsPageId + "&feed=true"; 1967 groupsFeedId = GetPageIdByNavigationTag("ProductGroupsFeed"); 1968 searchPlaceholder = Translate("Search products"); 1969 searchTemplate = "SearchProductsTemplate"; 1970 searchType = "product-search"; 1971 showGroups = Model.Area.Item.GetItem("Layout").GetBoolean("ShowGroupsSelector"); 1972 } 19731974 <li class="menu__item menu__item--horizontal menu__item--top-level u-hidden-xxs is-dropdown is-dropdown--no-icon dw-mod" onmouseover="document.getElementById('headerSearch').focus()"> 1975 <div class="menu__link menu__link--icon dw-mod"> 1976 <i class="@Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("SearchIcon").SelectedValue fa-1_5x custom-padding-fa"><span class="custom-link-text">@Translate("Search")</span></i> 1977 </div> 1978 <div class="menu menu--dropdown u-w380px top-micro-search dw-mod"> 1979 <div class="typeahead js-typeahead" data-page-size="7" id="ProductSearchBar" data-search-feed-id="@searchFeedId" data-search-second-feed-id="@searchSecondFeedId" data-result-page-id="@resultPageLink" data-search-type="@searchType"> 1980 <div class="typeahead-search-field"> 1981 <input type="text" class="u-no-margin u-full-width js-typeahead-search-field" id="headerSearch" placeholder="@searchPlaceholder" value="@searchValue"> 1982 @if (string.IsNullOrEmpty(searchSecondFeedId)) 1983 { 1984 <ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content dw-mod" id="ProductSearchBarContent" data-template="@searchTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly" data-init-onload="false"></ul> 1985 } 1986 else 1987 { 1988 <div class="dropdown dropdown--absolute-position dropdown--combined grid dropdown--right-aligned"> 1989 <div class="js-handlebars-root js-typeahead-search-content grid__col-sm-12 grid__col--bleed-y" id="ProductSearchBarContent" data-template="@searchTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly" data-init-onload="false"></div> 1990 <div class="js-handlebars-root js-typeahead-additional-search-content grid__col-sm-5 grid__col--bleed-y" id="ContentSearchBarContent" data-template="@searchContentTemplate" data-json-feed="/Default.aspx?ID=@searchSecondFeedId" data-init-onload="false"></div> 1991 </div> 1992 } 1993 </div> 1994 </div> 1995 </div> 1996 </li> 1997 } 19981999 @helper RenderImpersonationBar() 2000 { 2001 int impersonationPageId = GetPageIdByNavigationTag("Impersonation"); 20022003 <div class="u-color-warning--bg"> 2004 <div class="center-container top-container__center-container dw-mod"> 2005 @*Impersonation*@ 2006 <div class="grid"> 2007 <div class="grid--align-self-center grid__col-x"> 2008 @if (Model.CurrentSecondaryUser != null && Model.CurrentSecondaryUser.ID > 0) 2009 { 2010 string stopImpersonateTranslation = Translate("Stop impersonation"); 2011 string username = ""; 2012 if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.FirstName) && !string.IsNullOrEmpty(Model.CurrentSecondaryUser.LastName)) 2013 { 2014 username = Model.CurrentSecondaryUser.FirstName + " " + Model.CurrentSecondaryUser.LastName; 2015 } 2016 else if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.Name)) 2017 { 2018 username = Model.CurrentSecondaryUser.Name; 2019 } 2020 else if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.Email)) 2021 { 2022 username = Model.CurrentSecondaryUser.Email; 2023 } 2024 else 2025 { 2026 username = Model.CurrentSecondaryUser.UserName; 2027 } 2028 <div class="grid-cell"> 2029 <div class="u-pull--left u-bold u-margin-top"> 2030 <i class="fas fa-user-secret"></i> 2031 @Pageview.User.UserName<text>&nbsp;</text>@Translate("is impersonating")<text>&nbsp;</text>@username 2032 </div> 2033 <form method="post" class="u-pull--right u-no-margin"> 2034 <input type="submit" class="btn btn--secondary dw-mod u-no-margin" name="DwExtranetRemoveSecondaryUser" value="@stopImpersonateTranslation"> 2035 </form> 2036 </div> 2037 } 2038 else 2039 { 2040 string viewListTranslation = Translate("View the list of users you can impersonate"); 2041 <div class="grid-cell u-bold"> 2042 <i class="fas fa-user-secret"></i> 2043 <a href="/Default.aspx?ID=@impersonationPageId" title="@viewListTranslation" class="u-color-font-black">@viewListTranslation</a> 2044 </div> 2045 } 2046 </div> 2047 </div> 2048 </div> 2049 </div> 2050 } 20512052 </text> 2053 } 2054 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 20552056 @using System 2057 @using System.Web 2058 @using System.Collections.Generic 2059 @using Dynamicweb.Frontend 2060 @using Dynamicweb.Rapido.Blocks.Extensibility 2061 @using Dynamicweb.Rapido.Blocks 20622063 @functions { 2064 BlocksPage footerBlocksPage = BlocksPage.GetBlockPage("Master"); 2065 } 20662067 @{ 2068 string footerColumnOneContent = Model.Area.Item.GetItem("Layout").GetItem("FooterColumnOne") != null ? Model.Area.Item.GetItem("Layout").GetItem("FooterColumnOne").GetString("Content") : ""; 2069 string footerColumnTwoContent = Model.Area.Item.GetItem("Layout").GetItem("FooterColumnTwo") != null ? Model.Area.Item.GetItem("Layout").GetItem("FooterColumnTwo").GetString("Content") : ""; 2070 string footerColumnThreeContent = Model.Area.Item.GetItem("Layout").GetItem("FooterColumnThree") != null ? Model.Area.Item.GetItem("Layout").GetItem("FooterColumnThree").GetString("Content") : ""; 2071 string footerColumnOneHeader = Model.Area.Item.GetItem("Layout").GetItem("FooterColumnOne") != null ? Model.Area.Item.GetItem("Layout").GetItem("FooterColumnOne").GetString("Header") : ""; 2072 string footerColumnTwoHeader = Model.Area.Item.GetItem("Layout").GetItem("FooterColumnTwo") != null ? Model.Area.Item.GetItem("Layout").GetItem("FooterColumnTwo").GetString("Header") : ""; 2073 string footerColumnThreeHeader = Model.Area.Item.GetItem("Layout").GetItem("FooterColumnThree") != null ? Model.Area.Item.GetItem("Layout").GetItem("FooterColumnThree").GetString("Header") : ""; 207420752076 @* TO CHANGE SORT ORDER FOR LINKS IN FOOTER - CHANGE SORTID IN MASTER BLOCKS *@ 20772078 Block masterFooterContent = new Block() 2079 { 2080 Id = "MasterFooterContent", 2081 SortId = 10, 2082 Template = RenderFooter(), 2083 SkipRenderBlocksList = true 2084 }; 2085 footerBlocksPage.Add(MasterBlockId.MasterFooter, masterFooterContent); 208620872088 @* 20892090 if (!string.IsNullOrEmpty(footerColumnOneContent) || !string.IsNullOrEmpty(footerColumnOneHeader)) 2091 { 2092 Block masterFooterColumnOne = new Block 2093 { 2094 Id = "MasterFooterColumnOne", 2095 SortId = 10, 2096 Template = RenderFooterColumn(footerColumnOneHeader, footerColumnOneContent), 2097 Design = new Design 2098 { 2099 Size = "auto", 2100 RenderType = RenderType.Column 2101 } 2102 }; 2103 footerBlocksPage.Add("MasterFooterContent", masterFooterColumnOne); 2104 } 2105210621072108210921102111 if (Model.Area.Item.GetItem("Layout").GetBoolean("FooterNewsletterSignUp")) 2112 { 2113 Block masterFooterNewsletterSignUp = new Block 2114 { 2115 Id = "MasterFooterNewsletterSignUp", 2116 SortId = 40, 2117 Template = RenderFooterNewsletterSignUp(), 2118 Design = new Design 2119 { 2120 Size = "auto", 2121 RenderType = RenderType.Column 2122 } 2123 }; 2124 footerBlocksPage.Add("MasterFooterContent", masterFooterNewsletterSignUp); 2125 } 2126 *@ 2127212821292130 @* 2131 if (Model.Area.Item.GetItem("Layout").GetItems("FooterPayments") != null && Model.Area.Item.GetItem("Layout").GetItems("FooterPayments").Count > 0) 2132 { 2133 Block masterFooterPayments = new Block 2134 { 2135 Id = "MasterFooterPayments", 2136 SortId = 60, 2137 Template = RenderFooterPayments(), 2138 Design = new Design 2139 { 2140 Size = "12", 2141 RenderType = RenderType.Column 2142 } 2143 }; 2144 footerBlocksPage.Add("MasterFooterContent", masterFooterPayments); 2145 } 2146 *@ 21472148 @* 2149 Block masterFooterCopyright = new Block 2150 { 2151 Id = "MasterFooterCopyright", 2152 SortId = 70, 2153 Template = RenderFooterCopyright(), 2154 Design = new Design 2155 { 2156 Size = "12", 2157 RenderType = RenderType.Column 2158 } 2159 }; 2160 footerBlocksPage.Add("MasterFooterContent", masterFooterCopyright); 2161 *@ 21622163 Block masterProductsFooterLinks = new Block 2164 { 2165 Id = "ProductsFooterLinks", 2166 SortId = 6, 2167 Template = ProductsFooterLinks(), 2168 Design = new Design 2169 { 2170 Size = "auto", 2171 RenderType = RenderType.Column 2172 } 2173 }; 2174 footerBlocksPage.Add("MasterFooterContent", masterProductsFooterLinks); 217521762177 Block masterHighlightsFooterLinks = new Block 2178 { 2179 Id = "HighlightsFooterLinks", 2180 SortId = 7, 2181 Template = HighlightsFooterLinks(), 2182 Design = new Design 2183 { 2184 Size = "auto", 2185 RenderType = RenderType.Column 2186 } 2187 }; 2188 footerBlocksPage.Add("MasterFooterContent", masterHighlightsFooterLinks); 21892190 Block masterAfterSalesFooterLinks = new Block 2191 { 2192 Id = "AfterSalesFooterLinks", 2193 SortId = 8, 2194 Template = AfterSalesFooterLinks(), 2195 Design = new Design 2196 { 2197 Size = "auto", 2198 RenderType = RenderType.Column 2199 } 2200 }; 2201 footerBlocksPage.Add("MasterFooterContent", masterAfterSalesFooterLinks); 22022203 Block masterContactLinks = new Block 2204 { 2205 Id = "ContactFooterLinks", 2206 SortId = 9, 2207 Template = ContactFooterLinks(), 2208 Design = new Design 2209 { 2210 Size = "auto", 2211 RenderType = RenderType.Column 2212 } 2213 }; 2214 footerBlocksPage.Add("MasterFooterContent", masterContactLinks); 22152216 if (Model.Area.Item.GetItem("Layout").GetItems("FooterSocialLinks") != null && Model.Area.Item.GetItem("Layout").GetItems("FooterSocialLinks").Count > 0) 2217 { 2218 Block masterFooterSocialLinks = new Block 2219 { 2220 Id = "MasterFooterSocialLinks", 2221 SortId = 5, 2222 Template = RenderFooterSocialLinks(), 2223 Design = new Design 2224 { 2225 Size = "auto", 2226 RenderType = RenderType.Column, 2227 HidePadding = true 2228 } 2229 }; 2230 footerBlocksPage.Add("MasterFooterContent", masterFooterSocialLinks); 2231 } 2232 } 223322342235 @* HELPERS START *@ 223622372238 @helper RenderFooterSocialLinks() 2239 { 2240 string firstPageId = Model.Area.FirstActivePage.ID.ToString(); 2241 string businessName = Model.Area.Item.GetItem("Settings").GetString("BusinessName"); 22422243 string footerlogo = "/Files/Images/logo-dynamicweb.png"; 2244 if (Model.Area.Item.GetItem("Layout").GetItem("MobileTop") != null && Model.Area.Item.GetItem("Layout").GetItem("MobileTop").GetFile("Logo") != null) 2245 { 2246 footerlogo = Model.Area.Item.GetItem("Layout").GetItem("MobileTop").GetFile("Logo").PathUrlEncoded; 2247 } 22482249 if (Path.GetExtension(footerlogo).ToLower() != ".svg") 2250 { 2251 footerlogo = "/Admin/Public/GetImage.ashx?height=40&amp;crop=5&amp;Compression=75&amp;image=" + footerlogo; 2252 } 2253 else 2254 { 2255 footerlogo = HttpUtility.UrlDecode(footerlogo); 2256 } 2257 <div class="footer__content dw-mod"> 2258 <div class="collection dw-mod"> 2259 <div class="grid footer-logo-container dw-mod"> 2260 <div class="logo dw-mod"> 2261 <a href="/Default.aspx?ID=@firstPageId"> 2262 @* FOOTER LOGO *@ 22632264 <img class="grid__cell-img logo__img logo__img--mobile dw-mod" src="@footerlogo" alt="@businessName" /> 2265 </a> 2266 </div> 2267 </div> 2268 <div class="footer-social-links-container dw-mod"> 2269 @foreach (var socialitem in Model.Area.Item.GetItem("Layout").GetItems("FooterSocialLinks")) 2270 { 2271 ListViewModel socialIcon = socialitem.GetValue("Icon") as Dynamicweb.Frontend.ListViewModel; 2272 string socialIconClass = socialIcon.SelectedValue; 2273 string socialIconTitle = socialIcon.SelectedName; 2274 string socialLink = socialitem.GetString("Link"); 2275 <a href="@socialLink" target="_blank" title="@socialIconTitle" class="u-margin-bottom-5px"><i class="@socialIconClass fa-2x"></i></a> 2276 } 2277 </div> 2278 </div> 2279 </div> 2280 } 22812282 @*CHANGE SORT ID ABOVE TO *@ 2283 @helper RenderFooter() 2284 { 2285 List<Block> subBlocks = this.footerBlocksPage.GetBlockListById("MasterFooterContent").OrderBy(item => item.SortId).ToList(); 22862287 <footer class="footer dw-mod"> 2288 <div class="center-container top-container__center-container dw-mod"> 2289 <div class="grid grid--external-bleed-x"> 2290 @RenderBlockList(subBlocks) 2291 </div> 2292 </div> 2293 </footer> 2294 } 2295229622972298 @helper RenderFooterColumn(string header, string content) 2299 { 2300 <div class="footer__heading u-bold dw-mod footer__heading-h4">@header</div> 2301 <div class="footer__content dw-mod"> 2302 @content 2303 </div> 2304 } 23052306 @* 23072308 @helper RenderFooterNewsletterSignUp() 2309 { 2310 string newsletterSignUpPageId = GetPageIdByNavigationTag("NewsletterSignUp").ToString(); 23112312 <div class="footer__heading dw-mod footer__heading-h3">@Translate("Mailing list")</div> 2313 <div class="footer__content dw-mod"> 2314 <p>@Translate("Sign up if you would like to receive occasional treats from us", "Sign up if you would like to receive occasional treats from us").</p> 2315 <form class="form dw-mod" name="NewsletterRedirect" action='/Default.aspx' method="get" enctype="multipart/form-data"> 2316 <input name="ID" value="@newsletterSignUpPageId" type="hidden" /> 2317 <div class="form__field-combi"> 2318 <input name="NewsletterEmail" id="NewsletterEmail" type="text" placeholder='@Translate("Your email address", "Your email address")' /> 2319 <input class="btn btn--primary btn--condensed dw-mod" type="submit" id="Submitter" value='@Translate("Go", "Go")' /> 2320 </div> 2321 </form> 2322 </div> 2323 } 2324 *@ 23252326 @* 2327 @helper RenderFooterPayments() 2328 { 2329 <div class="footer__content dw-mod"> 2330 <div class="collection dw-mod"> 2331 @foreach (var payment in Model.Area.Item.GetItem("Layout").GetItems("FooterPayments")) 2332 { 2333 var paymentItem = payment.GetValue("CardTypeOrVerifiedPayment") as Dynamicweb.Frontend.ListViewModel; 2334 string paymentImage = null; 2335 string paymentTitle = paymentItem.SelectedName; 2336 ListOptionViewModel selected = paymentItem.SelectedOptions.FirstOrDefault(); 2337 if (selected != null) 2338 { 2339 paymentImage = selected.Icon; 2340 } 23412342 <div class="footer__card-type"> 2343 <img src="/Admin/Public/GetImage.ashx?width=60&Compression=75&image=@paymentImage" alt="@paymentTitle" title="@paymentTitle" /> 2344 </div> 2345 } 2346 </div> 2347 </div> 2348 } 2349 *@ 23502351 @* 2352 @helper RenderFooterCopyright() 2353 { 2354 <div class="grid__col-12 footer__copyright dw-mod"> 2355 <p>@Model.Area.Item.GetItem("Layout").GetString("FooterCopyrightText")</p> 2356 </div> 2357 } 2358 *@ 235923602361 @helper ProductsFooterLinks() 2362 { 2363 string footerheadlinefirst = Model.Area.Item.GetItem("Custom").GetItem("CustomSettings").GetString("FooterColumnOneHeader"); 2364 ItemViewModel links = Model.Area.Item.GetItem("Custom").GetItem("CustomSettings"); 236523662367 @* FIRST ROW WITH CUSTOM LINKS *@ 23682369 if (!string.IsNullOrEmpty(footerheadlinefirst)) 2370 { 2371 <div class="footer__heading u-bold dw-mod footer__heading-h4">@footerheadlinefirst</div> 2372 <div class="footer__content dw-mod"> 2373 <ul class="small-list dw-mod"> 2374 @foreach (var productlinks in links.GetItems("FooterColumnOneLink")) 2375 { 2376 string footerlinkText = productlinks.GetString("LinkText"); 2377 string footerlinkUrl = productlinks.GetString("LinkUrl"); 2378 <li> 2379 <a class="font-weight-semi-bold" href="@footerlinkUrl">@footerlinkText</a> 2380 </li> 2381 } 2382 </ul> 2383 </div> 2384 } 2385 } 23862387 @helper HighlightsFooterLinks() 2388 { 2389 string footerheadlinesecond = Model.Area.Item.GetItem("Custom").GetItem("CustomSettings").GetString("FooterColumnTwoHeader"); 2390 ItemViewModel links = Model.Area.Item.GetItem("Custom").GetItem("CustomSettings"); 2391 @* SECOND ROW WITH CUSTOM LINKS *@ 23922393 if (!string.IsNullOrEmpty(footerheadlinesecond)) 2394 { 2395 <div class="footer__heading u-bold dw-mod footer__heading-h4">@footerheadlinesecond</div> 2396 <div class="footer__content dw-mod"> 2397 <ul class="small-list dw-mod"> 2398 @foreach (var highlightslinks in links.GetItems("FooterColumnTwoLink")) 2399 { 2400 string footerlinkText = highlightslinks.GetString("LinkTextSecondary"); 2401 string footerlinkUrl = highlightslinks.GetString("LinkUrlSecondary"); 2402 <li> 2403 <a class="font-weight-semi-bold" href="@footerlinkUrl">@footerlinkText</a> 2404 </li> 2405 } 2406 </ul> 2407 </div> 24082409 } 2410 } 24112412 @helper AfterSalesFooterLinks() 2413 { 2414 string footerheadlinethird = Model.Area.Item.GetItem("Custom").GetItem("CustomSettings").GetString("FooterColumnThreeHeader"); 2415 ItemViewModel links = Model.Area.Item.GetItem("Custom").GetItem("CustomSettings"); 24162417 @* THIRD ROW WITH CUSTOM LINKS *@ 2418 if (!string.IsNullOrEmpty(footerheadlinethird)) 2419 { 2420 <div class="footer__heading u-bold dw-mod footer__heading-h4">@footerheadlinethird</div> 24212422 <div class="footer__content dw-mod"> 2423 <ul class="small-list dw-mod "> 24242425 @foreach (var aftersaleslinks in links.GetItems("FooterColumnThreeLink")) 2426 { 2427 string footerlinkText = aftersaleslinks.GetString("LinkTextThird"); 2428 string footerlinkUrl = aftersaleslinks.GetString("LinkUrlThird"); 2429 <li> 2430 <a class="font-weight-semi-bold" href="@footerlinkUrl">@footerlinkText</a> 2431 </li> 2432 } 24332434 </ul> 2435 </div> 24362437 } 2438 } 24392440 @helper ContactFooterLinks() 2441 { 24422443 @* FOURTH ROW WITH CUSTOM LINKS *@ 24442445 ItemViewModel links = Model.Area.Item.GetItem("Custom").GetItem("CustomSettings").GetItem("ContactInformationRow"); 2446 string header = links.GetString("Header"); 2447 string companyName = links.GetString("CompanyName"); 2448 string companyDepartment = links.GetString("CompanyDepartment"); 2449 string companyAddress = links.GetString("CompanyAddress"); 2450 string companyZip = links.GetString("CompanyZip"); 2451 string companyCity = links.GetString("CompanyCity"); 2452 string companyCountry = links.GetString("CompanyCountry"); 2453 string companyPhone = links.GetString("CompanyPhone"); 2454 string companySalesEmail = links.GetString("CompanySalesEmail"); 2455 string companyPurchaseEmail = links.GetString("CompanyPurchaseEmail"); 24562457 if (!string.IsNullOrEmpty(header)) { 2458 <div class="footer__heading u-bold dw-mod footer__heading-h4">@header</div> 2459 <div class="footer__content dw-mod"> 2460 <ul class="list list--clean"> 2461 <li class="u-uppercase">@companyName</li> 2462 <li>@companyDepartment</li> 2463 <li>@companyAddress</li> 2464 <li>@companyZip</li> 2465 <li>@companyCity</li> 2466 <li>@companyCountry</li> 2467 <li><a href="tel:@companyPhone">@companyPhone</a></li> 2468 <li><a class="u-margin-top" href="mailto:@companySalesEmail">@companySalesEmail</a></li> 2469 <li><a href="mailto:@companyPurchaseEmail">@companyPurchaseEmail</a></li> 2470 </ul> 2471 <p> 2472 <ul class="small-list dw-mod"> 2473 @foreach (var contactlinks in links.GetItems("CompanyContact")) 2474 { 2475 string footerlinkText = contactlinks.GetString("LinkTextFourth"); 2476 string footerlinkUrl = contactlinks.GetString("LinkUrlFourth"); 2477 <li> 2478 <a class="font-weight-semi-bold" href="@footerlinkUrl">@footerlinkText</a> 2479 </li> 2480 } 2481 </ul> 2482 </p> 2483 </div> 2484 } 2485 } 248624872488248924902491 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 24922493 @using System 2494 @using System.Web 2495 @using System.Collections.Generic 2496 @using Dynamicweb.Rapido.Blocks.Extensibility 2497 @using Dynamicweb.Rapido.Blocks 24982499 @{ 2500 BlocksPage miniCartBlocksPage = BlocksPage.GetBlockPage("Master"); 2501 bool navigationItemsHideCart = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("HideCart"); 25022503 if (!navigationItemsHideCart) 2504 { 2505 Block miniCartScriptTemplates = new Block() 2506 { 2507 Id = "MasterMiniCartTemplates", 2508 SortId = 1, 2509 Template = RenderMiniCartScriptTemplates(), 2510 SkipRenderBlocksList = true, 2511 BlocksList = new List<Block> 2512 { 2513 new Block { 2514 Id = "MiniCartHeader", 2515 SortId = 10, 2516 Template = RenderMiniCartHeader() 2517 }, 2518 new Block { 2519 Id = "MiniCartOrderLines", 2520 SortId = 20, 2521 Template = RenderMiniCartOrderLines() 2522 }, 2523 new Block { 2524 Id = "MiniCartFees", 2525 SortId = 30, 2526 Template = RenderMiniCartFees() 2527 }, 2528 new Block { 2529 Id = "MiniCartPoints", 2530 SortId = 40, 2531 Template = RenderMiniCartPoints() 2532 }, 2533 new Block { 2534 Id = "MiniCartTotal", 2535 SortId = 50 , 2536 Template = RenderMiniCartTotal() 2537 } 2538 } 2539 }; 25402541 miniCartBlocksPage.Add(MasterBlockId.MasterBottomSnippets, miniCartScriptTemplates); 2542 } 2543 } 25442545 @helper RenderMiniCartScriptTemplates() 2546 { 2547 List<Block> subBlocks = this.masterPage.GetBlockListById("MasterMiniCartTemplates").OrderBy(item => item.SortId).ToList(); 25482549 int cartPageId = GetPageIdByNavigationTag("CartPage"); 2550 bool showPriceInMiniCartCounter = Model.Area.Item.GetItem("Ecommerce").GetItem("MiniCart").GetBoolean("ShowPrice"); 2551 showPriceInMiniCartCounter = Model.Area.Item.GetItem("Ecommerce").GetItem("MiniCart").GetList("CounterPosition").SelectedValue == "right" ? showPriceInMiniCartCounter : false; 2552 showPriceInMiniCartCounter = Pageview.Device.ToString() == "Mobile" ? false : showPriceInMiniCartCounter; 2553 bool useGoogleTagManager = !string.IsNullOrEmpty(Pageview.AreaSettings.GetItem("Settings").GetString("GoogleTagManagerID")); 2554 bool onlyPreview = Model.Area.Item.GetItem("Ecommerce").GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; 2555 string addingToCartNotification = Model.Area.Item.GetItem("Ecommerce").GetItem("MiniCart").GetList("AddToCartNotificationType") != null ? Model.Area.Item.GetItem("Ecommerce").GetItem("MiniCart").GetList("AddToCartNotificationType").SelectedValue : ""; 2556 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 255725582559 <script id="MiniCartCounterContent" type="text/x-template"> 2560 {{#.}} 2561 <div class="js-mini-cart-counter-content dw-mod"> 2562 @if (showPriceInMiniCartCounter) { 2563 @Translate("Cart")<text>({{numberofproducts}}) {{totalprice}}</text> 2564 } else { 2565 <text>{{numberofproducts}}</text> 2566 } 2567 </div> 2568 {{/.}} 2569 </script> 25702571 <script id="MiniCartContent" type="text/x-template"> 2572 {{#.}} 2573 @if (useGoogleTagManager) 2574 { 2575 <text>{{{googleEnchantImpressionEmptyCart OrderLines}}}</text> 2576 } 2577 <div class="mini-cart-dropdown__inner {{isempty}} dw-mod"> 2578 <h4 class="u-ta-center u-no-margin u-margin-bottom u-margin-top">@Translate("Shopping cart")</h4> 2579 <div class="mini-cart-dropdown__body dw-mod"> 2580 <table class="table mini-cart-table dw-mod"> 2581 @RenderBlockList(subBlocks) 2582 </table> 2583 </div> 25842585 <table class="table mini-cart-table dw-mod"> 2586 <tr class="mini-cart-orderlines__footer dw-mod"> 2587 <td colspan="2"><button type="button" class="btn btn--secondary u-pull--left u-no-margin dw-mod btn--sm" onclick="googleEnchantImpressionEmptyCart(); Cart.EmptyCart(event);">@Translate("Empty cart")</button></td> 2588 <td colspan="2" class="u-ta-right"><a href="/Default.aspx?ID=@cartPageId" class="btn btn--primary u-pull--right u-no-margin dw-mod btn--sm">@Translate("Proceed to checkout")</a></td> 2589 </tr> 2590 </table> 2591 </div> 2592 {{/.}} 2593 </script> 25942595 <script id="MiniCartOrderline" type="text/x-template"> 2596 <tr class="{{isempty}}"> 2597 <td><a href="{{link}}" class="{{hideimage}}"><img src="/Admin/Public/GetImage.ashx?width=50&height=50&crop=5&Compression=75&image={{image}}" alt="{{name}}"></a></td> 2598 <td> 2599 <a href="{{link}}" class="mini-cart-orderlines__name" title="{{name}}">{{name}}</a> 2600 {{#if variantname}} 2601 <a href="{{link}}" class="mini-cart-orderlines__name mini-cart-orderlines__name--small">{{variantname}}</a> 2602 {{/if}} 2603 {{#if unitname}} 2604 <div class="mini-cart-orderlines__name mini-cart-orderlines__name--small">{{unitname}}</div> 2605 {{/if}} 2606 </td> 2607 <td class="u-ta-right">{{quantity}}</td> 2608 <td class="u-ta-right"> 2609 {{#if pointsTotal}} 2610 <span class="u-color--loyalty-points">{{pointsTotal}}</span> @Translate("points") 2611 {{else}} 2612 {{totalprice}} 2613 {{/if}} 2614 </td> 2615 </tr> 2616 </script> 26172618 <script id="MiniCartOrderlineDiscount" type="text/x-template"> 2619 <tr class="table__row--no-border {{isempty}}"> 2620 <td>&nbsp;</td> 2621 <td><div class="mini-cart-orderlines__name dw-mod">{{name}}</div></td> 2622 <td class="u-ta-right">&nbsp;</td> 2623 <td class="u-ta-right">{{totalprice}}</td> 2624 </tr> 2625 </script> 26262627 if (!onlyPreview && addingToCartNotification == "modal") 2628 { 2629 <div id="LastAddedProductModal" data-template="LastAddedProductTemplate"></div> 26302631 <script id="LastAddedProductTemplate" type="text/x-template"> 2632 <!-- Trigger for the login modal --> 2633 <input type="checkbox" id="LastAddedProductModalTrigger" class="modal-trigger" /> 26342635 <!-- Login modal --> 2636 <div class="modal-container"> 2637 <label for="LastAddedProductModalTrigger" class="modal-overlay"></label> 2638 <div class="modal modal--md"> 2639 <div class="modal__header"> 2640 <h2>@Translate("Product is added to the cart")</h2> 2641 </div> 2642 <div class="modal__body"> 2643 <div class="grid"> 2644 <div> 2645 <a href="{{productInfo.link}}"><img src="{{productInfo.image}}" alt="{{productInfo.name}}" /></a> 2646 </div> 2647 <div class="u-padding"> 2648 <span>{{quantity}}</span> x 2649 </div> 2650 <div class="grid__col-auto"> 2651 <div>{{productInfo.name}}</div> 2652 {{#if productInfo.variantName}} 2653 <small class="u-margin-bottom-5px">{{productInfo.variantName}}</small> 2654 {{/if}} 2655 {{#if productInfo.unitName}} 2656 <small class="u-margin-bottom-5px">{{productInfo.unitName}}</small> 2657 {{/if}} 2658 </div> 2659 </div> 2660 <div class="modal__footer u-margin-top--lg"> 2661 <label class="btn btn--secondary u-pull--left u-no-margin dw-mod btn--sm" for="LastAddedProductModalTrigger">@Translate("Continue shopping")</label> 2662 <a href="/cart" class="btn btn--primary u-pull--right u-no-margin dw-mod btn--sm">@Translate("Proceed to checkout")</a> 2663 </div> 2664 </div> 2665 <label class="modal__close-btn" for="LastAddedProductModalTrigger"></label> 2666 </div> 2667 </div> 2668 </script> 2669 <script> 2670 document.addEventListener('addToCart', function (event) { 2671 Cart.ShowLastAddedProductModal(event.detail); 2672 }); 2673 </script> 2674 } 2675 else if (!onlyPreview && addingToCartNotification == "toggle") 2676 { 2677 <script> 2678 document.addEventListener('addToCart', function () { 2679 Cart.ToggleMiniCart('miniCartWrapper', 'miniCart', 'cartCounter', '@miniCartFeedPageId'); 2680 }); 2681 </script> 2682 } 2683 } 26842685 @helper RenderMiniCartHeader() { 2686 <thead> 2687 <tr> 2688 <td>&nbsp;</td> 2689 <td>@Translate("Product")</td> 2690 <td class="u-ta-right">@Translate("Qty")</td> 2691 <td class="u-ta-right" width="120">@Translate("Price")</td> 2692 </tr> 2693 </thead> 2694 } 26952696 @helper RenderMiniCartOrderLines() { 2697 <text> 2698 {{#OrderLines}} 2699 {{#ifCond template "===" "CartOrderline"}} 2700 {{>MiniCartOrderline}} 2701 {{/ifCond}} 2702 {{#ifCond template "===" "CartOrderlineMobile"}} 2703 {{>MiniCartOrderline}} 2704 {{/ifCond}} 2705 {{#ifCond template "===" "CartOrderlineDiscount"}} 2706 {{>MiniCartOrderlineDiscount}} 2707 {{/ifCond}} 2708 {{/OrderLines}} 2709 </text> 2710 } 27112712 @helper RenderMiniCartFees() { 2713 <tr> 2714 <td><i class="fas fa-credit-card"></i></td> 2715 <td>{{paymentmethod}}</td> 2716 <td colspan="2" class="u-ta-right" width="130">{{paymentfee}}</td> 2717 </tr> 2718 <tr> 2719 <td><i class="fas fa-truck"></i></td> 2720 <td>{{shippingmethod}}</td> 2721 <td colspan="2" class="u-ta-right" width="130">{{shippingfee}}</td> 2722 </tr> 2723 } 27242725 @helper RenderMiniCartPoints() { 2726 <text> 2727 {{#if earnings}} 2728 <tr> 2729 <td colspan="2">@Translate("Earnings")</td> 2730 <td colspan="2" class="u-ta-right" width="130"><span class="u-color--loyalty-points">{{earnings}}</span> @Translate("points")</td> 2731 </tr> 2732 {{/if}} 2733 </text> 2734 } 27352736 @helper RenderMiniCartTotal() { 2737 <tr class="mini-cart-totals dw-mod"> 2738 <td colspan="2">@Translate("Total")</td> 2739 <td class="u-ta-right">{{numberofproducts}}</td> 2740 <td class="u-ta-right" width="130">{{totalprice}}</td> 2741 </tr> 2742 } 2743 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 27442745 @using System 2746 @using System.Web 2747 @using System.Collections.Generic 2748 @using Dynamicweb.Rapido.Blocks.Extensibility 2749 @using Dynamicweb.Rapido.Blocks 2750 @using Dynamicweb.Ecommerce.Common 27512752 @{ 2753 BlocksPage referencesBlocksPage = BlocksPage.GetBlockPage("Master"); 27542755 Block masterScriptReferences = new Block() 2756 { 2757 Id = "MasterScriptReferences", 2758 SortId = 1, 2759 Template = RenderMasterScriptReferences() 2760 }; 2761 referencesBlocksPage.Add(MasterBlockId.MasterReferences, masterScriptReferences); 2762 } 27632764 @helper RenderMasterScriptReferences() 2765 { 2766 <script defer src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script> 2767 <script defer src="/Files/Templates/Designs/Rapido/js/handlebars-v4.0.11.js"></script> 2768 <script defer src="/Files/Templates/Designs/Rapido/js/polyclip.js"></script> 2769 <script defer src="/Files/Templates/Designs/Rapido/js/master.min.js"></script> 2770 <script defer src="/Files/Templates/Designs/Rapido/js/nz/main.js"></script> 2771 <script> 2772 // Picture element HTML5 shiv 2773 document.createElement("picture"); 2774 </script> 277527762777 if (Model.Area.Item.GetItem("Settings").GetBoolean("UseCustomJavascript")) 2778 { 2779 <script src="/Files/Templates/Designs/Rapido/js/custom.min.js" defer></script> 2780 } 2781 } 2782 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 27832784 @using System 2785 @using System.Web 2786 @using System.Collections.Generic 2787 @using Dynamicweb.Rapido.Blocks.Extensibility 2788 @using Dynamicweb.Rapido.Blocks 27892790 @{ 2791 BlocksPage searchBlocksPage = BlocksPage.GetBlockPage("Master"); 2792 bool navigationItemsHideSearch = Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("HideSearch"); 27932794 if (!navigationItemsHideSearch) 2795 { 2796 Block masterSearchScriptTemplates = new Block() 2797 { 2798 Id = "MasterSearchScriptTemplates", 2799 SortId = 1, 2800 Template = RenderSearchScriptTemplates() 2801 }; 28022803 searchBlocksPage.Add(MasterBlockId.MasterBottomSnippets, masterSearchScriptTemplates); 2804 } 2805 } 28062807 @helper RenderSearchScriptTemplates() 2808 { 2809 int productsPageId = GetPageIdByNavigationTag("ProductsPage"); 2810 string contentSearchPageLink = GetPageIdByNavigationTag("ContentSearchResults") + "&Areaid=" + Model.Area.ID; 2811 bool useFacebookPixel = !string.IsNullOrWhiteSpace(Pageview.AreaSettings.GetItem("Settings").GetString("FacebookPixelID")); 2812 bool onlyPreview = Model.Area.Item.GetItem("Ecommerce").GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; 2813 bool useGoogleTagManager = !string.IsNullOrEmpty(Model.Area.Item.GetItem("Settings").GetString("GoogleTagManagerID")); 28142815 <script id="SearchGroupsTemplate" type="text/x-template"> 2816 {{#.}} 2817 <li class="dropdown__item dw-mod" onclick="Search.UpdateGroupSelection(this)" data-group-id="{{id}}">{{name}}</li> 2818 {{/.}} 2819 </script> 28202821 <script id="SearchProductsTemplate" type="text/x-template"> 2822 {{#each .}} 2823 {{#Product}} 2824 {{#ifCond template "!==" "SearchMore"}} 2825 <li class="dropdown__item dropdown__item--seperator dw-mod"> 2826 @if (useFacebookPixel) 2827 { 2828 <text>{{{facebookPixelSearch name number priceDouble currency searchParameter}}}</text> 2829 } 2830 @if (useGoogleTagManager) 2831 { 2832 <text>{{{googleEnchantImpression 'Search results' currency googleImpression}}}</text> 2833 } 2834 <div> 2835 <a href="{{link}}" class="js-typeahead-link u-color-inherit u-pull--left" onclick="@*{{googleImpressionClick}}*@" title="{{name}}"> 2836 <div class="u-margin-right u-pull--left {{noimage}} u-hidden-xs u-hidden-xxs"><img src="/Admin/Public/GetImage.ashx?width=45&height=36&crop=5&FillCanvas=True&Compression=75&image={{image}}" alt="{{name}}"></div> 2837 <div class="u-pull--left"> 2838 <div class="u-bold u-max-w220px u-truncate-text js-typeahead-name">{{name}}</div> 2839 </div> 2840 </a> 2841 <div class="u-margin-left u-pull--right u-w80px"> 2842 @* 2843 <button class="btn btn--primary btn--condensed btn--full u-no-margin dw-mod {{hideBuyOptions}} js-ignore-click-outside" 2844 onclick="Cart.AddToCart(event, { 2845 id: '{{productId}}', 2846 quantity: 1, 2847 productInfo: {{productInfo}} 2848 }); {{facebookPixelAction}}"> 2849 <i class="@Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("CartIcon").SelectedValue js-ignore-click-outside"></i> 2850 </button> 2851 *@ 2852 <a href="{{link}}" onclick="@*{{googleImpressionClick}}*@" class="btn btn--primary btn--condensed btn--full u-no-margin dw-mod js-ignore-click-outside" title="@Translate("View")">@Translate("View")</a> 2853 </div> 2854 </div> 2855 </li> 2856 {{/ifCond}} 2857 {{#ifCond template "===" "SearchMore"}} 2858 {{>SearchMoreProducts}} 2859 {{/ifCond}} 2860 {{/Product}} 2861 {{else}} 2862 <li class="dropdown__item dropdown__item--seperator dw-mod"> 2863 @Translate("Your search gave 0 results") 2864 </li> 2865 {{/each}} 2866 </script> 28672868 <script id="SearchMoreProducts" type="text/x-template"> 2869 <li class="dropdown__item dropdown__item--not-selectable {{stickToBottom}} dw-mod"> 2870 <a href="/Default.aspx?ID=@productsPageId&Search={{searchParameter}}&GroupID={{groupId}}" class="btn btn--primary btn--full u-no-margin dw-mod js-typeahead-link"> 2871 @Translate("View all") 2872 </a> 2873 </li> 2874 </script> 28752876 <script id="SearchMorePages" type="text/x-template"> 2877 <li class="dropdown__item dropdown__item--not-selectable {{stickToBottom}} dw-mod"> 2878 <a href="/Default.aspx?ID=@contentSearchPageLink&Search={{searchParameter}}" class="btn btn--primary btn--full u-no-margin dw-mod js-typeahead-link"> 2879 @Translate("View all") 2880 </a> 2881 </li> 2882 </script> 28832884 <script id="SearchPagesTemplate" type="text/x-template"> 2885 {{#each .}} 2886 {{#ifCond template "!==" "SearchMore"}} 2887 <li class="dropdown__item dropdown__item--seperator dw-mod"> 2888 <div> 2889 <a href="/Default.aspx?ID={{id}}" class="js-typeahead-link u-pull--left u-color-inherit"> 2890 <div class="u-margin-right u-pull--left"><i class="fa {{icon}} u-w20px u-ta-center"></i></div> 2891 <div class="u-pull--left"> 2892 <div class="u-bold u-truncate-text u-max-w220px js-typeahead-name">{{name}}</div> 2893 </div> 2894 </a> 2895 </div> 2896 </li> 2897 {{/ifCond}} 2898 {{#ifCond template "===" "SearchMore"}} 2899 {{>SearchMorePages}} 2900 {{/ifCond}} 2901 {{else}} 2902 <li class="dropdown__item dropdown__item--seperator dw-mod"> 2903 @Translate("Your search gave 0 results") 2904 </li> 2905 {{/each}} 2906 </script> 29072908 <script id="SearchPagesTemplateWrap" type="text/x-template"> 2909 <div class="dropdown__column-header">@Translate("Pages")</div> 2910 <ul class="dropdown__list u-min-w220px u-full-width u-margin-bottom dw-mod"> 2911 {{>SearchPagesTemplate}} 2912 </ul> 2913 </script> 29142915 <script id="SearchProductsTemplateWrap" type="text/x-template"> 2916 <div class="dropdown__column-header">@Translate("Products")</div> 2917 <ul class="dropdown__list u-min-w220px u-full-width u-margin-bottom dw-mod"> 2918 {{>SearchProductsTemplate}} 2919 </ul> 2920 </script> 2921 } 292229232924 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 29252926 @using System 2927 @using System.Web 2928 @using System.Collections.Generic 2929 @using Dynamicweb.Rapido.Blocks.Extensibility 2930 @using Dynamicweb.Rapido.Blocks 29312932 @{ 2933 BlocksPage bottomSnippetsBlocksPage = BlocksPage.GetBlockPage("Master"); 29342935 Block primaryBottomSnippets = new Block() 2936 { 2937 Id = "MasterJavascriptInitializers", 2938 SortId = 1, 2939 Template = RenderPrimaryBottomSnippets() 2940 }; 2941 bottomSnippetsBlocksPage.Add(MasterBlockId.MasterReferences, primaryBottomSnippets); 2942 } 29432944 @helper RenderPrimaryBottomSnippets() { 2945 bool isWireframeMode = Model.Area.Item.GetItem("Settings").GetBoolean("WireframeMode") != null ? Model.Area.Item.GetItem("Settings").GetBoolean("WireframeMode") : false; 2946 bool useGoogleTagManager = !string.IsNullOrEmpty(Pageview.AreaSettings.GetItem("Settings").GetString("GoogleTagManagerID")); 29472948 @*<script> 2949 Wireframe.Init(@Converter.ToString(isWireframeMode).ToLower()); 2950 </script>*@ 295129522953 if (useGoogleTagManager) 2954 { 2955 <script async> 2956 document.addEventListener('addToCart', function(event) { 2957 var googleImpression = event.detail.cartItem.productInfo.googleImpression; 2958 dataLayer.push({ 2959 'event': 'addToCart', 2960 'ecommerce': { 2961 'currencyCode': '@Dynamicweb.Ecommerce.Services.Currencies.GetDefaultCurrency()', 2962 'add': { 2963 'products': [{ 2964 'name': googleImpression.name, 2965 'id': googleImpression.id, 2966 'price': googleImpression.price, 2967 'brand': googleImpression.brand, 2968 'category': googleImpression.category, 2969 'variant': googleImpression.variant, 2970 'quantity': event.detail.cartItem.quantity 2971 }] 2972 } 2973 } 2974 }); 2975 }); 2976 </script> 2977 } 29782979 <!--$$Javascripts--> 2980 } 2981 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 29822983 @using System 2984 @using System.Web 2985 @using System.Collections.Generic 2986 @using Dynamicweb.Rapido.Blocks 29872988 @{ 2989 BlocksPage masterBlocksBlocksPage = BlocksPage.GetBlockPage("Master"); 29902991 } 29922993 <!DOCTYPE html> 29942995 <html lang="@Pageview.Area.CultureInfo.TwoLetterISOLanguageName"> 2996 <head> 2997 <meta charset="utf-8" /> 2998 <title>@Model.Title</title> 2999 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> 3000 @if (Dynamicweb.Context.Current.Request.Url.Host.EndsWith("nozebrahosting.dk") || Dynamicweb.Context.Current.Request.Url.Host.EndsWith("dynamicweb.dk")) 3001 { 3002 <meta name="robots" content="noindex, nofollow"> 3003 } 30043005 @if (canonical.Contains("groupid") || canonical.Contains("productid")) 3006 { 3007 @RenderSnippet("canonical") 3008 } 30093010 else 3011 { 3012 <link rel="canonical" href="@canonical"> 3013 } 30143015 <meta name="description" content="@Pageview.Page.Description"> 3016 <meta name="keywords" content="@Pageview.Page.Keywords"> 30173018 @{ 3019 string GoogleTagManagerID = Model.Area.Item.GetItem("Settings").GetString("GoogleTagManagerID") != null ? Model.Area.Item.GetItem("Settings").GetString("GoogleTagManagerID") : ""; 30203021 if (!string.IsNullOrWhiteSpace(GoogleTagManagerID)) 3022 { 3023 <script async> 3024 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 3025 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 3026 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 3027 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 3028 })(window,document,'script','dataLayer','@GoogleTagManagerID'); 3029 </script> 3030 } 3031 } 303230333034 <!-- Favicon --> 3035 <link href="@favicon" rel="icon" type="image/png"> 303630373038 @if (ie9String || ie10String || ie11String || firefoxNewest || firefoxSecondV || firefoxThirdV) 3039 { 3040 var family = string.Join("%7C", fonts.Where(x => !string.IsNullOrEmpty(x)).Distinct().Select(x => string.Format("{0}:100,200,300,400,500,600,700,800,900", x))); 30413042 <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/css/fontawesome-all.min.css"> 3043 <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/base/base.min.css" type="text/css"> 3044 <link id="rapidoCss" rel="stylesheet" href="@autoCssLink" type="text/css"> 3045 <link id="igniteCss" type="text/css" href="/Files/Templates/Designs/Rapido/css/nz/main.css?v=@assetsVersion" rel="stylesheet"> 3046 <link href="https://fonts.googleapis.com/css?family=@family" rel="stylesheet"> 3047 } 30483049 else 3050 { 30513052 var family = string.Join("%7C", fonts.Where(x => !string.IsNullOrEmpty(x)).Distinct().Select(x => string.Format("{0}:100,200,300,400,500,600,700,800,900", x))); 3053 <style> 3054 .fal,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-chart-line:before{content:"\f201"}.fa-compass:before{content:"\f14e"}.fa-hands-helping:before{content:"\f4c4"}.fa-life-ring:before{content:"\f1cd"}.fa-search:before{content:"\f002"}.fa-user:before{content:"\f007"}@@font-face{font-family:Font Awesome\ 5 Pro;font-style:normal;font-weight:300;src:url(/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/webfonts/fa-light-300.eot);src:url(/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/webfonts/fa-light-300.eot?#iefix) format("embedded-opentype"),url(/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/webfonts/fa-light-300.woff2) format("woff2"),url(/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/webfonts/fa-light-300.woff) format("woff"),url(/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/webfonts/fa-light-300.ttf) format("truetype"),url(/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/webfonts/fa-light-300.svg#fontawesome) format("svg")}.fal{font-weight:300}@@font-face{font-family:Font Awesome\ 5 Pro;font-style:normal;font-weight:400;src:url(/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/webfonts/fa-regular-400.eot);src:url(/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/webfonts/fa-regular-400.woff2) format("woff2"),url(/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/webfonts/fa-regular-400.woff) format("woff"),url(/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/webfonts/fa-regular-400.ttf) format("truetype"),url(/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/webfonts/fa-regular-400.svg#fontawesome) format("svg")}.fal{font-family:Font Awesome\ 5 Pro}@@font-face{font-family:Font Awesome\ 5 Pro;font-style:normal;font-weight:900;src:url(/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/webfonts/fa-solid-900.eot);src:url(/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/webfonts/fa-solid-900.woff2) format("woff2"),url(/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/webfonts/fa-solid-900.woff) format("woff"),url(/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/webfonts/fa-solid-900.ttf) format("truetype"),url(/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fas{font-family:Font Awesome\ 5 Pro;font-weight:900}html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}main{display:block}a{background-color:transparent;-webkit-text-decoration-skip:objects}img{border-style:none}button,input{font:inherit;margin:0}button,input{overflow:visible}button{text-transform:none}[type=submit],button{-webkit-appearance:button}[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}[type=checkbox]{box-sizing:border-box;padding:0}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}html{box-sizing:border-box;font-size:62.5%;height:100%;overflow-y:auto}*,::after,::before{box-sizing:inherit}body{font-size:1.6rem;line-height:2.4rem;font-weight:400;font-family:Roboto,Helvetica,Arial,sans-serif;color:#222}a{color:#222;text-decoration:none;word-wrap:break-word}ul{list-style:circle none}ul{padding-left:0;margin-top:0}ul ul{margin:1.5rem 0 1.5rem 3rem}li{margin-bottom:1rem}img{display:table;max-width:100%}input[type=password],input[type=text]{appearance:none;background-color:#fff;border:1px solid #d1d1d1;box-shadow:none;box-sizing:border-box;height:38px;padding:6px 10px;-moz-appearance:none;-webkit-appearance:none}label{display:block;margin-bottom:.5rem}input[type=checkbox]{display:inline}iframe{width:100%;height:100%;border:none}h1,h2{margin-top:0;margin-bottom:2rem;font-weight:300;word-wrap:break-word;color:#222}h1{font-size:4rem;line-height:1.2}h2{font-size:3.6rem;line-height:1.25}p{margin-top:0}i{font-style:italic}div,p{letter-spacing:normal;word-spacing:normal;white-space:normal}.fa-1_5x{font-size:1.5em}button,input{margin-bottom:1.4rem}form,p,ul{margin-bottom:2.4rem}li{margin-bottom:1rem}label{margin-bottom:.25rem}.btn{background-color:transparent;border-radius:0;border:1px solid #bbb;color:inherit;display:inline-block;font-size:inherit;font-weight:500;letter-spacing:.1rem;line-height:20px;min-height:38px;margin-bottom:1em;padding:8px 30px;text-align:center;text-decoration:none;vertical-align:top;word-break:break-all}.btn--primary{color:#fff;background-color:#545454;border-color:#545454}.btn--full{width:100%}.btn--link-clean{border:none;background-color:transparent;padding:0;margin:0;height:auto;line-height:1.4;min-height:100%}.dropdown{position:relative;display:inline-block;text-align:left}.dropdown.dropdown--absolute-position{list-style:none;z-index:70;background-color:#fff;position:absolute;top:100%;left:0;box-shadow:0 6px 12px rgba(0,0,0,.24);display:inline-grid;margin:0}.dropdown.dropdown--right-aligned{right:0;left:auto}.dropdown.dropdown--combined{background-color:#fff;min-width:690px;width:150%;display:flex}.list{margin:0}.list__link{width:100%;display:block;color:#222;text-align:left}.list li:last-child{margin-bottom:0}.list--clean{list-style:none}.modal-container{z-index:10000}.modal-trigger{display:none!important}.modal-overlay{display:none;background-color:rgba(0,0,0,.5);width:100%;height:100%;position:fixed;z-index:100;left:0;top:0}.modal{display:none;background-color:#fff;position:fixed;z-index:10000;left:50%;top:50%;transform:translate(-50%,-50%);max-width:calc(100% - 5em);max-height:calc(100% - 5em);overflow-y:auto}.modal h2{margin:0}.modal--xs{width:280px}.modal__header{padding:.5em 1em;border-bottom:1px solid #d3d3d3}.modal__body{padding:1em;overflow-x:auto;max-height:calc(100vh - 50px - 5em)}.form__field-group{margin-bottom:1em;position:relative}.form__field-group input{margin-bottom:0}.form__field-group>*{width:100%}.form__field-group>[for],.form__field-group>[type=checkbox]{display:inline;width:auto}.field-error{color:#c3423f;font-size:1.47rem;margin-top:5px}input[type=checkbox].form__control{display:inline;position:absolute;opacity:0;width:auto}input[type=checkbox].form__control+label{position:relative;line-height:normal;display:inline-block}input[type=checkbox].form__control+label::before{content:"";width:17px;height:17px;border:1px #d1d1d1 solid;display:inline-block;margin-right:5px;vertical-align:top}input[type=checkbox].form__control:checked+label::after{content:"";height:5px;width:10px;border-left:2px #545454 solid;border-bottom:2px #545454 solid;transform:rotate(-45deg);left:4px;top:5px;display:inline-block;position:absolute}.b-lazy{max-width:100%;opacity:0}.background-image{position:absolute;top:0;bottom:0;left:0;right:0}.background-image:after{content:"";position:absolute;top:0;bottom:0;left:0;right:0;background-color:inherit}.background-image__wrapper{position:absolute;width:100%;height:100%;top:0;overflow:hidden}.background-image__cover{height:100%;-o-object-fit:cover;object-fit:cover;display:block;max-width:100%;width:100%}.image-filter{overflow:hidden}.image-filter.image-filter--lighten{background-color:rgba(255,255,255,.2)}.typeahead{display:flex;position:relative;z-index:70;color:#222;max-width:600px;width:100%}.typeahead-search-field{margin:0;flex:1;border-radius:0;position:relative}@@media (max-width:479px){.u-hidden-xxs{display:none!important}}.grid{display:inline-block;display:-ms-flexbox;display:-webkit-flex;display:flex;zoom:1;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap;padding:0;margin:0;position:relative;width:100%;max-width:100%;word-spacing:-.43em!important;list-style-type:none}.grid::after,.grid::before{letter-spacing:normal;word-spacing:normal;white-space:normal;max-width:100%}.grid ::after,.grid ::before{letter-spacing:normal;word-spacing:normal;white-space:normal}.grid .grid{-ms-flex:1 1 auto;-webkit-flex:1 1 auto;flex:1 1 auto}.grid *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.grid ::after,.grid ::before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}[class*=grid__col-]{display:inline-block;display:-ms-flexbox;display:-webkit-flex;display:flex;zoom:1;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column;letter-spacing:normal;word-spacing:normal;white-space:normal;position:relative;width:100%;vertical-align:top;padding:.5em .5em}.grid__cell{position:relative;display:block;-ms-flex:1 1 auto;-webkit-flex:1 1 auto;flex:1 1 auto}.grid--align-center{-ms-flex-align:center;-webkit-align-items:center;align-items:center}.grid--align-center [class*=grid__col-]{vertical-align:middle}.grid--align-self-center{-ms-flex-item-align:center;-webkit-align-self:center;align-self:center;vertical-align:middle}.grid--justify-center{text-align:center;-moz-text-align-last:center;text-align-last:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}.grid--justify-center .grid__cell,.grid--justify-center [class*=grid__col-]{text-align:left;text-align:start;text-align:initial;-moz-text-align-last:left;-moz-text-align-last:start;-moz-text-align-last:initial;text-align-last:left;text-align-last:start;text-align-last:initial}.grid--justify-space-between{text-align:justify;-moz-text-align-last:justify;text-align-last:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.grid__col--bleed{padding:0}.grid__col--bleed-y{padding:0 .5em}.grid__cell--align-middle-left{display:flex;align-items:center;justify-content:flex-start}.grid__cell-img{display:block;display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex:0 0 auto;-webkit-flex:0 0 auto;flex:0 0 auto;margin-left:0;margin-right:0;max-width:100%;height:auto}.grid__cell-footer{display:inline-block;display:-ms-flexbox;display:-webkit-flex;display:flex;zoom:1;width:100%;margin-top:auto}.site{left:0;position:relative;width:100vw}.page{min-height:500px}.top-container__center-container{padding:0 1em}.top-container--sticky{width:100vw;position:fixed;top:0;z-index:90}.center-container{margin:0 auto;max-width:1280px;position:relative;width:100%;height:100%;box-sizing:border-box}.paragraph-container{padding:1em}.paragraph-container p:last-of-type{margin-bottom:.25em}.paragraph-container--full-width{width:100vw;position:relative;left:50%;right:50%;margin-left:-50vw}.paragraph-container--height-xl{height:550px}.paragraph-container--height-xl>.paragraph-container{height:550px}.multiple-paragraphs-container{position:relative;overflow:hidden}.multiple-paragraphs-container--spacing-sm{padding-top:.25em;padding-bottom:.25em}@@media (max-width:768px){.top-container__center-container{padding:0 .5em}.paragraph-container{padding-top:1em;padding-bottom:1em;padding-left:.5em;padding-right:.5em}}.logo{margin:.5em .5em .5em 0}.main-navigation{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background-color:#e4e4e4;z-index:10}.menu{list-style:none;margin:0;padding:0;white-space:nowrap}.menu__item{position:relative;padding:0;margin:0;color:#222;text-align:left;display:flex;justify-content:space-between;align-items:center}.menu__item--horizontal{float:left}.menu__item--top-level{float:left;border-top:3px solid #e4e4e4;border-bottom:3px solid #e4e4e4;text-align:center}.menu__item--fixed-width{width:240px;float:left}.menu__link{display:block;text-decoration:none;white-space:nowrap;padding:.5em;font-size:1.6rem;color:#222;float:left;line-height:30px}.menu__link.menu__link--icon{margin-bottom:0;line-height:33px;color:#fff}.menu--dropdown{background-color:#f6f6f6;box-shadow:0 3px 6px rgba(0,0,0,.175);z-index:10000;position:absolute;top:100%;left:0;display:none;line-height:1.4;min-width:100%;padding:.5em 0;margin-top:3px}.is-dropdown::after{font-family:"Font Awesome 5 Pro","Font Awesome 5 Free";font-weight:900;content:'';display:inline-block;line-height:42px;padding-right:.5em}.is-dropdown--no-icon::after{font-family:"";content:'';padding:0}.menu--dropleft{background-color:#f6f6f6;box-shadow:0 3px 6px rgba(0,0,0,.175);z-index:80;position:absolute;top:-.5em;left:100%;display:none;padding:.5em 0}.is-dropleft::after{font-family:"Font Awesome 5 Pro","Font Awesome 5 Free";font-weight:900;content:'';padding:.5em 1em;font-size:14px}.menu-dropdown__link{padding:1em;float:left;display:block;text-decoration:none;white-space:normal;font-size:1.6rem;color:#222;padding:.5em 1em}.menu-dropdown__item{display:block;text-decoration:none;white-space:nowrap;color:#222;padding:.5em;line-height:1.4;text-align:left}body,html{overflow-x:hidden}.tools-navigation{background-color:#fff}.top-micro-search{left:-150px}.top-micro-search .typeahead{margin:-.5em 0}.sign-in-dropdown{left:-70px;padding:1em;min-width:180px}.u-full-width{width:100%;max-width:100%}.u-full-max-width{max-width:100%}.u-pull--right{float:right}.u-block{display:block}.u-ta-center{text-align:center}.u-middle{margin:auto}.u-color-light,.u-color-light h1{color:#fff}.u-w380px{width:380px}.u-no-padding{padding:0}.u-no-margin{margin:0}.u-margin-top{margin-top:.5em}.u-margin-top--lg{margin-top:1em}.u-margin-right{margin-right:.5em}.u-margin-bottom{margin-bottom:.5em}.u-margin-left{margin-left:.5em}a{color:#0085ca;text-decoration:none;word-wrap:break-word}h1{font-family:"Open Sans",sans-serif;font-size:50px;font-weight:700;line-height:1.4;color:#222}h2{font-family:"Open Sans",sans-serif;font-size:40px;font-weight:700;line-height:1.4;color:#222}body{font-family:"Open Sans",sans-serif;font-size:16px;font-weight:regular;line-height:1.4;color:#222}a{color:#00a789}.btn--primary.dw-mod{color:#fff;font-size:16px;font-weight:400;line-height:22px;border-width:1px;border-color:#00a789;border-radius:0;background-color:#00a789;margin:0;border-width:0;border-color:transparent;background:0 0;position:relative;z-index:0;border:none}.btn--primary.dw-mod::before{position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%;background:#00a789;content:"";transform:skewX(-15deg);border-radius:8px}.btn--primary.dw-mod::after{position:absolute;top:0;left:0;z-index:-1;width:0;height:100%;background:#00a789;content:"";opacity:0;transform:skewX(-15deg);border-radius:8px}.image-filter--brand-color-one{background-color:rgba(18,37,90,.3)}.center-container.dw-mod{max-width:1280px}.site.dw-mod{background-color:#fff}.logo__img.dw-mod:not(.logo__img--mobile){height:60px}.main-navigation.dw-mod{background-color:#12255a;box-shadow:0 2px 20px 1px rgba(0,0,0,.25)}.menu--dropdown.dw-mod,.menu--dropleft.dw-mod{background-color:#fff}.menu--dropdown.dw-mod .menu-dropdown__link.dw-mod,.menu--dropleft.dw-mod .menu-dropdown__link.dw-mod{color:#000;font-size:14px}.menu--dropdown.dw-mod>.menu__item:after,.menu--dropleft.dw-mod>.menu__item:after{color:#000}.is-dropdown.dw-mod::after{color:#fff;font-size:14px;line-height:2.4em;line-height:69px}.menu-dropdown__item.dw-mod{color:#000;font-size:14px}.menu--dropdown .list__link.dw-mod,.menu-dropdown__link.dw-mod{color:#000;font-size:14px;font-family:"Open Sans",sans-serif}.menu__link.dw-mod:not(.menu__link--icon){font-family:"Open Sans",sans-serif;font-size:14px;font-weight:600;line-height:1.4;color:#fff;text-transform:uppercase}.menu__link.dw-mod:not(.menu__link--mobile){line-height:55px}.menu__link--icon.dw-mod{color:#fff}.menu__item--top-level{border-top:3px solid transparent;border-bottom:3px solid transparent}.tools-navigation.dw-mod{background-color:#222;font-family:"Open Sans",sans-serif;font-size:16px;font-weight:300;line-height:1.4;color:#fff}.btn{background-color:transparent;border-radius:0;border:1px solid #bbb;color:inherit;display:inline-block;font-size:inherit;font-weight:500;letter-spacing:.1rem;line-height:20px;min-height:38px;margin-bottom:1em;padding:8px 30px;text-align:center;text-decoration:none;vertical-align:top;word-break:break-all}.btn--primary{color:#fff;background-color:#545454;border-color:#545454}.btn--full{width:100%}.btn--link-clean{border:none;background-color:transparent;padding:0;margin:0;height:auto;line-height:1.4;min-height:100%}.btn--primary.dw-mod{margin:0;border-width:0;border-color:transparent;background:0 0;position:relative;z-index:0;border:none}.btn--primary.dw-mod::before{position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%;background:#00a789;content:"";-webkit-transform:skewX(-15deg);transform:skewX(-15deg);border-radius:8px}.btn--primary.dw-mod::after{position:absolute;top:0;left:0;z-index:-1;width:0;height:100%;background:#00a789;content:"";opacity:0;-webkit-transform:skewX(-15deg);transform:skewX(-15deg);border-radius:8px}img{min-width:1px;min-height:1px}.top-container__center-container{padding:0}h1{font-size:4rem;line-height:1.2}h2{font-size:3.6rem;line-height:1.25}.custom-margin .paragraph-container{margin:0}@@media (min-width:319px){.logo.dw-mod{width:15vw}}@@media (min-width:768px) and (max-width:1200px){.logo.dw-mod{width:5vw}}.dropdown.dropdown--combined{min-width:450px}.menu--dropdown .menu__item.is-dropleft .menu--dropleft .menu__item.dw-mod.menu__item--fixed-width{width:150px}.custom-flag:after{content:"\f078";font-family:"Font Awesome 5 Pro","Font Awesome 5 Free";font-weight:900;display:inline-block;line-height:42px;font-size:12px;position:relative;right:-25px}.custom-link-text{font-family:"Open Sans";font-size:14px;font-weight:600;line-height:1.4;color:#fff;text-transform:uppercase;padding:.5rem}.custom-fa-icon{font-size:20px;font-weight:300}.usp-link{color:#fff}.flag-icon{background-size:contain;background-position:50%;background-repeat:no-repeat;position:relative;display:inline-block;width:1.33333333em;line-height:1em}.flag-icon:before{content:"\00a0"}.flag-icon-es{background-image:url(/Files/Images/Enkotec/Icons/es.svg)}.flag-icon-gb{background-image:url(/Files/Images/Enkotec/Icons/gb.svg)}@@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN_r8OUuhs.ttf) format('truetype')}@@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/opensans/v18/mem8YaGs126MiZpBA-UFVZ0e.ttf) format('truetype')}@@font-face{font-family:'Open Sans';font-style:normal;font-weight:600;src:url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UNirkOUuhs.ttf) format('truetype')}@@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN7rgOUuhs.ttf) format('truetype')}@@font-face{font-family:'Open Sans';font-style:normal;font-weight:800;src:url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN8rsOUuhs.ttf) format('truetype')}; 3055 </style> 30563057 <link rel="preload" inline href="/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/css/fontawesome-all.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'"> 3058 <noscript><link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/css/fontawesome-all.min.css"></noscript> 30593060 <!-- Base (Default, wireframe) styles --> 30613062 <link rel="preload" href="/Files/Templates/Designs/Rapido/css/base/base.min.css" type="text/css" as="style" onload="this.onload=null;this.rel='stylesheet'"> 3063 <noscript><link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/base/base.min.css" type="text/css"></noscript> 30643065 <!-- Rapido Css from Website Settings --> 30663067 <link id="rapidoCss" rel="preload" href="@autoCssLink" type="text/css" as="style" onload="this.onload=null;this.rel='stylesheet'"> 3068 <noscript><link id="rapidoCss" rel="stylesheet" href="@autoCssLink" type="text/css"></noscript> 30693070 <!-- Ignite Css (Custom site specific styles - OWN STYLES) --> 3071 <link id="igniteCss" type="text/css" href="/Files/Templates/Designs/Rapido/css/nz/main.css?v=@assetsVersion" rel="preload" as="style" onload="this.onload=null;this.rel='stylesheet'"> 3072 <noscript><link id="igniteCss" type="text/css" href="/Files/Templates/Designs/Rapido/css/nz/main.css?v=@assetsVersion" rel="stylesheet"></noscript> 3073 <link href="https://fonts.googleapis.com/css?family=@family&font-display=auto" rel="preload" as="style" onload="this.onload=null;this.rel='stylesheet'"> 3074 <noscript><link href="https://fonts.googleapis.com/css?family=@family&font-display=auto" rel="stylesheet"></noscript> 30753076 <script> 3077 !function (n) { "use strict"; n.loadCSS || (n.loadCSS = function () { }); var o = loadCSS.relpreload = {}; if (o.support = function () { var e; try { e = n.document.createElement("link").relList.supports("preload") } catch (t) { e = !1 } return function () { return e } }(), o.bindMediaToggle = function (t) { var e = t.media || "all"; function a() { t.addEventListener ? t.removeEventListener("load", a) : t.attachEvent && t.detachEvent("onload", a), t.setAttribute("onload", null), t.media = e } t.addEventListener ? t.addEventListener("load", a) : t.attachEvent && t.attachEvent("onload", a), setTimeout(function () { t.rel = "stylesheet", t.media = "only x" }), setTimeout(a, 3e3) }, o.poly = function () { if (!o.support()) for (var t = n.document.getElementsByTagName("link"), e = 0; e < t.length; e++) { var a = t[e]; "preload" !== a.rel || "style" !== a.getAttribute("as") || a.getAttribute("data-loadcss") || (a.setAttribute("data-loadcss", !0), o.bindMediaToggle(a)) } }, !o.support()) { o.poly(); var t = n.setInterval(o.poly, 500); n.addEventListener ? n.addEventListener("load", function () { o.poly(), n.clearInterval(t) }) : n.attachEvent && n.attachEvent("onload", function () { o.poly(), n.clearInterval(t) }) } "undefined" != typeof exports ? exports.loadCSS = loadCSS : n.loadCSS = loadCSS }("undefined" != typeof global ? global : this); 3078 </script> 3079 } 308030813082308330843085 @* 3086 <!--MANIFEST.JSON--> 3087 <link rel="manifest" href="manifest.json" /> 3088 *@ 30893090 <!--META THEME COLOR--> 3091 <meta name="theme-color" content="#12255a"> 309230933094 <link href="https://code.jquery.com/jquery-3.2.1.min.js" rel="dns-prefetch" as="script" /> 3095 <link href="/Files/Templates/Designs/Rapido/js/handlebars-v4.0.11.js" rel="preload" as="script" /> 3096 <link href="/Files/Templates/Designs/Rapido/js/polyclip.js" rel="preload" as="script" /> 3097 <link href="/Files/Templates/Designs/Rapido/js/master.min.js" rel="preload" as="script" /> 3098 <link href="/Files/Templates/Designs/Rapido/js/nz/main.js" rel="preload" as="script" /> 309931003101 @if (!string.IsNullOrEmpty(businessName)) 3102 { 3103 <script type="application/ld+json"> 3104 { 3105 "@@context": "http://schema.org", 3106 "@@type": "Store", 3107 "image": [ 3108 "@siteURL/Admin/Public/GetImage.ashx?width=400&height=400&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath", 3109 "@siteURL/Admin/Public/GetImage.ashx?width=400&height=300&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath", 3110 "@siteURL/Admin/Public/GetImage.ashx?width=448&height=225&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath" 3111 ], 3112 "@@id": "@siteURL", 3113 "name": "@businessName", 3114 "address": { 3115 "@@type": "PostalAddress", 3116 "streetAddress": "@streetAddress", 3117 "addressLocality": "@addressLocality", 3118 "addressRegion": "@addressRegion", 3119 "postalCode": "@postalCode", 3120 "addressCountry": "@addressCountry" 3121 } 3122 @if (!string.IsNullOrEmpty(contactEmail)) 3123 { 3124 <text>,"email": "@contactEmail"</text> 3125 } 3126 @if (!string.IsNullOrEmpty(contactNumber)) 3127 { 3128 <text>,"telephone": "@contactNumber"</text> 3129 } 3130 } 3131 </script> 3132 } 31333134 <script type="application/ld+json"> 3135 { 3136 "@@context": "https://schema.org", 3137 "@@type": "Organization", 3138 "name": "@businessName", 3139 "url": "@siteURL", 3140 "sameAs": [ 3141 "https://www.youtube.com/user/ENKOTECcom", 3142 "https://www.linkedin.com/company/enkotec-as/" 3143 ] 3144 } 3145 </script> 31463147 @foreach (var language in Model.Languages) 3148 { 3149 string langHeader = Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host; 3150 string pageid = language.Page.ID.ToString(); 3151 string urls = langHeader + Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("default.aspx?id=" + pageid); 31523153 <link rel="alternate" href='@urls' hreflang='@language.Culture' /> 3154 } 31553156 @{ 3157 var tridentString = userAgent.Contains("Trident"); 3158 } 3159 @if (tridentString) //If sætning virker ikke korrekt 3160 { 31613162 <script> 3163 var firstTime = localStorage.getItem("first_time"); 3164 if(!firstTime) { 3165 // first time loaded! 3166 localStorage.setItem("first_time", "1"); 3167 document.addEventListener("DOMContentLoaded", function (event) { 3168 document.body.insertAdjacentHTML('afterbegin', '<input type="checkbox" id="overlay_8669" class="modal-trigger normal"><div class="modal-container animation--fadeIn" id="overlayModalContainer_8669"><label for="overlay_8669" class="modal-overlay "></label><div class="modal u-brand-color-one--bg u-color-light modal--lg modal-height-full dw-mod fade" id="overlayModal_8669"><div class="modal__body modal__body--full u-full-height dw-mod"><div class="grid u-full-height"><div class="grid__col-12 u-full-height background-image dw-mod" style="background-position: center center; background-size: cover;"><div class="u-middle u-padding--lg"><h2 class="u-ta-left">@Translate("IE-modal-headline", "This is Internet Explorer")</h2><div class="u-ta-left"><p>@Translate("IE-modal-text", "Du anvender en forældet browser, som ikke understøttes af vores hjemmeside. For at få en bedre brugeroplevelse, anbefaler vi at du downloader en nyere browser til din enhed.")</p></div><div class="u-margin-top grid--justify-center u-zindex-1 u-position-relative"></div></div></div></div></div><label class="modal__close-btn dw-mod" for="overlay_8669"></label></div></div>'); 3169 }); 3170 let showOnEvent_8669 = 'onStart'; 3171 let showOnceIn_8669 = +'0'; 3172 let showOnceWhenCTAButtonIsClicked_8669 = 'False'.toLowerCase() == 'true'; 3173 function showOverlay_8669() { 3174 let overlayTrigger = document.getElementById('overlay_8669'); 3175 let overlayModalContainer = document.getElementById('overlayModalContainer_8669'); 3176 let overlayModal = document.getElementById('overlayModal_8669'); 3177 if ('animation--fadeIn' != '' && overlayModalContainer) { 3178 overlayModalContainer.classList.add('animation--fadeIn'); 3179 } 3180 if ('fade' != '' && overlayModal) { 3181 overlayModal.classList.add('fade'); 3182 } 3183 let ctaButton = overlayModal.querySelector('.btn'); 3184 if (ctaButton) { 3185 ctaButton.addEventListener('click', function () { 3186 document.cookie = 'overlayCTAButtonIsClicked_8669=true'; 3187 }); 3188 } 3189 overlayTrigger.checked = true; 3190 overlayTrigger.addEventListener('change', closeOverlay_8669); 3191 } 3192 function closeOverlay_8669() { 3193 if (!this.checked) { 3194 let date = new Date; 3195 date.setDate(date.getDate() + showOnceIn_8669); 3196 document.cookie = "overlayWasShown_8669=" + showOnceIn_8669 + "; path=/; expires=" + date.toUTCString(); 3197 } 3198 } 3199 function showOverlayWithSettings_8669() { 3200 if ((showOnceIn_8669 && RememberState.GetCookie("overlayWasShown_8669") == showOnceIn_8669) 3201 || (showOnceWhenCTAButtonIsClicked_8669 && RememberState.GetCookie('overlayCTAButtonIsClicked_8669'))) { 3202 return; 3203 } 3204 switch (showOnEvent_8669) { 3205 case "afterDelay": 3206 setTimeout(showOverlay_8669, 5000); 3207 break; 3208 case "onScroll": 3209 let modalPosition = document.getElementById('overlayAnchor_8669').getBoundingClientRect().bottom + window.pageYOffset; 3210 window.addEventListener('scroll', function showOnScroll() { 3211 if (window.pageYOffset > modalPosition) { 3212 showOverlay_8669(); 3213 window.removeEventListener('scroll', showOnScroll, false) 3214 } 3215 }, false); 3216 break; 3217 case "onMouseLeave": 3218 window.addEventListener("mouseout", function onMouseLeave(e) { 3219 e = e ? e : window.event; 3220 let from = e.relatedTarget || e.toElement; 3221 if (!from || from.nodeName == "HTML") { 3222 showOverlay_8669(); 3223 window.removeEventListener('mouseout', onMouseLeave, false) 3224 } 3225 }, false); 3226 break; 3227 default: 3228 showOverlay_8669(); 3229 break; 3230 } 3231 } 3232 document.addEventListener('DOMContentLoaded', function () { 3233 showOverlayWithSettings_8669(); 3234 }); 3235 } 3236 </script> 3237 } 32383239 </head> 32403241 <body> 32423243 @* The @RenderBlockList base helper is included in Components/GridBuilder.cshtml *@ 3244 @RenderBlockList(masterPage.BlocksRoot.BlocksList) 324532463247 @helper RenderMasterHeader() 3248 { 3249 List<Block> subBlocks = this.masterPage.GetBlockListById("MasterHeader").OrderBy(item => item.SortId).ToList(); 3250 bool isNavigationStickyMenu = Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet" && Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("StickyTop"); 3251 string stickyTop = isNavigationStickyMenu ? "top-container--sticky" : ""; 32523253 <header class="top-container @stickyTop dw-mod" id="Top"> 3254 @RenderBlockList(subBlocks) 3255 </header> 3256 } 32573258 @helper RenderMain() 3259 { 3260 List<Block> subBlocks = this.masterPage.GetBlockListById("MasterMain").OrderBy(item => item.SortId).ToList(); 32613262 <main class="site dw-mod"> 3263 @RenderBlockList(subBlocks) 3264 </main> 3265 } 32663267 @helper RenderPageContent() 3268 { 3269 bool isNavigationStickyMenu = Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet" && Model.Area.Item.GetItem("Layout").GetItem("Header").GetBoolean("StickyTop"); 3270 string pagePos = isNavigationStickyMenu ? "js-page-pos" : ""; 32713272 <div id="Page" class="page @pagePos"> 3273 <section class="center-container content-container dw-mod" id="content"> 3274 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 32753276 @using Dynamicweb.Frontend 3277 @using Dynamicweb.Core 3278 @using Dynamicweb.Core.Helpers 3279 @using System.Linq 3280 @using Dynamicweb.Security.UserManagement 32813282 @{ 3283 string LeftHeadline = Model.Item.GetString("LeftHeadline"); 3284 string LeftText = Model.Item.GetString("LeftText"); 3285 string ButtonLinkLeft = Model.Item.GetString("ButtonLinkLeft"); 3286 string ButtonLinkLeftText = Model.Item.GetString("ButtonLinkLeftText"); 3287 string RightImage = Model.Item.GetString("RightImage"); 3288 string RightHeadline = Model.Item.GetString("RightHeadline"); 3289 string RightText = Model.Item.GetString("RightText"); 3290 string ButtonLinkRight = Model.Item.GetString("ButtonLinkRight"); 3291 string ButtonLinkRightText = Model.Item.GetString("ButtonLinkTextRight"); 3292 string LeftImage = Model.Item.GetString("LeftImage"); 3293 string placeHolderImage = "/Files/Images/placeholder.gif"; 3294 string AltText = Model.Item.GetString("ImageAltText") == "" ? Model.Item.GetString("Title") : Model.Item.GetString("ImageAltText"); 3295 string RightImageAltText = Model.Item.GetString("RightImageAltText") == "" ? Model.Item.GetString("RightHeadline") : Model.Item.GetString("RightImageAltText"); 3296 string LeftImageAltText = Model.Item.GetString("LeftImageAltText") == "" ? Model.Item.GetString("LeftHeadline") : Model.Item.GetString("LeftImageAltText"); 329732983299 } 33003301 @if (Model.PropertyItem.GetList("ShowBreadcrumb").SelectedValue == "True") 3302 { 3303 <div class="grid__col-12 grid__col--bleed-y"> 3304 @RenderNavigation(new 3305 { 3306 id = "breadcrumb", 3307 template = "Breadcrumb.xslt" 3308 }) 3309 </div> 3310 } 33113312 <article class="grid__col-12 u-margin-bottom--lg"> 3313 <div class="grid__cell"> 3314 <div class="u-padding"> 3315 <h1 class="article__header">@Model.Item.GetString("Title")</h1> 3316 <div class="article__summary">@Model.Item.GetString("Summary")</div> 3317 <small class="article__subscription"> 3318 @if (!(string.IsNullOrWhiteSpace(Model.Item.GetString("Author")) && string.IsNullOrWhiteSpace(Model.Item.GetString("Date")))) 3319 { 3320 <text>@Translate("Written")</text> 3321 } 3322 @if (!string.IsNullOrWhiteSpace(Model.Item.GetString("Author"))) 3323 { 3324 <text>@Translate("by") @Model.Item.GetString("Author")</text> 3325 } 3326 @if (!string.IsNullOrWhiteSpace(Model.Item.GetString("Date"))) 3327 { 3328 <text>@Translate("on") @Model.Item.GetDateTime("Date").ToString("dd.MM.yyyy, HH:mm")</text> 3329 } 3330 </small> 33313332 @if (Model.Item.GetFile("Image") != null) 3333 { 33343335 <div class="u-margin-bottom--lg"> 3336 @* 3337 @if (Pageview.Platform.ToString() == "Ios" || Pageview.Platform.ToString() == "Osx") 3338 { 3339 <picture> 3340 <!--[if IE 9]><video style="display: none;"><![endif]--> 3341 <source srcset="@Model.Item.GetFile("Image").Path?width=1600&amp;quality=75&amp;mode=crop, @Model.Item.GetFile("Image").Path?width=1600&amp;quality=75&amp;mode=crop x2" media="(min-width: 1279px)"> 3342 <source srcset="@Model.Item.GetFile("Image").Path?width=1600&amp;quality=75&amp;mode=crop, @Model.Item.GetFile("Image").Path?width=1600&amp;quality=75&amp;mode=crop 2x" media="(min-width: 319px)"> 3343 <!--[if IE 9]></video><![endif]--> 3344 <img class="background-image__cover dw-mod b-lazy" src="@placeHolderImage" data-src="@Model.Item.GetFile("Image").Path?width=375&amp;mode=crop" srcset="@Model.Item.GetFile("Image").Path?width=563&amp;mode=crop 2x" data-src-small="@Model.Item.GetFile("Image").Path" alt="@AltText"> 3345 </picture> 33463347 } 3348 else 3349 { 3350 } 3351 *@ 33523353 @if (Model.Item.GetBoolean("IsItA_GIF_") == true) 3354 { 3355 <img data-src="@Model.Item.GetFile("Image")" src="@placeHolderImage" class="b-lazy" alt="@AltText" /> 3356 } 3357 else 3358 { 3359 <img data-src="/Admin/Public/GetImage.ashx?width=1600&amp;crop=5&amp;Compression=75&amp;DoNotUpscale=true&amp;image=@Model.Item.GetFile("Image").PathUrlEncoded" src="@placeHolderImage" class="b-lazy" alt="@AltText" /> 3360 } 33613362 </div> 3363 } 33643365 <div class="article__paragraph"> 3366 @Model.Item.GetString("Text") 3367 </div> 33683369 @{ 3370 string buttonClass = ""; 3371 switch (Model.Item.GetList("ButtonDesign").SelectedName) 3372 { 3373 case "Link": 3374 buttonClass = "btn--link"; 3375 break; 3376 case "Secondary": 3377 buttonClass = "btn--secondary"; 3378 break; 3379 default: 3380 buttonClass = "btn--primary"; 3381 break; 3382 } 3383 } 33843385 @if (!string.IsNullOrWhiteSpace(Model.Item.GetString("Link"))) 3386 { 3387 <div class="grid__cell--footer"> 3388 <a href="@Model.Item.GetString("Link")" class="btn @buttonClass dw-mod u-pull--left">@Model.Item.GetString("LinkText")</a> 3389 </div> 3390 } 3391 </div> 33923393 @*CUSTOM CONTENT - RIGHT IMAGE LEFT TEXT*@ 33943395 @if (!string.IsNullOrWhiteSpace(Model.Item.GetString("LeftHeadline")) || !string.IsNullOrWhiteSpace(Model.Item.GetString("LeftText"))) 3396 { 3397 <div class="grid u-margin-top"> 3398 <div class="@(!string.IsNullOrEmpty(RightImage) ? "grid__col-lg-6 grid__col-md-6 grid__col-12" : "grid__col-12")"> 3399 <div class="grid__cell"> 3400 <h2 class="u-bold">@LeftHeadline</h2> 3401 @LeftText 3402 @if (!string.IsNullOrWhiteSpace(Model.Item.GetString("ButtonLinkLeft"))) 3403 { 34043405 <a href="@ButtonLinkLeft" class="btn btn--primary u-no-padding u-margin-top dw-mod">@ButtonLinkLeftText</a> 3406 } 3407 </div> 3408 </div> 340934103411 <div class="grid__col-lg-6 grid__col-md-6 grid__col-12"> 3412 <div class="grid__cell"> 3413 <img class="b-lazy" src="@placeHolderImage" alt="@RightImageAltText" data-src="@RightImage"/> 3414 </div> 3415 </div> 3416 </div> 3417 } 34183419 @*CUSTOM CONTENT - LEFT IMAGE RIGHT TEXT*@ 342034213422 @if (!string.IsNullOrWhiteSpace(Model.Item.GetString("RightHeadline")) || !string.IsNullOrWhiteSpace(Model.Item.GetString("RightText"))) 3423 { 3424 <div class="grid"> 3425 @*IMG RIGHT*@ 3426 <div class="grid__col-lg-6 grid__col-md-6 grid__col-12"> 3427 <div class="grid__cell"> 3428 <img class="b-lazy" src="@placeHolderImage" data-src="@LeftImage" alt="@LeftImageAltText"/> 3429 </div> 3430 </div> 34313432 <div class="@(!string.IsNullOrEmpty(LeftImage) ? "grid__col-lg-6 grid__col-md-6 grid__col-12" : "grid__col-12")"> 3433 <div class="grid__cell"> 3434 <h2 class="u-bold">@RightHeadline</h2> 3435 @RightText 3436 @if (!string.IsNullOrWhiteSpace(Model.Item.GetString("ButtonLinkRight"))) 3437 { 34383439 <a href="@ButtonLinkRight" class="btn btn--primary u-no-padding u-margin-top dw-mod"> 3440 @*<img class="line-icon" src="/Files/Images/Enkotec/Icons/orange-line.svg" alt="">*@ 3441 @ButtonLinkRightText 3442 </a> 3443 } 3444 </div> 3445 </div> 3446 </div> 3447 } 3448 </div> 3449 </article> 34503451 @{ 3452 var speakerList = Model.Item.GetUsers("Speaker") ?? new List<UserViewModel>(); 3453 UserViewModel speaker = speakerList.FirstOrDefault(); 34543455 var image = Model.Item.GetFile("Image"); 3456 string fullBackgroundImage = image != null ? "background-image:url(/Admin/Public/GetImage.ashx?width=2500&amp;height=1100&amp;crop=0&amp;Compression=85&amp;DoNotUpscale=true&amp;image=" + image.PathUrlEncoded + "); background-position: center center; background-size: cover; " : ""; 3457 string image1x1 = image != null ? Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host + "/Admin/Public/GetImage.ashx?width=1920&height=1920&crop=5&Compression=85&DoNotUpscale=true&image=" + image.Path : ""; 3458 string image4x3 = image != null ? Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host + "/Admin/Public/GetImage.ashx?width=1920&height=1440&crop=5&Compression=85&DoNotUpscale=true&image=" + image.Path : ""; 3459 string image16x9 = image != null ? Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host + "/Admin/Public/GetImage.ashx?width=1920&height=1080&crop=5&Compression=85&DoNotUpscale=true&image=" + image.Path : ""; 3460 string eventName = Model.Item.GetString("Title"); 3461 DateTime startDate = Model.Item.GetDateTime("Date"); 3462 var eventLocation = Model.Item.GetItem("Location"); 3463 string eventStreetAddress = ""; 3464 string eventAddressLocality = ""; 3465 string eventAddressRegion = ""; 3466 string eventPostalCode = ""; 3467 string eventAddressCountry = ""; 3468 string eventLocationName = ""; 3469 string siteURL = Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host; 3470 string siteCanonical = Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host + Pageview.SearchFriendlyUrl.ToString(); 3471 string businessName = Model.Area.Item.GetItem("Settings").GetString("BusinessName"); 3472 string businessPhotoPath = Model.Area.Item.GetItem("Settings").GetFile("BusinessPhoto") != null ? Model.Area.Item.GetItem("Settings").GetFile("BusinessPhoto").Path : ""; 3473 string author = Model.Item.GetString("Author"); 3474 string summary = Model.Item.GetString("Summary"); 347534763477 if (eventLocation != null) 3478 { 3479 eventStreetAddress = eventLocation.GetString("StreetAddress"); 3480 eventAddressLocality = eventLocation.GetString("City"); 3481 eventAddressRegion = eventLocation.GetString("Region"); 3482 eventPostalCode = eventLocation.GetString("PostalCode"); 3483 eventAddressCountry = eventLocation.GetString("Country"); 3484 eventLocationName = eventLocation.GetString("Name"); 3485 } 3486 } 348734883489 <script type="application/ld+json"> 3490 { 3491 "@@context": "https://schema.org", 3492 "@@type": "NewsArticle", 3493 "mainEntityOfPage": { 3494 "@@type": "WebPage", 3495 "@@id": "@siteCanonical" 3496 }, 3497 "headline": "@eventName", 3498 @if (image != null) 3499 { 3500 <text>"image": [ 3501 "@image1x1", 3502 "@image4x3", 3503 "@image16x9" 3504 ],</text> 3505 } 3506 "datePublished": "@startDate.ToString("yyyy-MM-ddTHH:mm")", 3507 "dateModified": "@startDate.ToString("yyyy-MM-ddTHH:mm")", 3508 "author": { 3509 "@@type": "Organization", 3510 "name": "@businessName" 3511 }, 3512 "publisher": { 3513 "@@type": "Organization", 3514 "name": "@businessName", 3515 "logo": { 3516 "@@type": "ImageObject", 3517 "url": "@siteURL/Admin/Public/GetImage.ashx?width=400&height=400&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath" 3518 } 3519 }, 3520 "description": "@summary" 3521 } 3522 </script> 35233524 </section> 3525 </div> 3526 } 3527 </body> 3528 </html> 3529