Error executing template "Designs/Swift/Navigation/Navigation.cshtml" System.ArgumentException: Customized cultures cannot be passed by LCID, only by name. (Parameter 'culture') at System.Globalization.RegionInfo..ctor(Int32 culture) at CompiledRazorTemplates.Dynamic.RazorEngine_ecc84276c6794504be542a5d8fee4da7.ExecuteAsync() at RazorEngine.Templating.TemplateBase.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.DynamicWrapperService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass23_0.<Run>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.Navigation.NavigationTreeViewModel> 2 @using Dynamicweb 3 @using Dynamicweb.Ecommerce.Orders 4 @using System.Text.RegularExpressions 5 6 @{ 7 string theme = !string.IsNullOrEmpty(Model.Parameters["Theme"].ToString()) ? Model.Parameters["Theme"].ToString() : string.Empty; 8 string navOrientation = !string.IsNullOrEmpty(Model.Parameters["NavOrientation"].ToString()) ? Model.Parameters["NavOrientation"].ToString() : string.Empty; 9 string navAlignment = !string.IsNullOrEmpty(Model.Parameters["NavAlignment"].ToString()) ? Model.Parameters["NavAlignment"].ToString() : string.Empty; 10 string linkFontWeight = !string.IsNullOrEmpty(Model.Parameters["LinkFontWeight"].ToString()) ? Model.Parameters["LinkFontWeight"].ToString() : string.Empty; 11 string linkCasing = !string.IsNullOrEmpty(Model.Parameters["LinkCasing"].ToString()) ? Model.Parameters["LinkCasing"].ToString() : string.Empty; 12 string linkFontSize = !string.IsNullOrEmpty(Model.Parameters["LinkFontSize"].ToString()) ? Model.Parameters["LinkFontSize"].ToString() : string.Empty; 13 string layout = !string.IsNullOrEmpty(Model.Parameters["Layout"].ToString()) ? Model.Parameters["Layout"].ToString() : string.Empty; 14 string iconSize = linkFontSize == "fs-7" ? "icon-2" : "icon-3"; 15 iconSize = linkFontSize == "fs-5" ? "icon-4" : iconSize; 16 17 int currentParagraphId = Pageview.CurrentParagraph.ID; 18 19 bool showOnlyFirstNavLevel = Model.Parameters.ContainsKey("ShowOnlyFirstNavLevel") ? Convert.ToBoolean(Model.Parameters["ShowOnlyFirstNavLevel"].ToString()) : false; 20 string menuId = Model.Parameters.ContainsKey("menu-id") ? $"menu_{Model.Parameters["menu-id"].ToString().ToLower()}" : string.Empty; 21 22 string groupId = Dynamicweb.Context.Current.Request["GroupID"] != null ? Dynamicweb.Context.Current.Request["GroupID"].ToString() : string.Empty; 23 string productId = Dynamicweb.Context.Current.Request["ProductID"] != null ? Dynamicweb.Context.Current.Request["ProductID"].ToString() : string.Empty; 24 string variantId = Dynamicweb.Context.Current.Request["VariantID"] != null ? Dynamicweb.Context.Current.Request["VariantID"].ToString() : string.Empty; 25 26 string navItemVisuallyHidden = layout == "iconsOnly" ? "visually-hidden" : null; 27 } 28 29 <nav class="d-flex py-0 @navOrientation @navAlignment"> 30 <ul class="nav flex-nowrap @(navOrientation == "vertical" ? "flex-column" : navOrientation)"> 31 @foreach (var node in Model.Nodes) 32 { 33 var page = Dynamicweb.Content.Services.Pages.GetPage(node.PageId); 34 var pageType = !string.IsNullOrEmpty(page.ItemType) ? page.ItemType : "Swift_Page"; 35 string pageIcon = string.Empty; 36 if (page.PropertyItem is object && page.PropertyItem.TryGetValue("Icon", out object pageIconValue)) 37 { 38 pageIcon = Dynamicweb.Core.Converter.ToString(pageIconValue); 39 } 40 string iconPath = Dynamicweb.Context.Current.Server.MapPath(pageIcon); 41 42 string preferencesLayout = page.Item?["PreferencesLayout"] != null ? page.Item["PreferencesLayout"].ToString() : string.Empty; 43 string preferencesType = "language"; 44 45 bool countrySelector = page.Item?["CountrySelector"] != null ? Convert.ToBoolean(page.Item["CountrySelector"].ToString()) : false; 46 bool languageSelector = page.Item?["LanguageSelector"] != null ? Convert.ToBoolean(page.Item["LanguageSelector"].ToString()) : false; 47 bool currencySelector = page.Item?["CurrencySelector"] != null ? Convert.ToBoolean(page.Item["CurrencySelector"].ToString()) : false; 48 49 var hasChildren = node.Nodes.Count() > 0 || pageType == "Swift_SignIn"; 50 string nodeId = !string.IsNullOrEmpty(node.GroupId) ? "Navigation_" + node.GroupId + "_" + currentParagraphId : "Navigation_Page_Desktop_" + node.PageId.ToString() + "_" + currentParagraphId; 51 52 string dropdownAttributes = hasChildren && !showOnlyFirstNavLevel ? " role=\"button\" aria-haspopup=\"true\" aria-expanded=\"false\" data-bs-toggle=\"dropdown\" data-bs-offset=\"0,0\"" : string.Empty; 53 string dropdownClasses = string.Empty; 54 55 if (pageType != "Swift_Preferences") 56 { 57 <li class="nav-item@(hasChildren ? " dropdown" : string.Empty)"> 58 @if (node.IsClickable) 59 { 60 @:<a href="@node.Link" class="p-2 nav-link text-nowrap text-decoration-underline-hover @linkFontSize @linkFontWeight @linkCasing@(node.IsActive ? " active" : "")@(hasChildren ? " dropdown-toggle" : string.Empty)" @dropdownAttributes @(node.IsActive ? " aria-current='page'" : "") id="@nodeId"> 61 } 62 else 63 { 64 @:<span class="p-2 nav-link text-nowrap @linkFontSize @linkFontWeight @linkCasing@(hasChildren ? " dropdown-toggle " : string.Empty)" @dropdownAttributes id="@nodeId"> 65 } 66 67 @if (pageType == "Swift_Cart") //Mini cart 68 { 69 string cartId = page.Item["ContextCart"] != null && page.Item["ContextCart"] != string.Empty ? $"ID=\"Cart_{page.Item["ContextCart"].ToString()}\"" : string.Empty; 70 string jsCartClass = string.IsNullOrEmpty(cartId) ? "js-cart-qty" : string.Empty; 71 double totalProducts = 0; 72 73 Dynamicweb.Ecommerce.Common.Context.CartContext = null; 74 if (page.Item["ContextCart"] != null) 75 { 76 var orderContext = Dynamicweb.Ecommerce.Services.OrderContexts.GetOrderContextById(page.Item["ContextCart"].ToString()); 77 Dynamicweb.Ecommerce.Common.Context.CartContext = orderContext; 78 } 79 80 if (Dynamicweb.Ecommerce.Common.Context.Cart != null) 81 { 82 bool renderOrderlineCountInsteadOfProductCount = page.Item["RenderOrderlineCountInsteadOfProductCount"] != null ? Convert.ToBoolean(page.Item["RenderOrderlineCountInsteadOfProductCount"]) : false; 83 if (!renderOrderlineCountInsteadOfProductCount) 84 { 85 totalProducts = Dynamicweb.Ecommerce.Common.Context.Cart.GetParentProductLineQuantityCount(Dynamicweb.Ecommerce.Common.Context.Cart.OrderLines); 86 } 87 else 88 { 89 foreach (var orderline in Dynamicweb.Ecommerce.Common.Context.Cart.OrderLines) 90 { 91 if (orderline.HasType(new[] { OrderLineType.Product, OrderLineType.Fixed, OrderLineType.PointProduct, OrderLineType.GiftCard })) 92 { 93 totalProducts++; 94 } 95 } 96 97 totalProducts = Math.Round(totalProducts, 2); 98 } 99 } 100 101 if (layout == "iconsAndLinks" && pageIcon.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) && !pageIcon.EndsWith("none.svg", StringComparison.OrdinalIgnoreCase)) 102 { 103 <span class="@iconSize pe-none">@ReadFile(iconPath)</span> 104 } 105 106 <span class="@(navItemVisuallyHidden)">@node.Name</span> 107 <span class="@jsCartClass mini-cart-quantity pe-none" @cartId data-order-context="@page.Item["ContextCart"]">@totalProducts</span> 108 109 if (layout != "linksOnly" && layout != "iconsAndLinks" && pageIcon.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) && !pageIcon.EndsWith("none.svg", StringComparison.OrdinalIgnoreCase)) 110 { 111 <span class="@iconSize pe-none">@ReadFile(iconPath)</span> 112 } 113 } 114 else 115 { 116 if (layout == "iconsAndLinks" && pageIcon.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) && !pageIcon.EndsWith("none.svg", StringComparison.OrdinalIgnoreCase)) 117 { 118 <span class="@iconSize pe-none">@ReadFile(iconPath)</span> 119 } 120 121 <span class="@(navItemVisuallyHidden)">@node.Name</span> 122 123 if (layout != "linksOnly" && layout != "iconsAndLinks" && pageIcon.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) && !pageIcon.EndsWith("none.svg", StringComparison.OrdinalIgnoreCase)) 124 { 125 <span class="@iconSize pe-none">@ReadFile(iconPath)</span> 126 } 127 } 128 129 @if (node.IsClickable) 130 { 131 @:</a> 132 } 133 else 134 { 135 @:</span> 136 } 137 138 @if (hasChildren && !showOnlyFirstNavLevel) 139 { 140 <ul class="dropdown-menu @(theme)" aria-labelledby="@nodeId"> 141 @foreach (var subnode in node.Nodes)//Standard pages 142 { 143 nodeId = !string.IsNullOrEmpty(subnode.GroupId) ? "Navigation_" + subnode.GroupId + "_" + currentParagraphId : "Navigation_Page_" + subnode.PageId.ToString() + "_" + currentParagraphId; 144 145 <li> 146 @if (subnode.IsClickable) 147 { 148 <a href="@subnode.Link" class="dropdown-item py-2 text-decoration-underline-hover @linkFontSize @linkFontWeight @linkCasing" @(subnode.IsActive ? " aria-current='page'" : string.Empty) id="@nodeId">@subnode.Name</a> 149 } 150 else 151 { 152 <span class="dropdown-item py-2 @linkFontSize @linkFontWeight @linkCasing" @(subnode.IsActive ? " aria-current='page'" : string.Empty) id="@nodeId">@subnode.Name</span> 153 } 154 </li> 155 } 156 @if (pageType == "Swift_SignIn") //Sign out link 157 { 158 if (Pageview.User != null) 159 { 160 string signOutLink = "/Admin/Public/ExtranetLogoff.aspx?redirect=no"; 161 162 <li><hr class="dropdown-divider"></li> 163 if (Dynamicweb.Security.UserManagement.User.GetCurrentSecondaryUser() != null) 164 { 165 string customerSignOutLink = $"Default.aspx?ID={Pageview.ID}&DwExtranetRemoveSecondaryUser=1"; 166 167 <li> 168 <a href="@customerSignOutLink" class="dropdown-item py-2 text-decoration-underline-hover swift_sign-out-as-customer-link @linkFontSize @linkFontWeight @linkCasing" id="SignInButton_@currentParagraphId">@Translate("Sign out as a customer")</a> 169 </li> 170 } 171 <li> 172 <a href="@signOutLink" class="dropdown-item py-2 text-decoration-underline-hover swift_sign-out-link @linkFontSize @linkFontWeight @linkCasing">@Translate("Sign out")</a> 173 </li> 174 } 175 } 176 </ul> 177 } 178 </li> 179 } 180 else 181 { 182 string name = node.Name; 183 184 if (preferencesLayout == "modal") 185 { 186 if (languageSelector) { 187 string iconFolder = "/Files/FlagIcons/"; 188 var region = new System.Globalization.RegionInfo(Pageview.Area.CultureInfo.LCID); 189 190 iconPath = $"{iconFolder}{region.Name}.svg"; 191 name = region.DisplayName; 192 } 193 194 <li class="nav-item@(hasChildren ? " dropdown" : string.Empty)"> 195 <form action="/Default.aspx?ID=@node.PageId" data-response-target-element="PreferencesModalContent" data-layout-template="Swift_Preferences.cshtml" data-preloader="inline"> 196 <input type="hidden" name="CurrentPageID" value="@Pageview.ID"> 197 <input type="hidden" name="GroupID" value="@groupId"> 198 <input type="hidden" name="ProductID" value="@productId"> 199 <input type="hidden" name="VariantID" value="@variantId"> 200 <button type="button" onmouseover="swift.PageUpdater.Update(event)" onclick="swift.PageUpdater.Update(event)" class="btn border-0 nav-link p-2 text-nowrap border-0 swift_open-preferences-modal @linkFontSize @linkFontWeight @linkCasing" data-bs-toggle="modal" data-bs-target="#PreferencesModal" id="OpenPreferences_@currentParagraphId"> 201 @if (layout == "iconsAndLinks" && iconPath.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) && !iconPath.EndsWith("none.svg", StringComparison.OrdinalIgnoreCase)) 202 { 203 <span class="@iconSize">@ReadFile(iconPath)</span> 204 } 205 206 <span class="@(navItemVisuallyHidden)">@name</span> 207 208 @if (layout != "linksOnly" && layout != "iconsAndLinks" && iconPath.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) && !iconPath.EndsWith("none.svg", StringComparison.OrdinalIgnoreCase)) 209 { 210 <span class="@iconSize">@ReadFile(iconPath)</span> 211 } 212 </button> 213 </form> 214 </li> 215 } 216 else 217 { 218 var ecomCountries = Dynamicweb.Ecommerce.Services.Countries.GetCountries(); 219 var currencies = Dynamicweb.Ecommerce.Services.Currencies.GetAllCurrencies(); 220 List<Dynamicweb.Content.Page> languages = new List<Dynamicweb.Content.Page>(); 221 222 if (languageSelector) 223 { 224 if (Pageview.Page.Area.IsMaster) 225 { 226 languages.Add(Pageview.Page); 227 if (Pageview.Page.Languages != null) 228 { 229 foreach (var language in Pageview.Page.Languages) 230 { 231 if (language.Area.Active == true) 232 { 233 languages.Add(language); 234 } 235 } 236 } 237 } 238 else 239 { 240 languages.Add(Pageview.Page.MasterPage); 241 if (Pageview.Page.MasterPage != null) 242 { 243 if (Pageview.Page.MasterPage.Languages != null) 244 { 245 foreach (var language in Pageview.Page.MasterPage.Languages) 246 { 247 if (language.Area.Active == true) 248 { 249 languages.Add(language); 250 } 251 } 252 } 253 } 254 } 255 } 256 257 if (languageSelector && languages.Count > 1) 258 { 259 string iconFolder = "/Files/FlagIcons/"; 260 pageIcon = iconFolder + Pageview.Area.CultureInfo.Name.ToLower() + ".svg"; 261 Regex reg = new Regex(@"\(([^\)]+)\)"); 262 name = reg.Replace(Pageview.Area.CultureInfo.DisplayName, ""); 263 264 string linkElementId = $"{preferencesType}Selector_{Pageview.CurrentParagraph.ID}_{node.PageId}"; 265 266 <li class="nav-item dropdown"> 267 <form class="d-none d-lg-block" action="/Default.aspx?ID=@node.PageId" data-response-target-element="@(preferencesType)Dropdown_@currentParagraphId" data-layout-template="Swift_Preferences.cshtml" data-preloader="inline"> 268 <input type="hidden" name="Type" value="@preferencesType"> 269 <input type="hidden" name="CurrentPageID" value="@Pageview.ID"> 270 <input type="hidden" name="GroupID" value="@groupId"> 271 <input type="hidden" name="ProductID" value="@productId"> 272 <input type="hidden" name="VariantID" value="@variantId"> 273 <input type="hidden" name="FontSize" value="@linkFontSize"> 274 <input type="hidden" name="FontWeight" value="@linkFontWeight"> 275 <input type="hidden" name="Casing" value="@linkCasing"> 276 277 <button type="button" id="@linkElementId" onmouseover="swift.PageUpdater.Update(event)" onclick="swift.PageUpdater.Update(event)" class="btn border-0 nav-link p-2 text-nowrap text-decoration-underline-hover @linkFontSize @linkFontWeight @linkCasing@(node.IsActive ? " active" : string.Empty) dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" @(node.IsActive ? " aria-current='page'" : string.Empty)> 278 @if (layout == "iconsAndLinks" && pageIcon.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) && !pageIcon.EndsWith("none.svg", StringComparison.OrdinalIgnoreCase)) 279 { 280 <span class="@iconSize">@ReadFile(pageIcon)</span> 281 } 282 283 <span class="@(navItemVisuallyHidden)">@name</span> 284 285 @if (layout != "linksOnly" && layout != "iconsAndLinks" && pageIcon.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) && !pageIcon.EndsWith("none.svg", StringComparison.OrdinalIgnoreCase)) 286 { 287 <span class="@iconSize">@ReadFile(pageIcon)</span> 288 } 289 </button> 290 291 <ul class="dropdown-menu @(theme)" id="@(preferencesType)Dropdown_@currentParagraphId"></ul> 292 </form> 293 294 <form class="d-block d-lg-none" action="/Default.aspx?ID=@node.PageId" data-response-target-element="PreferencesModalContent" data-layout-template="Swift_Preferences.cshtml" data-preloader="inline"> 295 <input type="hidden" name="Layout" value="modal"> 296 <input type="hidden" name="CurrentPageID" value="@Pageview.ID"> 297 <input type="hidden" name="GroupID" value="@groupId"> 298 <input type="hidden" name="ProductID" value="@productId"> 299 <input type="hidden" name="VariantID" value="@variantId"> 300 <button type="button" onmouseover="swift.PageUpdater.Update(event)" onclick="swift.PageUpdater.Update(event)" class="btn nav-link p-2 text-nowrap border-0 swift_open-preferences-modal @linkFontSize @linkFontWeight @linkCasing" data-bs-toggle="modal" data-bs-target="#PreferencesModal"> 301 @if (layout == "iconsAndLinks" && pageIcon.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) && !pageIcon.EndsWith("none.svg", StringComparison.OrdinalIgnoreCase)) 302 { 303 <span class="@iconSize">@ReadFile(iconPath)</span> 304 } 305 306 <span class="@(navItemVisuallyHidden)">@name</span> 307 308 @if (layout != "linksOnly" && layout != "iconsAndLinks" && pageIcon.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) && !pageIcon.EndsWith("none.svg", StringComparison.OrdinalIgnoreCase)) 309 { 310 <span class="@iconSize">@ReadFile(iconPath)</span> 311 } 312 </button> 313 </form> 314 </li> 315 } 316 317 if (countrySelector && ecomCountries.Count > 1) 318 { 319 name = Translate("Deliver to") + ": " + Dynamicweb.Ecommerce.Common.Context.Country.GetName(Dynamicweb.Ecommerce.Common.Context.LanguageID); 320 preferencesType = "country"; 321 322 string linkElementId = $"{preferencesType}Selector_{Pageview.CurrentParagraph.ID}_{node.PageId}"; 323 324 <li class="nav-item dropdown"> 325 <form class="d-none d-lg-block" action="/Default.aspx?ID=@node.PageId" data-response-target-element="@(preferencesType)Dropdown_@currentParagraphId" data-layout-template="Swift_Preferences.cshtml" data-preloader="inline"> 326 <input type="hidden" name="Type" value="@preferencesType"> 327 <input type="hidden" name="CurrentPageID" value="@Pageview.ID"> 328 <input type="hidden" name="GroupID" value="@groupId"> 329 <input type="hidden" name="ProductID" value="@productId"> 330 <input type="hidden" name="VariantID" value="@variantId"> 331 <input type="hidden" name="FontSize" value="@linkFontSize"> 332 <input type="hidden" name="FontWeight" value="@linkFontWeight"> 333 <input type="hidden" name="Casing" value="@linkCasing"> 334 335 <a id="@linkElementId" onmouseover="swift.PageUpdater.Update(event)" onclick="swift.PageUpdater.Update(event)" class="nav-link p-2 text-nowrap text-decoration-underline-hover @linkFontSize @linkFontWeight @linkCasing@(node.IsActive ? " active" : string.Empty) dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" @(node.IsActive ? " aria-current='page'" : string.Empty)> 336 @if (layout == "iconsAndLinks" && pageIcon.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) && !pageIcon.EndsWith("none.svg", StringComparison.OrdinalIgnoreCase)) 337 { 338 <span class="@iconSize">@ReadFile(iconPath)</span> 339 } 340 341 <span class="@(navItemVisuallyHidden)">@name</span> 342 343 @if (layout != "linksOnly" && layout != "iconsAndLinks" && pageIcon.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) && !pageIcon.EndsWith("none.svg", StringComparison.OrdinalIgnoreCase)) 344 { 345 <span class="@iconSize">@ReadFile(iconPath)</span> 346 } 347 </a> 348 349 <ul class="dropdown-menu @(theme)" id="@(preferencesType)Dropdown_@currentParagraphId"></ul> 350 </form> 351 352 <form class="d-block d-lg-none" action="/Default.aspx?ID=@node.PageId" data-response-target-element="PreferencesModalContent" data-layout-template="Swift_Preferences.cshtml" data-preloader="inline"> 353 <input type="hidden" name="Layout" value="modal"> 354 <input type="hidden" name="CurrentPageID" value="@Pageview.ID"> 355 <input type="hidden" name="GroupID" value="@groupId"> 356 <input type="hidden" name="ProductID" value="@productId"> 357 <input type="hidden" name="VariantID" value="@variantId"> 358 <button type="button" onmouseover="swift.PageUpdater.Update(event)" onclick="swift.PageUpdater.Update(event)" class="btn nav-link p-2 text-nowrap border-0 swift_open-preferences-modal @linkFontSize @linkFontWeight @linkCasing" data-bs-toggle="modal" data-bs-target="#PreferencesModal"> 359 @if (layout == "iconsAndLinks" && pageIcon.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) && !pageIcon.EndsWith("none.svg", StringComparison.OrdinalIgnoreCase)) 360 { 361 <span class="@iconSize">@ReadFile(iconPath)</span> 362 } 363 364 <span>@name</span> 365 366 @if (layout != "linksOnly" && layout != "iconsAndLinks" && pageIcon.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) && !pageIcon.EndsWith("none.svg", StringComparison.OrdinalIgnoreCase)) 367 { 368 <span class="@iconSize">@ReadFile(iconPath)</span> 369 } 370 </button> 371 </form> 372 </li> 373 } 374 375 if (currencySelector && currencies.Count() > 1) 376 { 377 name = Dynamicweb.Ecommerce.Common.Context.Currency.Code; 378 preferencesType = "currency"; 379 380 string linkElementId = $"{preferencesType}Selector_{Pageview.CurrentParagraph.ID}_{node.PageId}"; 381 382 <li class="nav-item dropdown"> 383 <form class="d-none d-lg-block" action="/Default.aspx?ID=@node.PageId" data-response-target-element="@(preferencesType)Dropdown_@currentParagraphId" data-layout-template="Swift_Preferences.cshtml" data-preloader="inline"> 384 <input type="hidden" name="Type" value="@preferencesType"> 385 <input type="hidden" name="CurrentPageID" value="@Pageview.ID"> 386 <input type="hidden" name="GroupID" value="@groupId"> 387 <input type="hidden" name="ProductID" value="@productId"> 388 <input type="hidden" name="VariantID" value="@variantId"> 389 <input type="hidden" name="FontSize" value="@linkFontSize"> 390 <input type="hidden" name="FontWeight" value="@linkFontWeight"> 391 <input type="hidden" name="Casing" value="@linkCasing"> 392 393 <a id="@linkElementId" onmouseover="swift.PageUpdater.Update(event)" onclick="swift.PageUpdater.Update(event)" class="nav-link p-2 text-nowrap text-decoration-underline-hover @linkFontSize @linkFontWeight @linkCasing@(node.IsActive ? " active" : string.Empty) dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" @(node.IsActive ? " aria-current='page'" : string.Empty)> 394 @if (layout == "iconsAndLinks" && pageIcon.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) && !pageIcon.EndsWith("none.svg", StringComparison.OrdinalIgnoreCase)) 395 { 396 <span class="@iconSize">@ReadFile(iconPath)</span> 397 } 398 399 <span class="@(navItemVisuallyHidden)">@name</span> 400 401 @if (layout != "linksOnly" && layout != "iconsAndLinks" && pageIcon.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) && !pageIcon.EndsWith("none.svg", StringComparison.OrdinalIgnoreCase)) 402 { 403 <span class="@iconSize">@ReadFile(iconPath)</span> 404 } 405 </a> 406 407 <ul class="dropdown-menu @(theme)" id="@(preferencesType)Dropdown_@currentParagraphId"></ul> 408 </form> 409 410 <form class="d-block d-lg-none" action="/Default.aspx?ID=@node.PageId" data-response-target-element="PreferencesModalContent" data-layout-template="Swift_Preferences.cshtml" data-preloader="inline"> 411 <input type="hidden" name="Layout" value="modal"> 412 <input type="hidden" name="CurrentPageID" value="@Pageview.ID"> 413 <input type="hidden" name="GroupID" value="@groupId"> 414 <input type="hidden" name="ProductID" value="@productId"> 415 <input type="hidden" name="VariantID" value="@variantId"> 416 <button type="button" onmouseover="swift.PageUpdater.Update(event)" onclick="swift.PageUpdater.Update(event)" class="btn nav-link p-2 text-nowrap border-0 swift_open-preferences-modal @linkFontSize @linkFontWeight @linkCasing" data-bs-toggle="modal" data-bs-target="#PreferencesModal"> 417 @if (layout == "iconsAndLinks" && pageIcon.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) && !pageIcon.EndsWith("none.svg", StringComparison.OrdinalIgnoreCase)) 418 { 419 <span class="@iconSize">@ReadFile(iconPath)</span> 420 } 421 422 <span>@name</span> 423 424 @if (layout != "linksOnly" && layout != "iconsAndLinks" && pageIcon.EndsWith(".svg", StringComparison.OrdinalIgnoreCase) && !pageIcon.EndsWith("none.svg", StringComparison.OrdinalIgnoreCase)) 425 { 426 <span class="@iconSize">@ReadFile(iconPath)</span> 427 } 428 </button> 429 </form> 430 </li> 431 } 432 } 433 } 434 } 435 </ul> 436 </nav> 437
We and our partners use technologies, including cookies, to collect information about you for various purposes, including:
By clicking 'Accept All' you consent to all these purposes. You can also choose to indicate what purposes you will consent to using the custom selections and then click 'Accept selected'.
You can read more about our use of cookies and other technologies, as well as our collection and processing of personal data by clicking here:
Read more about Cookies Our privacy policy 
										 
										 
										 
										