Error compiling template "Designs/Swift/Navigation/OffCanvasNavigation.cshtml"
Line 114: 'NavigationTreeViewModel' does not contain a definition for 'PageId' and no accessible extension method 'PageId' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 129: 'NavigationTreeViewModel' does not contain a definition for 'GroupId' and no accessible extension method 'GroupId' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 129: 'NavigationTreeViewModel' does not contain a definition for 'GroupId' and no accessible extension method 'GroupId' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 129: 'NavigationTreeViewModel' does not contain a definition for 'PageId' and no accessible extension method 'PageId' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 130: 'NavigationTreeViewModel' does not contain a definition for 'InPath' and no accessible extension method 'InPath' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 131: 'NavigationTreeViewModel' does not contain a definition for 'InPath' and no accessible extension method 'InPath' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 132: 'NavigationTreeViewModel' does not contain a definition for 'IsActive' and no accessible extension method 'IsActive' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 154: 'NavigationTreeViewModel' does not contain a definition for 'GetProductGroup' and the best extension method overload 'NavigationTreeViewNodeExtensions.GetProductGroup(NavigationTreeNodeViewModel)' requires a receiver of type 'NavigationTreeNodeViewModel'
Line 157: 'NavigationTreeViewModel' does not contain a definition for 'IsClickable' and no accessible extension method 'IsClickable' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 192: 'NavigationTreeViewModel' does not contain a definition for 'IsActive' and no accessible extension method 'IsActive' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 201: 'NavigationTreeViewModel' does not contain a definition for 'Link' and no accessible extension method 'Link' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 225: 'NavigationTreeViewModel' does not contain a definition for 'GroupId' and no accessible extension method 'GroupId' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 372: 'NavigationTreeViewModel' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 400: 'NavigationTreeViewModel' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 512: 'NavigationTreeViewModel' does not contain a definition for 'IsActive' and no accessible extension method 'IsActive' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 521: 'NavigationTreeViewModel' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 554: 'NavigationTreeViewModel' does not contain a definition for 'GroupId' and no accessible extension method 'GroupId' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 701: 'NavigationTreeViewModel' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 824: 'NavigationTreeViewModel' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 899: 'NavigationTreeViewModel' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 914: A local or parameter named 'node' cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter
Line 1019: 'NavigationTreeViewModel' does not contain a definition for 'Link' and no accessible extension method 'Link' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 1173: 'NavigationTreeViewModel' does not contain a definition for 'Link' and no accessible extension method 'Link' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 1276: 'NavigationTreeViewModel' does not contain a definition for 'PageId' and no accessible extension method 'PageId' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 1396: 'NavigationTreeViewModel' does not contain a definition for 'IsActive' and no accessible extension method 'IsActive' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
1 //------------------------------------------------------------------------------
2 // <auto-generated>
3 // This code was generated by a tool.
4 // Runtime Version:4.0.30319.42000
5 //
6 // Changes to this file may cause incorrect behavior and will be lost if
7 // the code is regenerated.
8 // </auto-generated>
9 //------------------------------------------------------------------------------
10
11 namespace CompiledRazorTemplates.Dynamic {
12 using System;
13 using System.Collections.Generic;
14 using System.Linq;
15
16 #line 2 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
17 using System.IO;
18
19 #line default
20 #line hidden
21
22 #line 3 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
23 using System.Text.RegularExpressions;
24
25 #line default
26 #line hidden
27
28 #line 4 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
29 using Dynamicweb;
30
31 #line default
32 #line hidden
33
34 #line 5 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
35 using Dynamicweb.Ecommerce.ProductCatalog;
36
37 #line default
38 #line hidden
39
40
41 public class RazorEngine_979979b979034c4eae3b3bea5a10bbb4 : Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.Navigation.NavigationTreeViewModel> {
42
43 #line hidden
44
45 public RazorEngine_979979b979034c4eae3b3bea5a10bbb4() {
46 }
47
48 public override void Execute() {
49 WriteLiteral("\r\n");
50
51
52 #line 7 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
53
54 string navType = Model?.Parameters["NavType"] != null ? Model.Parameters["NavType"].ToString() : "first-nav";
55 string menuId = Model.Parameters.ContainsKey("menu-id") ? $"menu_{Model.Parameters["menu-id"].ToString().ToLower()}" : string.Empty;
56
57
58 #line default
59 #line hidden
60 WriteLiteral("\r\n\r\n<div");
61
62 WriteAttribute("class", Tuple.Create(" class=\"", 488), Tuple.Create("\"", 575)
63 , Tuple.Create(Tuple.Create("", 496), Tuple.Create("nav", 496), true)
64
65 #line 12 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
66 , Tuple.Create(Tuple.Create(" ", 499), Tuple.Create<System.Object, System.Int32>(navType
67
68 #line default
69 #line hidden
70 , 500), false)
71 , Tuple.Create(Tuple.Create(" ", 508), Tuple.Create("flex-column", 509), true)
72 , Tuple.Create(Tuple.Create(" ", 520), Tuple.Create("h-auto", 521), true)
73 , Tuple.Create(Tuple.Create(" ", 527), Tuple.Create("w-100", 528), true)
74 , Tuple.Create(Tuple.Create(" ", 533), Tuple.Create("left-0", 534), true)
75 , Tuple.Create(Tuple.Create(" ", 540), Tuple.Create("top-0", 541), true)
76 , Tuple.Create(Tuple.Create(" ", 546), Tuple.Create("offcanvas-navigation", 547), true)
77
78 #line 12 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
79 , Tuple.Create(Tuple.Create(" ", 567), Tuple.Create<System.Object, System.Int32>(menuId
80
81 #line default
82 #line hidden
83 , 568), false)
84 );
85
86 WriteLiteral(">\r\n");
87
88
89 #line 13 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
90
91
92 #line default
93 #line hidden
94
95 #line 13 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
96 foreach (var node in Model.Nodes)
97 {
98
99 string productGroupImageShape = GetViewParameterString("ProductGroupImageShape") != null ? GetViewParameterString("ProductGroupImageShape") : string.Empty;
100 bool showProductGroupImage = GetViewParameterString("ShowProductGroupImage") != null ? GetViewParameterBoolean("ShowProductGroupImage") : false;
101 string productGroupPromotionImageTheme = GetViewParameterString("ProductGroupPromotionImageTheme") != null ? GetViewParameterString("ProductGroupPromotionImageTheme").ToLower() : string.Empty;
102 bool showProductGroupPromotionImage = GetViewParameterString("ShowProductGroupPromotionImage") != null ? GetViewParameterBoolean("ShowProductGroupPromotionImage") : false;
103
104 string ratio = GetViewParameterString("ImageAspectRatio") != null ? GetViewParameterString("ImageAspectRatio") : string.Empty;
105 ratio = ratio != "0" ? ratio : string.Empty;
106
107 var parameters = new Dictionary<string, object>();
108 parameters.Add("ProductGroupImageShape", productGroupImageShape);
109 parameters.Add("ShowProductGroupImage", showProductGroupImage);
110 parameters.Add("ProductGroupPromotionImageTheme", productGroupPromotionImageTheme);
111 parameters.Add("ShowProductGroupPromotionImage", showProductGroupPromotionImage);
112 parameters.Add("Ratio", ratio);
113
114 var page = Dynamicweb.Content.Services.Pages.GetPage(Model.PageId);
115 string pageType = page.ItemType;
116
117 var paragraphId = Pageview.CurrentParagraph.ID;
118 string groupId = Dynamicweb.Context.Current.Request["GroupID"] != null ? Dynamicweb.Context.Current.Request["GroupID"].ToString() : string.Empty;
119 string productId = Dynamicweb.Context.Current.Request["ProductID"] != null ? Dynamicweb.Context.Current.Request["ProductID"].ToString() : string.Empty;
120 string variantId = Dynamicweb.Context.Current.Request["VariantID"] != null ? Dynamicweb.Context.Current.Request["VariantID"].ToString() : string.Empty;
121
122 string productGroupImageSize = "24";
123
124 Regex reg = new Regex(@"\(([^\)]+)\)");
125
126 var navigationTree = new Stack<Dynamicweb.Frontend.Navigation.NavigationTreeNodeViewModel>(Model.Nodes);
127
128 var hasChildren = Model.Nodes.Count() > 0;
129 var nodeId = !string.IsNullOrEmpty(Model.GroupId) ? Model.GroupId : Model.PageId.ToString();
130 var inPathChecked = Model.InPath ? "checked" : string.Empty;
131 var inPathClass = Model.InPath ? " in-path" : string.Empty;
132 var activeClass = Model.IsActive ? " active fw-bold" : string.Empty;
133
134
135
136 #line default
137 #line hidden
138 WriteLiteral("\t<div");
139
140 WriteLiteral(" class=\"nav-item d-flex align-items-center w-100 py-1\"");
141
142 WriteLiteral(">\r\n");
143
144
145 #line 52 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
146
147
148 #line default
149 #line hidden
150
151 #line 52 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
152 if (pageType != "Swift_Preferences")
153 {
154 var group = Model.GetProductGroup();
155 IList<FieldValueViewModel> groupFields = group.GroupFields != null ? group.GroupFields : null;
156
157 if (Model.IsClickable)
158 {
159
160
161 #line default
162 #line hidden
163 WriteLiteral("\t\t\t\t<a");
164
165 WriteAttribute("class", Tuple.Create(" class=\"", 3308), Tuple.Create("\"", 3414)
166 , Tuple.Create(Tuple.Create("", 3316), Tuple.Create("nav-link", 3316), true)
167 , Tuple.Create(Tuple.Create(" ", 3324), Tuple.Create("position-relative", 3325), true)
168 , Tuple.Create(Tuple.Create(" ", 3342), Tuple.Create("d-flex", 3343), true)
169 , Tuple.Create(Tuple.Create(" ", 3349), Tuple.Create("align-items-center", 3350), true)
170 , Tuple.Create(Tuple.Create(" ", 3368), Tuple.Create("gap-2", 3369), true)
171 , Tuple.Create(Tuple.Create(" ", 3374), Tuple.Create("flex-grow-1", 3375), true)
172
173 #line 59 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
174 , Tuple.Create(Tuple.Create("", 3386), Tuple.Create<System.Object, System.Int32>(activeClass
175
176 #line default
177 #line hidden
178 , 3386), false)
179
180 #line 59 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
181 , Tuple.Create(Tuple.Create("", 3400), Tuple.Create<System.Object, System.Int32>(inPathClass
182
183 #line default
184 #line hidden
185 , 3400), false)
186 );
187
188 WriteLiteral(" ");
189
190
191 #line 59 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
192 Write(Model.IsActive ? "aria-current='page'" : string.Empty);
193
194
195 #line default
196 #line hidden
197 WriteLiteral(" href=\"");
198
199
200 #line 59 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
201 Write(Model.Link);
202
203
204 #line default
205 #line hidden
206 WriteLiteral("\" id=\"");
207
208
209 #line 59 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
210 Write(nodeId);
211
212
213 #line default
214 #line hidden
215 WriteLiteral("\">\r\n");
216
217
218 #line 60 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
219
220
221 #line default
222 #line hidden
223
224 #line 60 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
225 if (showProductGroupImage && !string.IsNullOrEmpty(Model.GroupId) && groupFields != null)
226 {
227 foreach (FieldValueViewModel field in groupFields)
228 {
229 if (field.SystemName == "ProductGroupNavigationImage" && !string.IsNullOrEmpty(field.Value.ToString()))
230 {
231 var groupImage = field.Value.ToString();
232
233 if (Path.GetExtension(groupImage).ToLower() == ".svg")
234 {
235
236
237 #line default
238 #line hidden
239 WriteLiteral("\t\t\t\t\t\t\t\t\t<span");
240
241 WriteAttribute("class", Tuple.Create(" class=\"", 3942), Tuple.Create("\"", 3983)
242 , Tuple.Create(Tuple.Create("", 3950), Tuple.Create("icon-auto", 3950), true)
243
244 #line 70 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
245 , Tuple.Create(Tuple.Create(" ", 3959), Tuple.Create<System.Object, System.Int32>(productGroupImageShape
246
247 #line default
248 #line hidden
249 , 3960), false)
250 );
251
252 WriteAttribute("style", Tuple.Create(" style=\"", 3984), Tuple.Create("\"", 4062)
253 , Tuple.Create(Tuple.Create("", 3992), Tuple.Create("height:", 3992), true)
254
255 #line 70 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
256 , Tuple.Create(Tuple.Create(" ", 3999), Tuple.Create<System.Object, System.Int32>(productGroupImageSize
257
258 #line default
259 #line hidden
260 , 4000), false)
261 , Tuple.Create(Tuple.Create("", 4024), Tuple.Create("px;", 4024), true)
262 , Tuple.Create(Tuple.Create(" ", 4027), Tuple.Create("width:", 4028), true)
263
264 #line 70 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
265 , Tuple.Create(Tuple.Create(" ", 4034), Tuple.Create<System.Object, System.Int32>(productGroupImageSize
266
267 #line default
268 #line hidden
269 , 4035), false)
270 , Tuple.Create(Tuple.Create("", 4059), Tuple.Create("px;", 4059), true)
271 );
272
273 WriteLiteral(">\r\n");
274
275 WriteLiteral("\t\t\t\t\t\t\t\t\t\t");
276
277
278 #line 71 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
279 Write(ReadFile("/Files/Images/" + groupImage));
280
281
282 #line default
283 #line hidden
284 WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t</span>\r\n");
285
286
287 #line 73 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
288 }
289 else
290 {
291 var imagePath = "/Admin/Public/GetImage.ashx?Image=" + "/Files/Images/" + Dynamicweb.Context.Current.Server.UrlEncode(groupImage) + "&Width=" + productGroupImageSize + "&Height=" + productGroupImageSize + "&crop=0";
292
293
294 #line default
295 #line hidden
296 WriteLiteral("\t\t\t\t\t\t\t\t\t<img");
297
298 WriteLiteral(" loading=\"lazy\"");
299
300 WriteAttribute("class", Tuple.Create(" class=\"", 4426), Tuple.Create("\"", 4457)
301
302 #line 77 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
303 , Tuple.Create(Tuple.Create("", 4434), Tuple.Create<System.Object, System.Int32>(productGroupImageShape
304
305 #line default
306 #line hidden
307 , 4434), false)
308 );
309
310 WriteAttribute("alt", Tuple.Create(" alt=\"", 4458), Tuple.Create("\"", 4475)
311
312 #line 77 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
313 , Tuple.Create(Tuple.Create("", 4464), Tuple.Create<System.Object, System.Int32>(group.Name
314
315 #line default
316 #line hidden
317 , 4464), false)
318 );
319
320 WriteAttribute("width", Tuple.Create(" width=\"", 4476), Tuple.Create("\"", 4506)
321
322 #line 77 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
323 , Tuple.Create(Tuple.Create("", 4484), Tuple.Create<System.Object, System.Int32>(productGroupImageSize
324
325 #line default
326 #line hidden
327 , 4484), false)
328 );
329
330 WriteAttribute("height", Tuple.Create(" height=\"", 4507), Tuple.Create("\"", 4538)
331
332 #line 77 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
333 , Tuple.Create(Tuple.Create("", 4516), Tuple.Create<System.Object, System.Int32>(productGroupImageSize
334
335 #line default
336 #line hidden
337 , 4516), false)
338 );
339
340 WriteAttribute("src", Tuple.Create(" src=\"", 4539), Tuple.Create("\"", 4555)
341
342 #line 77 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
343 , Tuple.Create(Tuple.Create("", 4545), Tuple.Create<System.Object, System.Int32>(imagePath
344
345 #line default
346 #line hidden
347 , 4545), false)
348 );
349
350 WriteLiteral(">\r\n");
351
352
353 #line 78 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
354 }
355 }
356 }
357 }
358
359
360 #line default
361 #line hidden
362 WriteLiteral("\t\t\t\t\t<span");
363
364 WriteLiteral(" class=\"flex-grow-1\"");
365
366 WriteLiteral(">\r\n");
367
368 WriteLiteral("\t\t\t\t\t\t");
369
370
371 #line 83 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
372 Write(Model.Name);
373
374
375 #line default
376 #line hidden
377 WriteLiteral("\r\n\t\t\t\t\t</span>\r\n\t\t\t\t</a>\r\n");
378
379
380 #line 86 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
381
382 if (hasChildren)
383 {
384
385
386 #line default
387 #line hidden
388 WriteLiteral("\t\t\t\t\t<label");
389
390 WriteLiteral(" class=\"nav-link position-relative\"");
391
392 WriteLiteral(" role=\"button\"");
393
394 WriteLiteral(" tabindex=\"0\"");
395
396 WriteAttribute("aria-label", Tuple.Create(" aria-label=\"", 4777), Tuple.Create("\"", 4808)
397 , Tuple.Create(Tuple.Create("", 4790), Tuple.Create("Unfold", 4790), true)
398
399 #line 89 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
400 , Tuple.Create(Tuple.Create(" ", 4796), Tuple.Create<System.Object, System.Int32>(Model.Name
401
402 #line default
403 #line hidden
404 , 4797), false)
405 );
406
407 WriteAttribute("for", Tuple.Create(" for=\"", 4809), Tuple.Create("\"", 4843)
408 , Tuple.Create(Tuple.Create("", 4815), Tuple.Create("nav_", 4815), true)
409
410 #line 89 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
411 , Tuple.Create(Tuple.Create("", 4819), Tuple.Create<System.Object, System.Int32>(paragraphId
412
413 #line default
414 #line hidden
415 , 4819), false)
416 , Tuple.Create(Tuple.Create("", 4833), Tuple.Create("_", 4833), true)
417
418 #line 89 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
419 , Tuple.Create(Tuple.Create("", 4834), Tuple.Create<System.Object, System.Int32>(nodeId
420
421 #line default
422 #line hidden
423 , 4834), false)
424 );
425
426 WriteLiteral(">\r\n");
427
428
429 #line 90 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
430
431
432 #line default
433 #line hidden
434
435 #line 90 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
436
437 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/arrow-right.svg";
438 if (!iconPath.ToLower().Contains("none") && iconPath != string.Empty)
439 {
440 iconPath = Dynamicweb.Context.Current.Server.MapPath(iconPath);
441
442
443 #line default
444 #line hidden
445 WriteLiteral("\t\t\t\t\t\t\t\t<span");
446
447 WriteLiteral(" class=\"icon-3\"");
448
449 WriteLiteral(">");
450
451
452 #line 95 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
453 Write(ReadFile(iconPath));
454
455
456 #line default
457 #line hidden
458 WriteLiteral("</span>\r\n");
459
460
461 #line 96 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
462 }
463
464
465 #line default
466 #line hidden
467 WriteLiteral("\r\n\t\t\t\t\t</label>\r\n");
468
469
470 #line 99 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
471 }
472 }
473 else
474 {
475
476
477 #line default
478 #line hidden
479 WriteLiteral("\t\t\t\t<label");
480
481 WriteAttribute("class", Tuple.Create(" class=\"", 5237), Tuple.Create("\"", 5343)
482 , Tuple.Create(Tuple.Create("", 5245), Tuple.Create("nav-link", 5245), true)
483 , Tuple.Create(Tuple.Create(" ", 5253), Tuple.Create("position-relative", 5254), true)
484 , Tuple.Create(Tuple.Create(" ", 5271), Tuple.Create("d-flex", 5272), true)
485 , Tuple.Create(Tuple.Create(" ", 5278), Tuple.Create("align-items-center", 5279), true)
486 , Tuple.Create(Tuple.Create(" ", 5297), Tuple.Create("gap-2", 5298), true)
487 , Tuple.Create(Tuple.Create(" ", 5303), Tuple.Create("flex-grow-1", 5304), true)
488
489 #line 103 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
490 , Tuple.Create(Tuple.Create("", 5315), Tuple.Create<System.Object, System.Int32>(activeClass
491
492 #line default
493 #line hidden
494 , 5315), false)
495
496 #line 103 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
497 , Tuple.Create(Tuple.Create("", 5329), Tuple.Create<System.Object, System.Int32>(inPathClass
498
499 #line default
500 #line hidden
501 , 5329), false)
502 );
503
504 WriteLiteral(" role=\"button\"");
505
506 WriteLiteral(" tabindex=\"0\"");
507
508 WriteLiteral(" ");
509
510
511 #line 103 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
512 Write(Model.IsActive ? "aria-current='page'" : "");
513
514
515 #line default
516 #line hidden
517 WriteLiteral(" aria-label=\"Unfold ");
518
519
520 #line 103 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
521 Write(Model.Name);
522
523
524 #line default
525 #line hidden
526 WriteLiteral("\" for=\"nav_");
527
528
529 #line 103 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
530 Write(paragraphId);
531
532
533 #line default
534 #line hidden
535 WriteLiteral("_");
536
537
538 #line 103 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
539 Write(nodeId);
540
541
542 #line default
543 #line hidden
544 WriteLiteral("\">\r\n");
545
546
547 #line 104 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
548
549
550 #line default
551 #line hidden
552
553 #line 104 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
554 if (showProductGroupImage && !string.IsNullOrEmpty(Model.GroupId) && groupFields != null)
555 {
556 foreach (FieldValueViewModel field in groupFields)
557 {
558 if (field.SystemName == "ProductGroupNavigationImage" && !string.IsNullOrEmpty(field.Value.ToString()))
559 {
560 var groupImage = field.Value.ToString();
561
562 if (Path.GetExtension(groupImage).ToLower() == ".svg")
563 {
564
565
566 #line default
567 #line hidden
568 WriteLiteral("\t\t\t\t\t\t\t\t\t<span");
569
570 WriteAttribute("class", Tuple.Create(" class=\"", 5923), Tuple.Create("\"", 5964)
571 , Tuple.Create(Tuple.Create("", 5931), Tuple.Create("icon-auto", 5931), true)
572
573 #line 114 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
574 , Tuple.Create(Tuple.Create(" ", 5940), Tuple.Create<System.Object, System.Int32>(productGroupImageShape
575
576 #line default
577 #line hidden
578 , 5941), false)
579 );
580
581 WriteAttribute("style", Tuple.Create(" style=\"", 5965), Tuple.Create("\"", 6043)
582 , Tuple.Create(Tuple.Create("", 5973), Tuple.Create("height:", 5973), true)
583
584 #line 114 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
585 , Tuple.Create(Tuple.Create(" ", 5980), Tuple.Create<System.Object, System.Int32>(productGroupImageSize
586
587 #line default
588 #line hidden
589 , 5981), false)
590 , Tuple.Create(Tuple.Create("", 6005), Tuple.Create("px;", 6005), true)
591 , Tuple.Create(Tuple.Create(" ", 6008), Tuple.Create("width:", 6009), true)
592
593 #line 114 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
594 , Tuple.Create(Tuple.Create(" ", 6015), Tuple.Create<System.Object, System.Int32>(productGroupImageSize
595
596 #line default
597 #line hidden
598 , 6016), false)
599 , Tuple.Create(Tuple.Create("", 6040), Tuple.Create("px;", 6040), true)
600 );
601
602 WriteLiteral(">\r\n");
603
604 WriteLiteral("\t\t\t\t\t\t\t\t\t\t");
605
606
607 #line 115 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
608 Write(ReadFile("/Files/Images/" + groupImage));
609
610
611 #line default
612 #line hidden
613 WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t</span>\r\n");
614
615
616 #line 117 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
617 }
618 else
619 {
620 var imagePath = "/Admin/Public/GetImage.ashx?Image=" + "/Files/Images/" + Dynamicweb.Context.Current.Server.UrlEncode(groupImage) + "&Width=" + productGroupImageSize + "&Height=" + productGroupImageSize + "&crop=0";
621
622
623 #line default
624 #line hidden
625 WriteLiteral("\t\t\t\t\t\t\t\t\t<img");
626
627 WriteLiteral(" loading=\"lazy\"");
628
629 WriteAttribute("class", Tuple.Create(" class=\"", 6407), Tuple.Create("\"", 6438)
630
631 #line 121 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
632 , Tuple.Create(Tuple.Create("", 6415), Tuple.Create<System.Object, System.Int32>(productGroupImageShape
633
634 #line default
635 #line hidden
636 , 6415), false)
637 );
638
639 WriteAttribute("alt", Tuple.Create(" alt=\"", 6439), Tuple.Create("\"", 6456)
640
641 #line 121 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
642 , Tuple.Create(Tuple.Create("", 6445), Tuple.Create<System.Object, System.Int32>(group.Name
643
644 #line default
645 #line hidden
646 , 6445), false)
647 );
648
649 WriteAttribute("width", Tuple.Create(" width=\"", 6457), Tuple.Create("\"", 6487)
650
651 #line 121 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
652 , Tuple.Create(Tuple.Create("", 6465), Tuple.Create<System.Object, System.Int32>(productGroupImageSize
653
654 #line default
655 #line hidden
656 , 6465), false)
657 );
658
659 WriteAttribute("height", Tuple.Create(" height=\"", 6488), Tuple.Create("\"", 6519)
660
661 #line 121 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
662 , Tuple.Create(Tuple.Create("", 6497), Tuple.Create<System.Object, System.Int32>(productGroupImageSize
663
664 #line default
665 #line hidden
666 , 6497), false)
667 );
668
669 WriteAttribute("src", Tuple.Create(" src=\"", 6520), Tuple.Create("\"", 6536)
670
671 #line 121 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
672 , Tuple.Create(Tuple.Create("", 6526), Tuple.Create<System.Object, System.Int32>(imagePath
673
674 #line default
675 #line hidden
676 , 6526), false)
677 );
678
679 WriteLiteral(">\r\n");
680
681
682 #line 122 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
683 }
684 }
685 }
686 }
687
688
689 #line default
690 #line hidden
691 WriteLiteral("\r\n\t\t\t\t\t<span");
692
693 WriteLiteral(" class=\"flex-grow-1\"");
694
695 WriteLiteral(">\r\n");
696
697 WriteLiteral("\t\t\t\t\t\t");
698
699
700 #line 128 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
701 Write(Model.Name);
702
703
704 #line default
705 #line hidden
706 WriteLiteral("\r\n\t\t\t\t\t</span>\r\n\r\n");
707
708
709 #line 131 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
710
711
712 #line default
713 #line hidden
714
715 #line 131 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
716 if (hasChildren)
717 {
718 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/arrow-right.svg";
719 if (!iconPath.ToLower().Contains("none") && iconPath != string.Empty)
720 {
721 iconPath = Dynamicweb.Context.Current.Server.MapPath(iconPath);
722
723
724 #line default
725 #line hidden
726 WriteLiteral("\t\t\t\t\t\t\t<span");
727
728 WriteLiteral(" class=\"icon-3\"");
729
730 WriteLiteral(">");
731
732
733 #line 137 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
734 Write(ReadFile(iconPath));
735
736
737 #line default
738 #line hidden
739 WriteLiteral("</span>\r\n");
740
741
742 #line 138 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
743 }
744 }
745
746
747 #line default
748 #line hidden
749 WriteLiteral("\t\t\t\t</label>\r\n");
750
751
752 #line 141 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
753 }
754
755 if (hasChildren)
756 {
757
758
759 #line default
760 #line hidden
761 WriteLiteral("\t\t\t\t<input");
762
763 WriteLiteral(" type=\"checkbox\"");
764
765 WriteLiteral(" class=\"visually-hidden sub-nav-check\"");
766
767 WriteAttribute("id", Tuple.Create(" id=\"", 7112), Tuple.Create("\"", 7145)
768 , Tuple.Create(Tuple.Create("", 7117), Tuple.Create("nav_", 7117), true)
769
770 #line 145 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
771 , Tuple.Create(Tuple.Create("", 7121), Tuple.Create<System.Object, System.Int32>(paragraphId
772
773 #line default
774 #line hidden
775 , 7121), false)
776 , Tuple.Create(Tuple.Create("", 7135), Tuple.Create("_", 7135), true)
777
778 #line 145 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
779 , Tuple.Create(Tuple.Create("", 7136), Tuple.Create<System.Object, System.Int32>(nodeId
780
781 #line default
782 #line hidden
783 , 7136), false)
784 );
785
786 WriteLiteral(" ");
787
788
789 #line 145 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
790 Write(inPathChecked);
791
792
793 #line default
794 #line hidden
795 WriteLiteral(">\r\n");
796
797 WriteLiteral("\t\t\t\t<div");
798
799 WriteLiteral(" class=\"nav sub-nav position-absolute h-100 opacity-0 pe-none invisible w-100 lef" +
800 "t-0 top-0\"");
801
802 WriteLiteral(">\r\n\t\t\t\t\t<div");
803
804 WriteLiteral(" class=\"h-100 w-100 overflow-y-auto overflow-x-hidden\"");
805
806 WriteLiteral(">\r\n\t\t\t\t\t\t<div");
807
808 WriteLiteral(" class=\"nav-header position-relative py-1\"");
809
810 WriteLiteral(">\r\n\t\t\t\t\t\t\t<label");
811
812 WriteLiteral(" class=\"nav-link position-relative d-flex align-items-center gap-2 flex-grow-1\"");
813
814 WriteLiteral(" role=\"button\"");
815
816 WriteLiteral(" tabindex=\"0\"");
817
818 WriteAttribute("aria-label", Tuple.Create(" aria-label=\"", 7506), Tuple.Create("\"", 7541)
819 , Tuple.Create(Tuple.Create("", 7519), Tuple.Create("Go", 7519), true)
820 , Tuple.Create(Tuple.Create(" ", 7521), Tuple.Create("back", 7522), true)
821 , Tuple.Create(Tuple.Create(" ", 7526), Tuple.Create("to", 7527), true)
822
823 #line 149 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
824 , Tuple.Create(Tuple.Create(" ", 7529), Tuple.Create<System.Object, System.Int32>(Model.Name
825
826 #line default
827 #line hidden
828 , 7530), false)
829 );
830
831 WriteAttribute("for", Tuple.Create(" for=\"", 7542), Tuple.Create("\"", 7576)
832 , Tuple.Create(Tuple.Create("", 7548), Tuple.Create("nav_", 7548), true)
833
834 #line 149 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
835 , Tuple.Create(Tuple.Create("", 7552), Tuple.Create<System.Object, System.Int32>(paragraphId
836
837 #line default
838 #line hidden
839 , 7552), false)
840 , Tuple.Create(Tuple.Create("", 7566), Tuple.Create("_", 7566), true)
841
842 #line 149 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
843 , Tuple.Create(Tuple.Create("", 7567), Tuple.Create<System.Object, System.Int32>(nodeId
844
845 #line default
846 #line hidden
847 , 7567), false)
848 );
849
850 WriteLiteral(">\r\n");
851
852
853 #line 150 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
854
855
856 #line default
857 #line hidden
858
859 #line 150 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
860
861 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/arrow-left.svg";
862 if (!iconPath.ToLower().Contains("none") && iconPath != string.Empty)
863 {
864 iconPath = Dynamicweb.Context.Current.Server.MapPath(iconPath);
865
866
867 #line default
868 #line hidden
869 WriteLiteral("\t\t\t\t\t\t\t\t\t\t<span");
870
871 WriteLiteral(" class=\"icon-3\"");
872
873 WriteLiteral(">");
874
875
876 #line 155 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
877 Write(ReadFile(iconPath));
878
879
880 #line default
881 #line hidden
882 WriteLiteral("</span>\r\n");
883
884
885 #line 156 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
886 }
887
888
889 #line default
890 #line hidden
891 WriteLiteral("\r\n\t\t\t\t\t\t\t\t<span");
892
893 WriteLiteral(" class=\"flex-grow-1\"");
894
895 WriteLiteral(">");
896
897
898 #line 158 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
899 Write(Model.Name);
900
901
902 #line default
903 #line hidden
904 WriteLiteral("</span>\r\n\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t</div>\r\n\r\n");
905
906
907 #line 162 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
908
909
910 #line default
911 #line hidden
912
913 #line 162 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
914 foreach (var node in Model.Nodes)
915 {
916
917
918 #line default
919 #line hidden
920
921 #line 164 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
922 Write(RenderPartial("Navigation/OffCanvasNavigation/NavItem.cshtml", node, parameters));
923
924
925 #line default
926 #line hidden
927
928 #line 164 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
929
930 }
931
932
933 #line default
934 #line hidden
935 WriteLiteral("\r\n");
936
937
938 #line 167 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
939
940
941 #line default
942 #line hidden
943
944 #line 167 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
945 if (groupFields != null)
946 {
947 var groupName = group.Name;
948 string ratioCssClass = ratio != string.Empty ? " ratio" : string.Empty;
949 string ratioVariable = ratio != string.Empty ? "style=\"--bs-aspect-ratio: " + ratio + "\"" : string.Empty;
950 string productGroupPromotionImage = string.Empty;
951 string productGroupPromotionImagePath = string.Empty;
952 string productGroupPromotionDescription = string.Empty;
953 string productGroupPromotionLinkLabel = string.Empty;
954 string productGroupPromotionLink = string.Empty;
955 string gridGap = !string.IsNullOrEmpty(productGroupPromotionImageTheme) ? "gap-0" : "gap-3";
956 string themePadding = !string.IsNullOrEmpty(productGroupPromotionImageTheme) ? "p-3" : "p-0";
957
958 foreach (FieldValueViewModel field in groupFields)
959 {
960 if (field.SystemName == "ProductGroupPromotionImage")
961 {
962 productGroupPromotionImage = field.Value != null ? field.Value.ToString() : string.Empty;
963 productGroupPromotionImagePath = "/Admin/Public/GetImage.ashx?Width=" + 480 + "&crop=0&image=" + "Files/Images/" + productGroupPromotionImage;
964 }
965 if (field.SystemName == "ProductGroupPromotionDescription")
966 {
967 productGroupPromotionDescription = field.Value != null ? field.Value.ToString() : string.Empty;
968 }
969 if (field.SystemName == "ProductGroupPromotionLinkLabel")
970 {
971 productGroupPromotionLinkLabel = field.Value != null ? field.Value.ToString() : string.Empty;
972 }
973 if (field.SystemName == "ProductGroupPromotionLink")
974 {
975 productGroupPromotionLink = field.Value != null ? field.Value.ToString() : string.Empty;
976 }
977 }
978 if (showProductGroupPromotionImage)
979 {
980
981
982 #line default
983 #line hidden
984 WriteLiteral("\t\t\t\t\t\t\t\t<div");
985
986 WriteAttribute("class", Tuple.Create(" class=\"", 10008), Tuple.Create("\"", 10080)
987 , Tuple.Create(Tuple.Create("", 10016), Tuple.Create("grid", 10016), true)
988 , Tuple.Create(Tuple.Create(" ", 10020), Tuple.Create("grid-1", 10021), true)
989 , Tuple.Create(Tuple.Create(" ", 10027), Tuple.Create("mt-3", 10028), true)
990 , Tuple.Create(Tuple.Create(" ", 10032), Tuple.Create("mx-3", 10033), true)
991
992 #line 202 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
993 , Tuple.Create(Tuple.Create(" ", 10037), Tuple.Create<System.Object, System.Int32>(gridGap
994
995 #line default
996 #line hidden
997 , 10038), false)
998
999 #line 202 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1000 , Tuple.Create(Tuple.Create("", 10046), Tuple.Create<System.Object, System.Int32>(productGroupPromotionImageTheme
1001
1002 #line default
1003 #line hidden
1004 , 10046), false)
1005 );
1006
1007 WriteLiteral(">\r\n");
1008
1009
1010 #line 203 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1011
1012
1013 #line default
1014 #line hidden
1015
1016 #line 203 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1017 if (productGroupPromotionImage != string.Empty)
1018 {
1019 productGroupPromotionLink = !string.IsNullOrEmpty(productGroupPromotionLink) ? productGroupPromotionLink : Model.Link;
1020
1021
1022
1023 #line default
1024 #line hidden
1025 WriteLiteral("\t\t\t\t\t\t\t\t\t\t<a");
1026
1027 WriteAttribute("href", Tuple.Create(" href=\"", 10299), Tuple.Create("\"", 10332)
1028
1029 #line 207 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1030 , Tuple.Create(Tuple.Create("", 10306), Tuple.Create<System.Object, System.Int32>(productGroupPromotionLink
1031
1032 #line default
1033 #line hidden
1034 , 10306), false)
1035 );
1036
1037 WriteAttribute("title", Tuple.Create(" title=\"", 10333), Tuple.Create("\"", 10351)
1038
1039 #line 207 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1040 , Tuple.Create(Tuple.Create("", 10341), Tuple.Create<System.Object, System.Int32>(groupName
1041
1042 #line default
1043 #line hidden
1044 , 10341), false)
1045 );
1046
1047 WriteLiteral(">\r\n\t\t\t\t\t\t\t\t\t\t\t<figure");
1048
1049 WriteAttribute("class", Tuple.Create(" class=\"", 10373), Tuple.Create("\"", 10400)
1050 , Tuple.Create(Tuple.Create("", 10381), Tuple.Create("m-0", 10381), true)
1051
1052 #line 208 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1053 , Tuple.Create(Tuple.Create("", 10384), Tuple.Create<System.Object, System.Int32>(ratioCssClass
1054
1055 #line default
1056 #line hidden
1057 , 10384), false)
1058 );
1059
1060 WriteLiteral(" ");
1061
1062
1063 #line 208 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1064 Write(ratioVariable);
1065
1066
1067 #line default
1068 #line hidden
1069 WriteLiteral(">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<img");
1070
1071 WriteLiteral(" class=\"img-fluid\"");
1072
1073 WriteAttribute("src", Tuple.Create(" src=\"", 10453), Tuple.Create("\"", 10490)
1074
1075 #line 209 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1076 , Tuple.Create(Tuple.Create("", 10459), Tuple.Create<System.Object, System.Int32>(productGroupPromotionImagePath
1077
1078 #line default
1079 #line hidden
1080 , 10459), false)
1081 );
1082
1083 WriteAttribute("alt", Tuple.Create(" alt=\"", 10491), Tuple.Create("\"", 10507)
1084
1085 #line 209 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1086 , Tuple.Create(Tuple.Create("", 10497), Tuple.Create<System.Object, System.Int32>(groupName
1087
1088 #line default
1089 #line hidden
1090 , 10497), false)
1091 );
1092
1093 WriteLiteral(" style=\"object-fit:cover\"");
1094
1095 WriteLiteral(">\r\n\t\t\t\t\t\t\t\t\t\t\t</figure>\r\n\t\t\t\t\t\t\t\t\t\t</a>\r\n");
1096
1097
1098 #line 212 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1099 }
1100
1101
1102 #line default
1103 #line hidden
1104 WriteLiteral("\t\t\t\t\t\t\t\t\t");
1105
1106
1107 #line 213 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1108 if (!string.IsNullOrEmpty(productGroupPromotionDescription) || !string.IsNullOrEmpty(productGroupPromotionLinkLabel))
1109 {
1110
1111
1112 #line default
1113 #line hidden
1114 WriteLiteral("\t\t\t\t\t\t\t\t\t\t<div");
1115
1116 WriteAttribute("class", Tuple.Create(" class=\"", 10741), Tuple.Create("\"", 10775)
1117 , Tuple.Create(Tuple.Create("", 10749), Tuple.Create("grid", 10749), true)
1118 , Tuple.Create(Tuple.Create(" ", 10753), Tuple.Create("grid-1", 10754), true)
1119
1120 #line 215 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1121 , Tuple.Create(Tuple.Create(" ", 10760), Tuple.Create<System.Object, System.Int32>(themePadding
1122
1123 #line default
1124 #line hidden
1125 , 10761), false)
1126 , Tuple.Create(Tuple.Create(" ", 10774), Tuple.Create("", 10774), true)
1127 );
1128
1129 WriteLiteral(">\r\n\r\n");
1130
1131
1132 #line 217 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1133
1134
1135 #line default
1136 #line hidden
1137
1138 #line 217 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1139 if (!string.IsNullOrEmpty(productGroupPromotionDescription))
1140 {
1141
1142
1143 #line default
1144 #line hidden
1145 WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t\t<h6");
1146
1147 WriteLiteral(" class=\"m-0\"");
1148
1149 WriteLiteral(">");
1150
1151
1152 #line 219 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1153 Write(productGroupPromotionDescription);
1154
1155
1156 #line default
1157 #line hidden
1158 WriteLiteral("</h6>\r\n");
1159
1160
1161 #line 220 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1162 }
1163
1164
1165 #line default
1166 #line hidden
1167 WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t");
1168
1169
1170 #line 221 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1171 if (!string.IsNullOrEmpty(productGroupPromotionLinkLabel))
1172 {
1173 productGroupPromotionLink = !string.IsNullOrEmpty(productGroupPromotionLink) ? productGroupPromotionLink : Model.Link;
1174
1175
1176
1177 #line default
1178 #line hidden
1179 WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t\t<a");
1180
1181 WriteAttribute("href", Tuple.Create(" href=\"", 11185), Tuple.Create("\"", 11218)
1182
1183 #line 225 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1184 , Tuple.Create(Tuple.Create("", 11192), Tuple.Create<System.Object, System.Int32>(productGroupPromotionLink
1185
1186 #line default
1187 #line hidden
1188 , 11192), false)
1189 );
1190
1191 WriteAttribute("title", Tuple.Create(" title=\"", 11219), Tuple.Create("\"", 11258)
1192
1193 #line 225 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1194 , Tuple.Create(Tuple.Create("", 11227), Tuple.Create<System.Object, System.Int32>(productGroupPromotionLinkLabel
1195
1196 #line default
1197 #line hidden
1198 , 11227), false)
1199 );
1200
1201 WriteLiteral(" class=\"btn btn-link text-start border-0 p-0\"");
1202
1203 WriteLiteral(">");
1204
1205
1206 #line 225 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1207 Write(productGroupPromotionLinkLabel);
1208
1209
1210 #line default
1211 #line hidden
1212 WriteLiteral("</a>\r\n");
1213
1214
1215 #line 226 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1216 }
1217
1218
1219 #line default
1220 #line hidden
1221 WriteLiteral("\t\t\t\t\t\t\t\t\t\t</div>\r\n");
1222
1223
1224 #line 228 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1225 }
1226
1227
1228 #line default
1229 #line hidden
1230 WriteLiteral("\t\t\t\t\t\t\t\t</div>\r\n");
1231
1232
1233 #line 230 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1234 }
1235 }
1236
1237
1238 #line default
1239 #line hidden
1240 WriteLiteral("\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n");
1241
1242
1243 #line 234 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1244 }
1245 }
1246 else
1247 {
1248 bool countrySelector = page.Item?["CountrySelector"] != null ? Convert.ToBoolean(page.Item["CountrySelector"].ToString()) : false;
1249 bool languageSelector = page.Item?["LanguageSelector"] != null ? Convert.ToBoolean(page.Item["LanguageSelector"].ToString()) : false;
1250 bool currencySelector = page.Item?["CurrencySelector"] != null ? Convert.ToBoolean(page.Item["CurrencySelector"].ToString()) : false;
1251 string name = Translate("Preferences");
1252 string icon = string.Empty;
1253
1254 if (languageSelector)
1255 {
1256 bool hideIcon = page.Item?["HideIcon"] != null ? Convert.ToBoolean(page.Item["HideIcon"].ToString()) : false;
1257
1258 if (!hideIcon)
1259 {
1260 icon = $"/Files/FlagIcons/{Pageview.Area.CultureInfo.Name.ToLower()}.svg";
1261 }
1262
1263 name = reg.Replace(Pageview.Area.CultureInfo.DisplayName, string.Empty);
1264 }
1265
1266
1267
1268 #line default
1269 #line hidden
1270 WriteLiteral("\t\t\t<form");
1271
1272 WriteAttribute("action", Tuple.Create(" action=\"", 12319), Tuple.Create("\"", 12358)
1273 , Tuple.Create(Tuple.Create("", 12328), Tuple.Create("/Default.aspx?ID=", 12328), true)
1274
1275 #line 256 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1276 , Tuple.Create(Tuple.Create("", 12345), Tuple.Create<System.Object, System.Int32>(Model.PageId
1277
1278 #line default
1279 #line hidden
1280 , 12345), false)
1281 );
1282
1283 WriteLiteral(" data-response-target-element=\"PreferencesModalContent\"");
1284
1285 WriteLiteral(" data-layout-template=\"Swift_Preferences.cshtml\"");
1286
1287 WriteLiteral(" data-preloader=\"inline\"");
1288
1289 WriteLiteral(" class=\"w-100\"");
1290
1291 WriteLiteral(">\r\n\t\t\t\t<input");
1292
1293 WriteLiteral(" type=\"hidden\"");
1294
1295 WriteLiteral(" name=\"Layout\"");
1296
1297 WriteLiteral(" value=\"modal\"");
1298
1299 WriteLiteral(">\r\n\t\t\t\t<input");
1300
1301 WriteLiteral(" type=\"hidden\"");
1302
1303 WriteLiteral(" name=\"CurrentPageID\"");
1304
1305 WriteAttribute("value", Tuple.Create(" value=\"", 12603), Tuple.Create("\"", 12623)
1306
1307 #line 258 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1308 , Tuple.Create(Tuple.Create("", 12611), Tuple.Create<System.Object, System.Int32>(Pageview.ID
1309
1310 #line default
1311 #line hidden
1312 , 12611), false)
1313 );
1314
1315 WriteLiteral(">\r\n\t\t\t\t<input");
1316
1317 WriteLiteral(" type=\"hidden\"");
1318
1319 WriteLiteral(" name=\"GroupID\"");
1320
1321 WriteAttribute("value", Tuple.Create(" value=\"", 12666), Tuple.Create("\"", 12682)
1322
1323 #line 259 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1324 , Tuple.Create(Tuple.Create("", 12674), Tuple.Create<System.Object, System.Int32>(groupId
1325
1326 #line default
1327 #line hidden
1328 , 12674), false)
1329 );
1330
1331 WriteLiteral(">\r\n\t\t\t\t<input");
1332
1333 WriteLiteral(" type=\"hidden\"");
1334
1335 WriteLiteral(" name=\"ProductID\"");
1336
1337 WriteAttribute("value", Tuple.Create(" value=\"", 12727), Tuple.Create("\"", 12745)
1338
1339 #line 260 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1340 , Tuple.Create(Tuple.Create("", 12735), Tuple.Create<System.Object, System.Int32>(productId
1341
1342 #line default
1343 #line hidden
1344 , 12735), false)
1345 );
1346
1347 WriteLiteral(">\r\n\t\t\t\t<input");
1348
1349 WriteLiteral(" type=\"hidden\"");
1350
1351 WriteLiteral(" name=\"VariantID\"");
1352
1353 WriteAttribute("value", Tuple.Create(" value=\"", 12790), Tuple.Create("\"", 12808)
1354
1355 #line 261 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1356 , Tuple.Create(Tuple.Create("", 12798), Tuple.Create<System.Object, System.Int32>(variantId
1357
1358 #line default
1359 #line hidden
1360 , 12798), false)
1361 );
1362
1363 WriteLiteral(">\r\n\t\t\t\t<a");
1364
1365 WriteLiteral(" href=\"#\"");
1366
1367 WriteLiteral(" role=\"button\"");
1368
1369 WriteLiteral(" onclick=\"swift.PageUpdater.Update(event)\"");
1370
1371 WriteAttribute("class", Tuple.Create(" class=\"", 12883), Tuple.Create("\"", 12982)
1372 , Tuple.Create(Tuple.Create("", 12891), Tuple.Create("nav-link", 12891), true)
1373 , Tuple.Create(Tuple.Create(" ", 12899), Tuple.Create("position-relative", 12900), true)
1374 , Tuple.Create(Tuple.Create(" ", 12917), Tuple.Create("flex-fill", 12918), true)
1375 , Tuple.Create(Tuple.Create(" ", 12927), Tuple.Create("swift_open-preferences-modal", 12928), true)
1376
1377 #line 262 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1378 , Tuple.Create(Tuple.Create(" ", 12956), Tuple.Create<System.Object, System.Int32>(activeClass
1379
1380 #line default
1381 #line hidden
1382 , 12957), false)
1383
1384 #line 262 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1385 , Tuple.Create(Tuple.Create(" ", 12969), Tuple.Create<System.Object, System.Int32>(inPathClass
1386
1387 #line default
1388 #line hidden
1389 , 12970), false)
1390 );
1391
1392 WriteLiteral(" ");
1393
1394
1395 #line 262 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1396 Write(Model.IsActive ? "aria-current='page'" : "");
1397
1398
1399 #line default
1400 #line hidden
1401 WriteLiteral(" data-bs-toggle=\"modal\" data-bs-target=\"#PreferencesModal\">\r\n");
1402
1403
1404 #line 263 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1405
1406
1407 #line default
1408 #line hidden
1409
1410 #line 263 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1411 if (icon != "")
1412 {
1413 if (Path.GetExtension(icon).ToLower() == ".svg" && !icon.ToLower().Contains("none"))
1414 {
1415 string iconPath = Dynamicweb.Context.Current.Server.MapPath(icon);
1416
1417
1418
1419 #line default
1420 #line hidden
1421 WriteLiteral("\t\t\t\t\t\t\t<span");
1422
1423 WriteLiteral(" class=\"icon-2\"");
1424
1425 WriteLiteral(">");
1426
1427
1428 #line 269 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1429 Write(ReadFile(iconPath));
1430
1431
1432 #line default
1433 #line hidden
1434 WriteLiteral("</span>\r\n");
1435
1436
1437 #line 270 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1438 }
1439 }
1440
1441
1442 #line default
1443 #line hidden
1444 WriteLiteral("\t\t\t\t\t<span>");
1445
1446
1447 #line 272 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1448 Write(name);
1449
1450
1451 #line default
1452 #line hidden
1453 WriteLiteral("</span>\r\n\t\t\t\t</a>\r\n\t\t\t</form>\r\n");
1454
1455
1456 #line 275 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1457 }
1458
1459
1460 #line default
1461 #line hidden
1462 WriteLiteral("\t</div>\r\n");
1463
1464
1465 #line 277 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1466
1467 }
1468
1469
1470 #line default
1471 #line hidden
1472 WriteLiteral("</div>\r\n");
1473
1474 }
1475 }
1476 }
1477
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.Navigation.NavigationTreeViewModel>
2 @using System.IO
3 @using System.Text.RegularExpressions
4 @using Dynamicweb
5 @using Dynamicweb.Ecommerce.ProductCatalog
6
7 @{
8 string navType = Model?.Parameters["NavType"] != null ? Model.Parameters["NavType"].ToString() : "first-nav";
9 string menuId = Model.Parameters.ContainsKey("menu-id") ? $"menu_{Model.Parameters["menu-id"].ToString().ToLower()}" : string.Empty;
10 }
11
12 <div class="nav @navType flex-column h-auto w-100 left-0 top-0 offcanvas-navigation @menuId">
13 @foreach (var node in Model.Nodes)
14 {
15
16 string productGroupImageShape = GetViewParameterString("ProductGroupImageShape") != null ? GetViewParameterString("ProductGroupImageShape") : string.Empty;
17 bool showProductGroupImage = GetViewParameterString("ShowProductGroupImage") != null ? GetViewParameterBoolean("ShowProductGroupImage") : false;
18 string productGroupPromotionImageTheme = GetViewParameterString("ProductGroupPromotionImageTheme") != null ? GetViewParameterString("ProductGroupPromotionImageTheme").ToLower() : string.Empty;
19 bool showProductGroupPromotionImage = GetViewParameterString("ShowProductGroupPromotionImage") != null ? GetViewParameterBoolean("ShowProductGroupPromotionImage") : false;
20
21 string ratio = GetViewParameterString("ImageAspectRatio") != null ? GetViewParameterString("ImageAspectRatio") : string.Empty;
22 ratio = ratio != "0" ? ratio : string.Empty;
23
24 var parameters = new Dictionary<string, object>();
25 parameters.Add("ProductGroupImageShape", productGroupImageShape);
26 parameters.Add("ShowProductGroupImage", showProductGroupImage);
27 parameters.Add("ProductGroupPromotionImageTheme", productGroupPromotionImageTheme);
28 parameters.Add("ShowProductGroupPromotionImage", showProductGroupPromotionImage);
29 parameters.Add("Ratio", ratio);
30
31 var page = Dynamicweb.Content.Services.Pages.GetPage(Model.PageId);
32 string pageType = page.ItemType;
33
34 var paragraphId = Pageview.CurrentParagraph.ID;
35 string groupId = Dynamicweb.Context.Current.Request["GroupID"] != null ? Dynamicweb.Context.Current.Request["GroupID"].ToString() : string.Empty;
36 string productId = Dynamicweb.Context.Current.Request["ProductID"] != null ? Dynamicweb.Context.Current.Request["ProductID"].ToString() : string.Empty;
37 string variantId = Dynamicweb.Context.Current.Request["VariantID"] != null ? Dynamicweb.Context.Current.Request["VariantID"].ToString() : string.Empty;
38
39 string productGroupImageSize = "24";
40
41 Regex reg = new Regex(@"\(([^\)]+)\)");
42
43 var navigationTree = new Stack<Dynamicweb.Frontend.Navigation.NavigationTreeNodeViewModel>(Model.Nodes);
44
45 var hasChildren = Model.Nodes.Count() > 0;
46 var nodeId = !string.IsNullOrEmpty(Model.GroupId) ? Model.GroupId : Model.PageId.ToString();
47 var inPathChecked = Model.InPath ? "checked" : string.Empty;
48 var inPathClass = Model.InPath ? " in-path" : string.Empty;
49 var activeClass = Model.IsActive ? " active fw-bold" : string.Empty;
50
51 <div class="nav-item d-flex align-items-center w-100 py-1">
52 @if (pageType != "Swift_Preferences")
53 {
54 var group = Model.GetProductGroup();
55 IList<FieldValueViewModel> groupFields = group.GroupFields != null ? group.GroupFields : null;
56
57 if (Model.IsClickable)
58 {
59 <a class="nav-link position-relative d-flex align-items-center gap-2 flex-grow-1@(activeClass)@(inPathClass)" @(Model.IsActive ? "aria-current='page'" : string.Empty) href="@Model.Link" id="@nodeId">
60 @if (showProductGroupImage && !string.IsNullOrEmpty(Model.GroupId) && groupFields != null)
61 {
62 foreach (FieldValueViewModel field in groupFields)
63 {
64 if (field.SystemName == "ProductGroupNavigationImage" && !string.IsNullOrEmpty(field.Value.ToString()))
65 {
66 var groupImage = field.Value.ToString();
67
68 if (Path.GetExtension(groupImage).ToLower() == ".svg")
69 {
70 <span class="icon-auto @productGroupImageShape" style="height: @(productGroupImageSize)px; width: @(productGroupImageSize)px;">
71 @ReadFile("/Files/Images/" + groupImage)
72 </span>
73 }
74 else
75 {
76 var imagePath = "/Admin/Public/GetImage.ashx?Image=" + "/Files/Images/" + Dynamicweb.Context.Current.Server.UrlEncode(groupImage) + "&Width=" + productGroupImageSize + "&Height=" + productGroupImageSize + "&crop=0";
77 <img loading="lazy" class="@productGroupImageShape" alt="@group.Name" width="@productGroupImageSize" height="@productGroupImageSize" src="@imagePath">
78 }
79 }
80 }
81 }
82 <span class="flex-grow-1">
83 @Model.Name
84 </span>
85 </a>
86
87 if (hasChildren)
88 {
89 <label class="nav-link position-relative" role="button" tabindex="0" aria-label="Unfold @Model.Name" for="nav_@(paragraphId)_@(nodeId)">
90 @{
91 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/arrow-right.svg";
92 if (!iconPath.ToLower().Contains("none") && iconPath != string.Empty)
93 {
94 iconPath = Dynamicweb.Context.Current.Server.MapPath(iconPath);
95 <span class="icon-3">@ReadFile(iconPath)</span>
96 }
97 }
98 </label>
99 }
100 }
101 else
102 {
103 <label class="nav-link position-relative d-flex align-items-center gap-2 flex-grow-1@(activeClass)@(inPathClass)" role="button" tabindex="0" @(Model.IsActive ? "aria-current='page'" : "") aria-label="Unfold @Model.Name" for="nav_@(paragraphId)_@(nodeId)">
104 @if (showProductGroupImage && !string.IsNullOrEmpty(Model.GroupId) && groupFields != null)
105 {
106 foreach (FieldValueViewModel field in groupFields)
107 {
108 if (field.SystemName == "ProductGroupNavigationImage" && !string.IsNullOrEmpty(field.Value.ToString()))
109 {
110 var groupImage = field.Value.ToString();
111
112 if (Path.GetExtension(groupImage).ToLower() == ".svg")
113 {
114 <span class="icon-auto @productGroupImageShape" style="height: @(productGroupImageSize)px; width: @(productGroupImageSize)px;">
115 @ReadFile("/Files/Images/" + groupImage)
116 </span>
117 }
118 else
119 {
120 var imagePath = "/Admin/Public/GetImage.ashx?Image=" + "/Files/Images/" + Dynamicweb.Context.Current.Server.UrlEncode(groupImage) + "&Width=" + productGroupImageSize + "&Height=" + productGroupImageSize + "&crop=0";
121 <img loading="lazy" class="@productGroupImageShape" alt="@group.Name" width="@productGroupImageSize" height="@productGroupImageSize" src="@imagePath">
122 }
123 }
124 }
125 }
126
127 <span class="flex-grow-1">
128 @Model.Name
129 </span>
130
131 @if (hasChildren)
132 {
133 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/arrow-right.svg";
134 if (!iconPath.ToLower().Contains("none") && iconPath != string.Empty)
135 {
136 iconPath = Dynamicweb.Context.Current.Server.MapPath(iconPath);
137 <span class="icon-3">@ReadFile(iconPath)</span>
138 }
139 }
140 </label>
141 }
142
143 if (hasChildren)
144 {
145 <input type="checkbox" class="visually-hidden sub-nav-check" id="nav_@(paragraphId)_@(nodeId)" @inPathChecked>
146 <div class="nav sub-nav position-absolute h-100 opacity-0 pe-none invisible w-100 left-0 top-0">
147 <div class="h-100 w-100 overflow-y-auto overflow-x-hidden">
148 <div class="nav-header position-relative py-1">
149 <label class="nav-link position-relative d-flex align-items-center gap-2 flex-grow-1" role="button" tabindex="0" aria-label="Go back to @Model.Name" for="nav_@(paragraphId)_@(nodeId)">
150 @{
151 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/arrow-left.svg";
152 if (!iconPath.ToLower().Contains("none") && iconPath != string.Empty)
153 {
154 iconPath = Dynamicweb.Context.Current.Server.MapPath(iconPath);
155 <span class="icon-3">@ReadFile(iconPath)</span>
156 }
157 }
158 <span class="flex-grow-1">@Model.Name</span>
159 </label>
160 </div>
161
162 @foreach (var node in Model.Nodes)
163 {
164 @RenderPartial("Navigation/OffCanvasNavigation/NavItem.cshtml", node, parameters)
165 }
166
167 @if (groupFields != null)
168 {
169 var groupName = group.Name;
170 string ratioCssClass = ratio != string.Empty ? " ratio" : string.Empty;
171 string ratioVariable = ratio != string.Empty ? "style=\"--bs-aspect-ratio: " + ratio + "\"" : string.Empty;
172 string productGroupPromotionImage = string.Empty;
173 string productGroupPromotionImagePath = string.Empty;
174 string productGroupPromotionDescription = string.Empty;
175 string productGroupPromotionLinkLabel = string.Empty;
176 string productGroupPromotionLink = string.Empty;
177 string gridGap = !string.IsNullOrEmpty(productGroupPromotionImageTheme) ? "gap-0" : "gap-3";
178 string themePadding = !string.IsNullOrEmpty(productGroupPromotionImageTheme) ? "p-3" : "p-0";
179
180 foreach (FieldValueViewModel field in groupFields)
181 {
182 if (field.SystemName == "ProductGroupPromotionImage")
183 {
184 productGroupPromotionImage = field.Value != null ? field.Value.ToString() : string.Empty;
185 productGroupPromotionImagePath = "/Admin/Public/GetImage.ashx?Width=" + 480 + "&crop=0&image=" + "Files/Images/" + productGroupPromotionImage;
186 }
187 if (field.SystemName == "ProductGroupPromotionDescription")
188 {
189 productGroupPromotionDescription = field.Value != null ? field.Value.ToString() : string.Empty;
190 }
191 if (field.SystemName == "ProductGroupPromotionLinkLabel")
192 {
193 productGroupPromotionLinkLabel = field.Value != null ? field.Value.ToString() : string.Empty;
194 }
195 if (field.SystemName == "ProductGroupPromotionLink")
196 {
197 productGroupPromotionLink = field.Value != null ? field.Value.ToString() : string.Empty;
198 }
199 }
200 if (showProductGroupPromotionImage)
201 {
202 <div class="grid grid-1 mt-3 mx-3 @gridGap@(productGroupPromotionImageTheme)">
203 @if (productGroupPromotionImage != string.Empty)
204 {
205 productGroupPromotionLink = !string.IsNullOrEmpty(productGroupPromotionLink) ? productGroupPromotionLink : Model.Link;
206
207 <a href="@productGroupPromotionLink" title="@groupName">
208 <figure class="m-0@(ratioCssClass)" @ratioVariable>
209 <img class="img-fluid" src="@productGroupPromotionImagePath" alt="@groupName" style="object-fit:cover">
210 </figure>
211 </a>
212 }
213 @if (!string.IsNullOrEmpty(productGroupPromotionDescription) || !string.IsNullOrEmpty(productGroupPromotionLinkLabel))
214 {
215 <div class="grid grid-1 @themePadding ">
216
217 @if (!string.IsNullOrEmpty(productGroupPromotionDescription))
218 {
219 <h6 class="m-0">@productGroupPromotionDescription</h6>
220 }
221 @if (!string.IsNullOrEmpty(productGroupPromotionLinkLabel))
222 {
223 productGroupPromotionLink = !string.IsNullOrEmpty(productGroupPromotionLink) ? productGroupPromotionLink : Model.Link;
224
225 <a href="@productGroupPromotionLink" title="@productGroupPromotionLinkLabel" class="btn btn-link text-start border-0 p-0">@productGroupPromotionLinkLabel</a>
226 }
227 </div>
228 }
229 </div>
230 }
231 }
232 </div>
233 </div>
234 }
235 }
236 else
237 {
238 bool countrySelector = page.Item?["CountrySelector"] != null ? Convert.ToBoolean(page.Item["CountrySelector"].ToString()) : false;
239 bool languageSelector = page.Item?["LanguageSelector"] != null ? Convert.ToBoolean(page.Item["LanguageSelector"].ToString()) : false;
240 bool currencySelector = page.Item?["CurrencySelector"] != null ? Convert.ToBoolean(page.Item["CurrencySelector"].ToString()) : false;
241 string name = Translate("Preferences");
242 string icon = string.Empty;
243
244 if (languageSelector)
245 {
246 bool hideIcon = page.Item?["HideIcon"] != null ? Convert.ToBoolean(page.Item["HideIcon"].ToString()) : false;
247
248 if (!hideIcon)
249 {
250 icon = $"/Files/FlagIcons/{Pageview.Area.CultureInfo.Name.ToLower()}.svg";
251 }
252
253 name = reg.Replace(Pageview.Area.CultureInfo.DisplayName, string.Empty);
254 }
255
256 <form action="/Default.aspx?ID=@Model.PageId" data-response-target-element="PreferencesModalContent" data-layout-template="Swift_Preferences.cshtml" data-preloader="inline" class="w-100">
257 <input type="hidden" name="Layout" value="modal">
258 <input type="hidden" name="CurrentPageID" value="@Pageview.ID">
259 <input type="hidden" name="GroupID" value="@groupId">
260 <input type="hidden" name="ProductID" value="@productId">
261 <input type="hidden" name="VariantID" value="@variantId">
262 <a href="#" role="button" onclick="swift.PageUpdater.Update(event)" class="nav-link position-relative flex-fill swift_open-preferences-modal @activeClass @inPathClass" @(Model.IsActive ? "aria-current='page'" : "") data-bs-toggle="modal" data-bs-target="#PreferencesModal">
263 @if (icon != "")
264 {
265 if (Path.GetExtension(icon).ToLower() == ".svg" && !icon.ToLower().Contains("none"))
266 {
267 string iconPath = Dynamicweb.Context.Current.Server.MapPath(icon);
268
269 <span class="icon-2">@ReadFile(iconPath)</span>
270 }
271 }
272 <span>@name</span>
273 </a>
274 </form>
275 }
276 </div>
277
278 }
279 </div>
280
Error compiling template "Designs/Swift/Navigation/OffCanvasNavigation.cshtml"
Line 114: 'NavigationTreeViewModel' does not contain a definition for 'PageId' and no accessible extension method 'PageId' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 129: 'NavigationTreeViewModel' does not contain a definition for 'GroupId' and no accessible extension method 'GroupId' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 129: 'NavigationTreeViewModel' does not contain a definition for 'GroupId' and no accessible extension method 'GroupId' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 129: 'NavigationTreeViewModel' does not contain a definition for 'PageId' and no accessible extension method 'PageId' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 130: 'NavigationTreeViewModel' does not contain a definition for 'InPath' and no accessible extension method 'InPath' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 131: 'NavigationTreeViewModel' does not contain a definition for 'InPath' and no accessible extension method 'InPath' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 132: 'NavigationTreeViewModel' does not contain a definition for 'IsActive' and no accessible extension method 'IsActive' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 154: 'NavigationTreeViewModel' does not contain a definition for 'GetProductGroup' and the best extension method overload 'NavigationTreeViewNodeExtensions.GetProductGroup(NavigationTreeNodeViewModel)' requires a receiver of type 'NavigationTreeNodeViewModel'
Line 157: 'NavigationTreeViewModel' does not contain a definition for 'IsClickable' and no accessible extension method 'IsClickable' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 192: 'NavigationTreeViewModel' does not contain a definition for 'IsActive' and no accessible extension method 'IsActive' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 201: 'NavigationTreeViewModel' does not contain a definition for 'Link' and no accessible extension method 'Link' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 225: 'NavigationTreeViewModel' does not contain a definition for 'GroupId' and no accessible extension method 'GroupId' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 372: 'NavigationTreeViewModel' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 400: 'NavigationTreeViewModel' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 512: 'NavigationTreeViewModel' does not contain a definition for 'IsActive' and no accessible extension method 'IsActive' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 521: 'NavigationTreeViewModel' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 554: 'NavigationTreeViewModel' does not contain a definition for 'GroupId' and no accessible extension method 'GroupId' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 701: 'NavigationTreeViewModel' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 824: 'NavigationTreeViewModel' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 899: 'NavigationTreeViewModel' does not contain a definition for 'Name' and no accessible extension method 'Name' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 914: A local or parameter named 'node' cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter
Line 1019: 'NavigationTreeViewModel' does not contain a definition for 'Link' and no accessible extension method 'Link' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 1173: 'NavigationTreeViewModel' does not contain a definition for 'Link' and no accessible extension method 'Link' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 1276: 'NavigationTreeViewModel' does not contain a definition for 'PageId' and no accessible extension method 'PageId' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
Line 1396: 'NavigationTreeViewModel' does not contain a definition for 'IsActive' and no accessible extension method 'IsActive' accepting a first argument of type 'NavigationTreeViewModel' could be found (are you missing a using directive or an assembly reference?)
1 //------------------------------------------------------------------------------
2 // <auto-generated>
3 // This code was generated by a tool.
4 // Runtime Version:4.0.30319.42000
5 //
6 // Changes to this file may cause incorrect behavior and will be lost if
7 // the code is regenerated.
8 // </auto-generated>
9 //------------------------------------------------------------------------------
10
11 namespace CompiledRazorTemplates.Dynamic {
12 using System;
13 using System.Collections.Generic;
14 using System.Linq;
15
16 #line 2 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
17 using System.IO;
18
19 #line default
20 #line hidden
21
22 #line 3 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
23 using System.Text.RegularExpressions;
24
25 #line default
26 #line hidden
27
28 #line 4 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
29 using Dynamicweb;
30
31 #line default
32 #line hidden
33
34 #line 5 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
35 using Dynamicweb.Ecommerce.ProductCatalog;
36
37 #line default
38 #line hidden
39
40
41 public class RazorEngine_b65d7e3c4f75445880bb282925a0e52d : Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.Navigation.NavigationTreeViewModel> {
42
43 #line hidden
44
45 public RazorEngine_b65d7e3c4f75445880bb282925a0e52d() {
46 }
47
48 public override void Execute() {
49 WriteLiteral("\r\n");
50
51
52 #line 7 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
53
54 string navType = Model?.Parameters["NavType"] != null ? Model.Parameters["NavType"].ToString() : "first-nav";
55 string menuId = Model.Parameters.ContainsKey("menu-id") ? $"menu_{Model.Parameters["menu-id"].ToString().ToLower()}" : string.Empty;
56
57
58 #line default
59 #line hidden
60 WriteLiteral("\r\n\r\n<div");
61
62 WriteAttribute("class", Tuple.Create(" class=\"", 488), Tuple.Create("\"", 575)
63 , Tuple.Create(Tuple.Create("", 496), Tuple.Create("nav", 496), true)
64
65 #line 12 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
66 , Tuple.Create(Tuple.Create(" ", 499), Tuple.Create<System.Object, System.Int32>(navType
67
68 #line default
69 #line hidden
70 , 500), false)
71 , Tuple.Create(Tuple.Create(" ", 508), Tuple.Create("flex-column", 509), true)
72 , Tuple.Create(Tuple.Create(" ", 520), Tuple.Create("h-auto", 521), true)
73 , Tuple.Create(Tuple.Create(" ", 527), Tuple.Create("w-100", 528), true)
74 , Tuple.Create(Tuple.Create(" ", 533), Tuple.Create("left-0", 534), true)
75 , Tuple.Create(Tuple.Create(" ", 540), Tuple.Create("top-0", 541), true)
76 , Tuple.Create(Tuple.Create(" ", 546), Tuple.Create("offcanvas-navigation", 547), true)
77
78 #line 12 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
79 , Tuple.Create(Tuple.Create(" ", 567), Tuple.Create<System.Object, System.Int32>(menuId
80
81 #line default
82 #line hidden
83 , 568), false)
84 );
85
86 WriteLiteral(">\r\n");
87
88
89 #line 13 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
90
91
92 #line default
93 #line hidden
94
95 #line 13 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
96 foreach (var node in Model.Nodes)
97 {
98
99 string productGroupImageShape = GetViewParameterString("ProductGroupImageShape") != null ? GetViewParameterString("ProductGroupImageShape") : string.Empty;
100 bool showProductGroupImage = GetViewParameterString("ShowProductGroupImage") != null ? GetViewParameterBoolean("ShowProductGroupImage") : false;
101 string productGroupPromotionImageTheme = GetViewParameterString("ProductGroupPromotionImageTheme") != null ? GetViewParameterString("ProductGroupPromotionImageTheme").ToLower() : string.Empty;
102 bool showProductGroupPromotionImage = GetViewParameterString("ShowProductGroupPromotionImage") != null ? GetViewParameterBoolean("ShowProductGroupPromotionImage") : false;
103
104 string ratio = GetViewParameterString("ImageAspectRatio") != null ? GetViewParameterString("ImageAspectRatio") : string.Empty;
105 ratio = ratio != "0" ? ratio : string.Empty;
106
107 var parameters = new Dictionary<string, object>();
108 parameters.Add("ProductGroupImageShape", productGroupImageShape);
109 parameters.Add("ShowProductGroupImage", showProductGroupImage);
110 parameters.Add("ProductGroupPromotionImageTheme", productGroupPromotionImageTheme);
111 parameters.Add("ShowProductGroupPromotionImage", showProductGroupPromotionImage);
112 parameters.Add("Ratio", ratio);
113
114 var page = Dynamicweb.Content.Services.Pages.GetPage(Model.PageId);
115 string pageType = page.ItemType;
116
117 var paragraphId = Pageview.CurrentParagraph.ID;
118 string groupId = Dynamicweb.Context.Current.Request["GroupID"] != null ? Dynamicweb.Context.Current.Request["GroupID"].ToString() : string.Empty;
119 string productId = Dynamicweb.Context.Current.Request["ProductID"] != null ? Dynamicweb.Context.Current.Request["ProductID"].ToString() : string.Empty;
120 string variantId = Dynamicweb.Context.Current.Request["VariantID"] != null ? Dynamicweb.Context.Current.Request["VariantID"].ToString() : string.Empty;
121
122 string productGroupImageSize = "24";
123
124 Regex reg = new Regex(@"\(([^\)]+)\)");
125
126 var navigationTree = new Stack<Dynamicweb.Frontend.Navigation.NavigationTreeNodeViewModel>(Model.Nodes);
127
128 var hasChildren = Model.Nodes.Count() > 0;
129 var nodeId = !string.IsNullOrEmpty(Model.GroupId) ? Model.GroupId : Model.PageId.ToString();
130 var inPathChecked = Model.InPath ? "checked" : string.Empty;
131 var inPathClass = Model.InPath ? " in-path" : string.Empty;
132 var activeClass = Model.IsActive ? " active fw-bold" : string.Empty;
133
134
135
136 #line default
137 #line hidden
138 WriteLiteral("\t<div");
139
140 WriteLiteral(" class=\"nav-item d-flex align-items-center w-100 py-1\"");
141
142 WriteLiteral(">\r\n");
143
144
145 #line 52 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
146
147
148 #line default
149 #line hidden
150
151 #line 52 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
152 if (pageType != "Swift_Preferences")
153 {
154 var group = Model.GetProductGroup();
155 IList<FieldValueViewModel> groupFields = group.GroupFields != null ? group.GroupFields : null;
156
157 if (Model.IsClickable)
158 {
159
160
161 #line default
162 #line hidden
163 WriteLiteral("\t\t\t\t<a");
164
165 WriteAttribute("class", Tuple.Create(" class=\"", 3308), Tuple.Create("\"", 3414)
166 , Tuple.Create(Tuple.Create("", 3316), Tuple.Create("nav-link", 3316), true)
167 , Tuple.Create(Tuple.Create(" ", 3324), Tuple.Create("position-relative", 3325), true)
168 , Tuple.Create(Tuple.Create(" ", 3342), Tuple.Create("d-flex", 3343), true)
169 , Tuple.Create(Tuple.Create(" ", 3349), Tuple.Create("align-items-center", 3350), true)
170 , Tuple.Create(Tuple.Create(" ", 3368), Tuple.Create("gap-2", 3369), true)
171 , Tuple.Create(Tuple.Create(" ", 3374), Tuple.Create("flex-grow-1", 3375), true)
172
173 #line 59 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
174 , Tuple.Create(Tuple.Create("", 3386), Tuple.Create<System.Object, System.Int32>(activeClass
175
176 #line default
177 #line hidden
178 , 3386), false)
179
180 #line 59 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
181 , Tuple.Create(Tuple.Create("", 3400), Tuple.Create<System.Object, System.Int32>(inPathClass
182
183 #line default
184 #line hidden
185 , 3400), false)
186 );
187
188 WriteLiteral(" ");
189
190
191 #line 59 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
192 Write(Model.IsActive ? "aria-current='page'" : string.Empty);
193
194
195 #line default
196 #line hidden
197 WriteLiteral(" href=\"");
198
199
200 #line 59 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
201 Write(Model.Link);
202
203
204 #line default
205 #line hidden
206 WriteLiteral("\" id=\"");
207
208
209 #line 59 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
210 Write(nodeId);
211
212
213 #line default
214 #line hidden
215 WriteLiteral("\">\r\n");
216
217
218 #line 60 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
219
220
221 #line default
222 #line hidden
223
224 #line 60 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
225 if (showProductGroupImage && !string.IsNullOrEmpty(Model.GroupId) && groupFields != null)
226 {
227 foreach (FieldValueViewModel field in groupFields)
228 {
229 if (field.SystemName == "ProductGroupNavigationImage" && !string.IsNullOrEmpty(field.Value.ToString()))
230 {
231 var groupImage = field.Value.ToString();
232
233 if (Path.GetExtension(groupImage).ToLower() == ".svg")
234 {
235
236
237 #line default
238 #line hidden
239 WriteLiteral("\t\t\t\t\t\t\t\t\t<span");
240
241 WriteAttribute("class", Tuple.Create(" class=\"", 3942), Tuple.Create("\"", 3983)
242 , Tuple.Create(Tuple.Create("", 3950), Tuple.Create("icon-auto", 3950), true)
243
244 #line 70 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
245 , Tuple.Create(Tuple.Create(" ", 3959), Tuple.Create<System.Object, System.Int32>(productGroupImageShape
246
247 #line default
248 #line hidden
249 , 3960), false)
250 );
251
252 WriteAttribute("style", Tuple.Create(" style=\"", 3984), Tuple.Create("\"", 4062)
253 , Tuple.Create(Tuple.Create("", 3992), Tuple.Create("height:", 3992), true)
254
255 #line 70 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
256 , Tuple.Create(Tuple.Create(" ", 3999), Tuple.Create<System.Object, System.Int32>(productGroupImageSize
257
258 #line default
259 #line hidden
260 , 4000), false)
261 , Tuple.Create(Tuple.Create("", 4024), Tuple.Create("px;", 4024), true)
262 , Tuple.Create(Tuple.Create(" ", 4027), Tuple.Create("width:", 4028), true)
263
264 #line 70 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
265 , Tuple.Create(Tuple.Create(" ", 4034), Tuple.Create<System.Object, System.Int32>(productGroupImageSize
266
267 #line default
268 #line hidden
269 , 4035), false)
270 , Tuple.Create(Tuple.Create("", 4059), Tuple.Create("px;", 4059), true)
271 );
272
273 WriteLiteral(">\r\n");
274
275 WriteLiteral("\t\t\t\t\t\t\t\t\t\t");
276
277
278 #line 71 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
279 Write(ReadFile("/Files/Images/" + groupImage));
280
281
282 #line default
283 #line hidden
284 WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t</span>\r\n");
285
286
287 #line 73 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
288 }
289 else
290 {
291 var imagePath = "/Admin/Public/GetImage.ashx?Image=" + "/Files/Images/" + Dynamicweb.Context.Current.Server.UrlEncode(groupImage) + "&Width=" + productGroupImageSize + "&Height=" + productGroupImageSize + "&crop=0";
292
293
294 #line default
295 #line hidden
296 WriteLiteral("\t\t\t\t\t\t\t\t\t<img");
297
298 WriteLiteral(" loading=\"lazy\"");
299
300 WriteAttribute("class", Tuple.Create(" class=\"", 4426), Tuple.Create("\"", 4457)
301
302 #line 77 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
303 , Tuple.Create(Tuple.Create("", 4434), Tuple.Create<System.Object, System.Int32>(productGroupImageShape
304
305 #line default
306 #line hidden
307 , 4434), false)
308 );
309
310 WriteAttribute("alt", Tuple.Create(" alt=\"", 4458), Tuple.Create("\"", 4475)
311
312 #line 77 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
313 , Tuple.Create(Tuple.Create("", 4464), Tuple.Create<System.Object, System.Int32>(group.Name
314
315 #line default
316 #line hidden
317 , 4464), false)
318 );
319
320 WriteAttribute("width", Tuple.Create(" width=\"", 4476), Tuple.Create("\"", 4506)
321
322 #line 77 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
323 , Tuple.Create(Tuple.Create("", 4484), Tuple.Create<System.Object, System.Int32>(productGroupImageSize
324
325 #line default
326 #line hidden
327 , 4484), false)
328 );
329
330 WriteAttribute("height", Tuple.Create(" height=\"", 4507), Tuple.Create("\"", 4538)
331
332 #line 77 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
333 , Tuple.Create(Tuple.Create("", 4516), Tuple.Create<System.Object, System.Int32>(productGroupImageSize
334
335 #line default
336 #line hidden
337 , 4516), false)
338 );
339
340 WriteAttribute("src", Tuple.Create(" src=\"", 4539), Tuple.Create("\"", 4555)
341
342 #line 77 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
343 , Tuple.Create(Tuple.Create("", 4545), Tuple.Create<System.Object, System.Int32>(imagePath
344
345 #line default
346 #line hidden
347 , 4545), false)
348 );
349
350 WriteLiteral(">\r\n");
351
352
353 #line 78 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
354 }
355 }
356 }
357 }
358
359
360 #line default
361 #line hidden
362 WriteLiteral("\t\t\t\t\t<span");
363
364 WriteLiteral(" class=\"flex-grow-1\"");
365
366 WriteLiteral(">\r\n");
367
368 WriteLiteral("\t\t\t\t\t\t");
369
370
371 #line 83 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
372 Write(Model.Name);
373
374
375 #line default
376 #line hidden
377 WriteLiteral("\r\n\t\t\t\t\t</span>\r\n\t\t\t\t</a>\r\n");
378
379
380 #line 86 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
381
382 if (hasChildren)
383 {
384
385
386 #line default
387 #line hidden
388 WriteLiteral("\t\t\t\t\t<label");
389
390 WriteLiteral(" class=\"nav-link position-relative\"");
391
392 WriteLiteral(" role=\"button\"");
393
394 WriteLiteral(" tabindex=\"0\"");
395
396 WriteAttribute("aria-label", Tuple.Create(" aria-label=\"", 4777), Tuple.Create("\"", 4808)
397 , Tuple.Create(Tuple.Create("", 4790), Tuple.Create("Unfold", 4790), true)
398
399 #line 89 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
400 , Tuple.Create(Tuple.Create(" ", 4796), Tuple.Create<System.Object, System.Int32>(Model.Name
401
402 #line default
403 #line hidden
404 , 4797), false)
405 );
406
407 WriteAttribute("for", Tuple.Create(" for=\"", 4809), Tuple.Create("\"", 4843)
408 , Tuple.Create(Tuple.Create("", 4815), Tuple.Create("nav_", 4815), true)
409
410 #line 89 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
411 , Tuple.Create(Tuple.Create("", 4819), Tuple.Create<System.Object, System.Int32>(paragraphId
412
413 #line default
414 #line hidden
415 , 4819), false)
416 , Tuple.Create(Tuple.Create("", 4833), Tuple.Create("_", 4833), true)
417
418 #line 89 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
419 , Tuple.Create(Tuple.Create("", 4834), Tuple.Create<System.Object, System.Int32>(nodeId
420
421 #line default
422 #line hidden
423 , 4834), false)
424 );
425
426 WriteLiteral(">\r\n");
427
428
429 #line 90 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
430
431
432 #line default
433 #line hidden
434
435 #line 90 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
436
437 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/arrow-right.svg";
438 if (!iconPath.ToLower().Contains("none") && iconPath != string.Empty)
439 {
440 iconPath = Dynamicweb.Context.Current.Server.MapPath(iconPath);
441
442
443 #line default
444 #line hidden
445 WriteLiteral("\t\t\t\t\t\t\t\t<span");
446
447 WriteLiteral(" class=\"icon-3\"");
448
449 WriteLiteral(">");
450
451
452 #line 95 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
453 Write(ReadFile(iconPath));
454
455
456 #line default
457 #line hidden
458 WriteLiteral("</span>\r\n");
459
460
461 #line 96 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
462 }
463
464
465 #line default
466 #line hidden
467 WriteLiteral("\r\n\t\t\t\t\t</label>\r\n");
468
469
470 #line 99 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
471 }
472 }
473 else
474 {
475
476
477 #line default
478 #line hidden
479 WriteLiteral("\t\t\t\t<label");
480
481 WriteAttribute("class", Tuple.Create(" class=\"", 5237), Tuple.Create("\"", 5343)
482 , Tuple.Create(Tuple.Create("", 5245), Tuple.Create("nav-link", 5245), true)
483 , Tuple.Create(Tuple.Create(" ", 5253), Tuple.Create("position-relative", 5254), true)
484 , Tuple.Create(Tuple.Create(" ", 5271), Tuple.Create("d-flex", 5272), true)
485 , Tuple.Create(Tuple.Create(" ", 5278), Tuple.Create("align-items-center", 5279), true)
486 , Tuple.Create(Tuple.Create(" ", 5297), Tuple.Create("gap-2", 5298), true)
487 , Tuple.Create(Tuple.Create(" ", 5303), Tuple.Create("flex-grow-1", 5304), true)
488
489 #line 103 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
490 , Tuple.Create(Tuple.Create("", 5315), Tuple.Create<System.Object, System.Int32>(activeClass
491
492 #line default
493 #line hidden
494 , 5315), false)
495
496 #line 103 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
497 , Tuple.Create(Tuple.Create("", 5329), Tuple.Create<System.Object, System.Int32>(inPathClass
498
499 #line default
500 #line hidden
501 , 5329), false)
502 );
503
504 WriteLiteral(" role=\"button\"");
505
506 WriteLiteral(" tabindex=\"0\"");
507
508 WriteLiteral(" ");
509
510
511 #line 103 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
512 Write(Model.IsActive ? "aria-current='page'" : "");
513
514
515 #line default
516 #line hidden
517 WriteLiteral(" aria-label=\"Unfold ");
518
519
520 #line 103 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
521 Write(Model.Name);
522
523
524 #line default
525 #line hidden
526 WriteLiteral("\" for=\"nav_");
527
528
529 #line 103 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
530 Write(paragraphId);
531
532
533 #line default
534 #line hidden
535 WriteLiteral("_");
536
537
538 #line 103 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
539 Write(nodeId);
540
541
542 #line default
543 #line hidden
544 WriteLiteral("\">\r\n");
545
546
547 #line 104 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
548
549
550 #line default
551 #line hidden
552
553 #line 104 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
554 if (showProductGroupImage && !string.IsNullOrEmpty(Model.GroupId) && groupFields != null)
555 {
556 foreach (FieldValueViewModel field in groupFields)
557 {
558 if (field.SystemName == "ProductGroupNavigationImage" && !string.IsNullOrEmpty(field.Value.ToString()))
559 {
560 var groupImage = field.Value.ToString();
561
562 if (Path.GetExtension(groupImage).ToLower() == ".svg")
563 {
564
565
566 #line default
567 #line hidden
568 WriteLiteral("\t\t\t\t\t\t\t\t\t<span");
569
570 WriteAttribute("class", Tuple.Create(" class=\"", 5923), Tuple.Create("\"", 5964)
571 , Tuple.Create(Tuple.Create("", 5931), Tuple.Create("icon-auto", 5931), true)
572
573 #line 114 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
574 , Tuple.Create(Tuple.Create(" ", 5940), Tuple.Create<System.Object, System.Int32>(productGroupImageShape
575
576 #line default
577 #line hidden
578 , 5941), false)
579 );
580
581 WriteAttribute("style", Tuple.Create(" style=\"", 5965), Tuple.Create("\"", 6043)
582 , Tuple.Create(Tuple.Create("", 5973), Tuple.Create("height:", 5973), true)
583
584 #line 114 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
585 , Tuple.Create(Tuple.Create(" ", 5980), Tuple.Create<System.Object, System.Int32>(productGroupImageSize
586
587 #line default
588 #line hidden
589 , 5981), false)
590 , Tuple.Create(Tuple.Create("", 6005), Tuple.Create("px;", 6005), true)
591 , Tuple.Create(Tuple.Create(" ", 6008), Tuple.Create("width:", 6009), true)
592
593 #line 114 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
594 , Tuple.Create(Tuple.Create(" ", 6015), Tuple.Create<System.Object, System.Int32>(productGroupImageSize
595
596 #line default
597 #line hidden
598 , 6016), false)
599 , Tuple.Create(Tuple.Create("", 6040), Tuple.Create("px;", 6040), true)
600 );
601
602 WriteLiteral(">\r\n");
603
604 WriteLiteral("\t\t\t\t\t\t\t\t\t\t");
605
606
607 #line 115 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
608 Write(ReadFile("/Files/Images/" + groupImage));
609
610
611 #line default
612 #line hidden
613 WriteLiteral("\r\n\t\t\t\t\t\t\t\t\t</span>\r\n");
614
615
616 #line 117 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
617 }
618 else
619 {
620 var imagePath = "/Admin/Public/GetImage.ashx?Image=" + "/Files/Images/" + Dynamicweb.Context.Current.Server.UrlEncode(groupImage) + "&Width=" + productGroupImageSize + "&Height=" + productGroupImageSize + "&crop=0";
621
622
623 #line default
624 #line hidden
625 WriteLiteral("\t\t\t\t\t\t\t\t\t<img");
626
627 WriteLiteral(" loading=\"lazy\"");
628
629 WriteAttribute("class", Tuple.Create(" class=\"", 6407), Tuple.Create("\"", 6438)
630
631 #line 121 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
632 , Tuple.Create(Tuple.Create("", 6415), Tuple.Create<System.Object, System.Int32>(productGroupImageShape
633
634 #line default
635 #line hidden
636 , 6415), false)
637 );
638
639 WriteAttribute("alt", Tuple.Create(" alt=\"", 6439), Tuple.Create("\"", 6456)
640
641 #line 121 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
642 , Tuple.Create(Tuple.Create("", 6445), Tuple.Create<System.Object, System.Int32>(group.Name
643
644 #line default
645 #line hidden
646 , 6445), false)
647 );
648
649 WriteAttribute("width", Tuple.Create(" width=\"", 6457), Tuple.Create("\"", 6487)
650
651 #line 121 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
652 , Tuple.Create(Tuple.Create("", 6465), Tuple.Create<System.Object, System.Int32>(productGroupImageSize
653
654 #line default
655 #line hidden
656 , 6465), false)
657 );
658
659 WriteAttribute("height", Tuple.Create(" height=\"", 6488), Tuple.Create("\"", 6519)
660
661 #line 121 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
662 , Tuple.Create(Tuple.Create("", 6497), Tuple.Create<System.Object, System.Int32>(productGroupImageSize
663
664 #line default
665 #line hidden
666 , 6497), false)
667 );
668
669 WriteAttribute("src", Tuple.Create(" src=\"", 6520), Tuple.Create("\"", 6536)
670
671 #line 121 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
672 , Tuple.Create(Tuple.Create("", 6526), Tuple.Create<System.Object, System.Int32>(imagePath
673
674 #line default
675 #line hidden
676 , 6526), false)
677 );
678
679 WriteLiteral(">\r\n");
680
681
682 #line 122 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
683 }
684 }
685 }
686 }
687
688
689 #line default
690 #line hidden
691 WriteLiteral("\r\n\t\t\t\t\t<span");
692
693 WriteLiteral(" class=\"flex-grow-1\"");
694
695 WriteLiteral(">\r\n");
696
697 WriteLiteral("\t\t\t\t\t\t");
698
699
700 #line 128 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
701 Write(Model.Name);
702
703
704 #line default
705 #line hidden
706 WriteLiteral("\r\n\t\t\t\t\t</span>\r\n\r\n");
707
708
709 #line 131 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
710
711
712 #line default
713 #line hidden
714
715 #line 131 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
716 if (hasChildren)
717 {
718 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/arrow-right.svg";
719 if (!iconPath.ToLower().Contains("none") && iconPath != string.Empty)
720 {
721 iconPath = Dynamicweb.Context.Current.Server.MapPath(iconPath);
722
723
724 #line default
725 #line hidden
726 WriteLiteral("\t\t\t\t\t\t\t<span");
727
728 WriteLiteral(" class=\"icon-3\"");
729
730 WriteLiteral(">");
731
732
733 #line 137 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
734 Write(ReadFile(iconPath));
735
736
737 #line default
738 #line hidden
739 WriteLiteral("</span>\r\n");
740
741
742 #line 138 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
743 }
744 }
745
746
747 #line default
748 #line hidden
749 WriteLiteral("\t\t\t\t</label>\r\n");
750
751
752 #line 141 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
753 }
754
755 if (hasChildren)
756 {
757
758
759 #line default
760 #line hidden
761 WriteLiteral("\t\t\t\t<input");
762
763 WriteLiteral(" type=\"checkbox\"");
764
765 WriteLiteral(" class=\"visually-hidden sub-nav-check\"");
766
767 WriteAttribute("id", Tuple.Create(" id=\"", 7112), Tuple.Create("\"", 7145)
768 , Tuple.Create(Tuple.Create("", 7117), Tuple.Create("nav_", 7117), true)
769
770 #line 145 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
771 , Tuple.Create(Tuple.Create("", 7121), Tuple.Create<System.Object, System.Int32>(paragraphId
772
773 #line default
774 #line hidden
775 , 7121), false)
776 , Tuple.Create(Tuple.Create("", 7135), Tuple.Create("_", 7135), true)
777
778 #line 145 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
779 , Tuple.Create(Tuple.Create("", 7136), Tuple.Create<System.Object, System.Int32>(nodeId
780
781 #line default
782 #line hidden
783 , 7136), false)
784 );
785
786 WriteLiteral(" ");
787
788
789 #line 145 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
790 Write(inPathChecked);
791
792
793 #line default
794 #line hidden
795 WriteLiteral(">\r\n");
796
797 WriteLiteral("\t\t\t\t<div");
798
799 WriteLiteral(" class=\"nav sub-nav position-absolute h-100 opacity-0 pe-none invisible w-100 lef" +
800 "t-0 top-0\"");
801
802 WriteLiteral(">\r\n\t\t\t\t\t<div");
803
804 WriteLiteral(" class=\"h-100 w-100 overflow-y-auto overflow-x-hidden\"");
805
806 WriteLiteral(">\r\n\t\t\t\t\t\t<div");
807
808 WriteLiteral(" class=\"nav-header position-relative py-1\"");
809
810 WriteLiteral(">\r\n\t\t\t\t\t\t\t<label");
811
812 WriteLiteral(" class=\"nav-link position-relative d-flex align-items-center gap-2 flex-grow-1\"");
813
814 WriteLiteral(" role=\"button\"");
815
816 WriteLiteral(" tabindex=\"0\"");
817
818 WriteAttribute("aria-label", Tuple.Create(" aria-label=\"", 7506), Tuple.Create("\"", 7541)
819 , Tuple.Create(Tuple.Create("", 7519), Tuple.Create("Go", 7519), true)
820 , Tuple.Create(Tuple.Create(" ", 7521), Tuple.Create("back", 7522), true)
821 , Tuple.Create(Tuple.Create(" ", 7526), Tuple.Create("to", 7527), true)
822
823 #line 149 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
824 , Tuple.Create(Tuple.Create(" ", 7529), Tuple.Create<System.Object, System.Int32>(Model.Name
825
826 #line default
827 #line hidden
828 , 7530), false)
829 );
830
831 WriteAttribute("for", Tuple.Create(" for=\"", 7542), Tuple.Create("\"", 7576)
832 , Tuple.Create(Tuple.Create("", 7548), Tuple.Create("nav_", 7548), true)
833
834 #line 149 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
835 , Tuple.Create(Tuple.Create("", 7552), Tuple.Create<System.Object, System.Int32>(paragraphId
836
837 #line default
838 #line hidden
839 , 7552), false)
840 , Tuple.Create(Tuple.Create("", 7566), Tuple.Create("_", 7566), true)
841
842 #line 149 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
843 , Tuple.Create(Tuple.Create("", 7567), Tuple.Create<System.Object, System.Int32>(nodeId
844
845 #line default
846 #line hidden
847 , 7567), false)
848 );
849
850 WriteLiteral(">\r\n");
851
852
853 #line 150 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
854
855
856 #line default
857 #line hidden
858
859 #line 150 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
860
861 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/arrow-left.svg";
862 if (!iconPath.ToLower().Contains("none") && iconPath != string.Empty)
863 {
864 iconPath = Dynamicweb.Context.Current.Server.MapPath(iconPath);
865
866
867 #line default
868 #line hidden
869 WriteLiteral("\t\t\t\t\t\t\t\t\t\t<span");
870
871 WriteLiteral(" class=\"icon-3\"");
872
873 WriteLiteral(">");
874
875
876 #line 155 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
877 Write(ReadFile(iconPath));
878
879
880 #line default
881 #line hidden
882 WriteLiteral("</span>\r\n");
883
884
885 #line 156 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
886 }
887
888
889 #line default
890 #line hidden
891 WriteLiteral("\r\n\t\t\t\t\t\t\t\t<span");
892
893 WriteLiteral(" class=\"flex-grow-1\"");
894
895 WriteLiteral(">");
896
897
898 #line 158 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
899 Write(Model.Name);
900
901
902 #line default
903 #line hidden
904 WriteLiteral("</span>\r\n\t\t\t\t\t\t\t</label>\r\n\t\t\t\t\t\t</div>\r\n\r\n");
905
906
907 #line 162 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
908
909
910 #line default
911 #line hidden
912
913 #line 162 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
914 foreach (var node in Model.Nodes)
915 {
916
917
918 #line default
919 #line hidden
920
921 #line 164 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
922 Write(RenderPartial("Navigation/OffCanvasNavigation/NavItem.cshtml", node, parameters));
923
924
925 #line default
926 #line hidden
927
928 #line 164 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
929
930 }
931
932
933 #line default
934 #line hidden
935 WriteLiteral("\r\n");
936
937
938 #line 167 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
939
940
941 #line default
942 #line hidden
943
944 #line 167 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
945 if (groupFields != null)
946 {
947 var groupName = group.Name;
948 string ratioCssClass = ratio != string.Empty ? " ratio" : string.Empty;
949 string ratioVariable = ratio != string.Empty ? "style=\"--bs-aspect-ratio: " + ratio + "\"" : string.Empty;
950 string productGroupPromotionImage = string.Empty;
951 string productGroupPromotionImagePath = string.Empty;
952 string productGroupPromotionDescription = string.Empty;
953 string productGroupPromotionLinkLabel = string.Empty;
954 string productGroupPromotionLink = string.Empty;
955 string gridGap = !string.IsNullOrEmpty(productGroupPromotionImageTheme) ? "gap-0" : "gap-3";
956 string themePadding = !string.IsNullOrEmpty(productGroupPromotionImageTheme) ? "p-3" : "p-0";
957
958 foreach (FieldValueViewModel field in groupFields)
959 {
960 if (field.SystemName == "ProductGroupPromotionImage")
961 {
962 productGroupPromotionImage = field.Value != null ? field.Value.ToString() : string.Empty;
963 productGroupPromotionImagePath = "/Admin/Public/GetImage.ashx?Width=" + 480 + "&crop=0&image=" + "Files/Images/" + productGroupPromotionImage;
964 }
965 if (field.SystemName == "ProductGroupPromotionDescription")
966 {
967 productGroupPromotionDescription = field.Value != null ? field.Value.ToString() : string.Empty;
968 }
969 if (field.SystemName == "ProductGroupPromotionLinkLabel")
970 {
971 productGroupPromotionLinkLabel = field.Value != null ? field.Value.ToString() : string.Empty;
972 }
973 if (field.SystemName == "ProductGroupPromotionLink")
974 {
975 productGroupPromotionLink = field.Value != null ? field.Value.ToString() : string.Empty;
976 }
977 }
978 if (showProductGroupPromotionImage)
979 {
980
981
982 #line default
983 #line hidden
984 WriteLiteral("\t\t\t\t\t\t\t\t<div");
985
986 WriteAttribute("class", Tuple.Create(" class=\"", 10008), Tuple.Create("\"", 10080)
987 , Tuple.Create(Tuple.Create("", 10016), Tuple.Create("grid", 10016), true)
988 , Tuple.Create(Tuple.Create(" ", 10020), Tuple.Create("grid-1", 10021), true)
989 , Tuple.Create(Tuple.Create(" ", 10027), Tuple.Create("mt-3", 10028), true)
990 , Tuple.Create(Tuple.Create(" ", 10032), Tuple.Create("mx-3", 10033), true)
991
992 #line 202 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
993 , Tuple.Create(Tuple.Create(" ", 10037), Tuple.Create<System.Object, System.Int32>(gridGap
994
995 #line default
996 #line hidden
997 , 10038), false)
998
999 #line 202 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1000 , Tuple.Create(Tuple.Create("", 10046), Tuple.Create<System.Object, System.Int32>(productGroupPromotionImageTheme
1001
1002 #line default
1003 #line hidden
1004 , 10046), false)
1005 );
1006
1007 WriteLiteral(">\r\n");
1008
1009
1010 #line 203 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1011
1012
1013 #line default
1014 #line hidden
1015
1016 #line 203 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1017 if (productGroupPromotionImage != string.Empty)
1018 {
1019 productGroupPromotionLink = !string.IsNullOrEmpty(productGroupPromotionLink) ? productGroupPromotionLink : Model.Link;
1020
1021
1022
1023 #line default
1024 #line hidden
1025 WriteLiteral("\t\t\t\t\t\t\t\t\t\t<a");
1026
1027 WriteAttribute("href", Tuple.Create(" href=\"", 10299), Tuple.Create("\"", 10332)
1028
1029 #line 207 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1030 , Tuple.Create(Tuple.Create("", 10306), Tuple.Create<System.Object, System.Int32>(productGroupPromotionLink
1031
1032 #line default
1033 #line hidden
1034 , 10306), false)
1035 );
1036
1037 WriteAttribute("title", Tuple.Create(" title=\"", 10333), Tuple.Create("\"", 10351)
1038
1039 #line 207 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1040 , Tuple.Create(Tuple.Create("", 10341), Tuple.Create<System.Object, System.Int32>(groupName
1041
1042 #line default
1043 #line hidden
1044 , 10341), false)
1045 );
1046
1047 WriteLiteral(">\r\n\t\t\t\t\t\t\t\t\t\t\t<figure");
1048
1049 WriteAttribute("class", Tuple.Create(" class=\"", 10373), Tuple.Create("\"", 10400)
1050 , Tuple.Create(Tuple.Create("", 10381), Tuple.Create("m-0", 10381), true)
1051
1052 #line 208 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1053 , Tuple.Create(Tuple.Create("", 10384), Tuple.Create<System.Object, System.Int32>(ratioCssClass
1054
1055 #line default
1056 #line hidden
1057 , 10384), false)
1058 );
1059
1060 WriteLiteral(" ");
1061
1062
1063 #line 208 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1064 Write(ratioVariable);
1065
1066
1067 #line default
1068 #line hidden
1069 WriteLiteral(">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<img");
1070
1071 WriteLiteral(" class=\"img-fluid\"");
1072
1073 WriteAttribute("src", Tuple.Create(" src=\"", 10453), Tuple.Create("\"", 10490)
1074
1075 #line 209 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1076 , Tuple.Create(Tuple.Create("", 10459), Tuple.Create<System.Object, System.Int32>(productGroupPromotionImagePath
1077
1078 #line default
1079 #line hidden
1080 , 10459), false)
1081 );
1082
1083 WriteAttribute("alt", Tuple.Create(" alt=\"", 10491), Tuple.Create("\"", 10507)
1084
1085 #line 209 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1086 , Tuple.Create(Tuple.Create("", 10497), Tuple.Create<System.Object, System.Int32>(groupName
1087
1088 #line default
1089 #line hidden
1090 , 10497), false)
1091 );
1092
1093 WriteLiteral(" style=\"object-fit:cover\"");
1094
1095 WriteLiteral(">\r\n\t\t\t\t\t\t\t\t\t\t\t</figure>\r\n\t\t\t\t\t\t\t\t\t\t</a>\r\n");
1096
1097
1098 #line 212 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1099 }
1100
1101
1102 #line default
1103 #line hidden
1104 WriteLiteral("\t\t\t\t\t\t\t\t\t");
1105
1106
1107 #line 213 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1108 if (!string.IsNullOrEmpty(productGroupPromotionDescription) || !string.IsNullOrEmpty(productGroupPromotionLinkLabel))
1109 {
1110
1111
1112 #line default
1113 #line hidden
1114 WriteLiteral("\t\t\t\t\t\t\t\t\t\t<div");
1115
1116 WriteAttribute("class", Tuple.Create(" class=\"", 10741), Tuple.Create("\"", 10775)
1117 , Tuple.Create(Tuple.Create("", 10749), Tuple.Create("grid", 10749), true)
1118 , Tuple.Create(Tuple.Create(" ", 10753), Tuple.Create("grid-1", 10754), true)
1119
1120 #line 215 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1121 , Tuple.Create(Tuple.Create(" ", 10760), Tuple.Create<System.Object, System.Int32>(themePadding
1122
1123 #line default
1124 #line hidden
1125 , 10761), false)
1126 , Tuple.Create(Tuple.Create(" ", 10774), Tuple.Create("", 10774), true)
1127 );
1128
1129 WriteLiteral(">\r\n\r\n");
1130
1131
1132 #line 217 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1133
1134
1135 #line default
1136 #line hidden
1137
1138 #line 217 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1139 if (!string.IsNullOrEmpty(productGroupPromotionDescription))
1140 {
1141
1142
1143 #line default
1144 #line hidden
1145 WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t\t<h6");
1146
1147 WriteLiteral(" class=\"m-0\"");
1148
1149 WriteLiteral(">");
1150
1151
1152 #line 219 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1153 Write(productGroupPromotionDescription);
1154
1155
1156 #line default
1157 #line hidden
1158 WriteLiteral("</h6>\r\n");
1159
1160
1161 #line 220 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1162 }
1163
1164
1165 #line default
1166 #line hidden
1167 WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t");
1168
1169
1170 #line 221 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1171 if (!string.IsNullOrEmpty(productGroupPromotionLinkLabel))
1172 {
1173 productGroupPromotionLink = !string.IsNullOrEmpty(productGroupPromotionLink) ? productGroupPromotionLink : Model.Link;
1174
1175
1176
1177 #line default
1178 #line hidden
1179 WriteLiteral("\t\t\t\t\t\t\t\t\t\t\t\t<a");
1180
1181 WriteAttribute("href", Tuple.Create(" href=\"", 11185), Tuple.Create("\"", 11218)
1182
1183 #line 225 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1184 , Tuple.Create(Tuple.Create("", 11192), Tuple.Create<System.Object, System.Int32>(productGroupPromotionLink
1185
1186 #line default
1187 #line hidden
1188 , 11192), false)
1189 );
1190
1191 WriteAttribute("title", Tuple.Create(" title=\"", 11219), Tuple.Create("\"", 11258)
1192
1193 #line 225 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1194 , Tuple.Create(Tuple.Create("", 11227), Tuple.Create<System.Object, System.Int32>(productGroupPromotionLinkLabel
1195
1196 #line default
1197 #line hidden
1198 , 11227), false)
1199 );
1200
1201 WriteLiteral(" class=\"btn btn-link text-start border-0 p-0\"");
1202
1203 WriteLiteral(">");
1204
1205
1206 #line 225 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1207 Write(productGroupPromotionLinkLabel);
1208
1209
1210 #line default
1211 #line hidden
1212 WriteLiteral("</a>\r\n");
1213
1214
1215 #line 226 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1216 }
1217
1218
1219 #line default
1220 #line hidden
1221 WriteLiteral("\t\t\t\t\t\t\t\t\t\t</div>\r\n");
1222
1223
1224 #line 228 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1225 }
1226
1227
1228 #line default
1229 #line hidden
1230 WriteLiteral("\t\t\t\t\t\t\t\t</div>\r\n");
1231
1232
1233 #line 230 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1234 }
1235 }
1236
1237
1238 #line default
1239 #line hidden
1240 WriteLiteral("\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n");
1241
1242
1243 #line 234 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1244 }
1245 }
1246 else
1247 {
1248 bool countrySelector = page.Item?["CountrySelector"] != null ? Convert.ToBoolean(page.Item["CountrySelector"].ToString()) : false;
1249 bool languageSelector = page.Item?["LanguageSelector"] != null ? Convert.ToBoolean(page.Item["LanguageSelector"].ToString()) : false;
1250 bool currencySelector = page.Item?["CurrencySelector"] != null ? Convert.ToBoolean(page.Item["CurrencySelector"].ToString()) : false;
1251 string name = Translate("Preferences");
1252 string icon = string.Empty;
1253
1254 if (languageSelector)
1255 {
1256 bool hideIcon = page.Item?["HideIcon"] != null ? Convert.ToBoolean(page.Item["HideIcon"].ToString()) : false;
1257
1258 if (!hideIcon)
1259 {
1260 icon = $"/Files/FlagIcons/{Pageview.Area.CultureInfo.Name.ToLower()}.svg";
1261 }
1262
1263 name = reg.Replace(Pageview.Area.CultureInfo.DisplayName, string.Empty);
1264 }
1265
1266
1267
1268 #line default
1269 #line hidden
1270 WriteLiteral("\t\t\t<form");
1271
1272 WriteAttribute("action", Tuple.Create(" action=\"", 12319), Tuple.Create("\"", 12358)
1273 , Tuple.Create(Tuple.Create("", 12328), Tuple.Create("/Default.aspx?ID=", 12328), true)
1274
1275 #line 256 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1276 , Tuple.Create(Tuple.Create("", 12345), Tuple.Create<System.Object, System.Int32>(Model.PageId
1277
1278 #line default
1279 #line hidden
1280 , 12345), false)
1281 );
1282
1283 WriteLiteral(" data-response-target-element=\"PreferencesModalContent\"");
1284
1285 WriteLiteral(" data-layout-template=\"Swift_Preferences.cshtml\"");
1286
1287 WriteLiteral(" data-preloader=\"inline\"");
1288
1289 WriteLiteral(" class=\"w-100\"");
1290
1291 WriteLiteral(">\r\n\t\t\t\t<input");
1292
1293 WriteLiteral(" type=\"hidden\"");
1294
1295 WriteLiteral(" name=\"Layout\"");
1296
1297 WriteLiteral(" value=\"modal\"");
1298
1299 WriteLiteral(">\r\n\t\t\t\t<input");
1300
1301 WriteLiteral(" type=\"hidden\"");
1302
1303 WriteLiteral(" name=\"CurrentPageID\"");
1304
1305 WriteAttribute("value", Tuple.Create(" value=\"", 12603), Tuple.Create("\"", 12623)
1306
1307 #line 258 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1308 , Tuple.Create(Tuple.Create("", 12611), Tuple.Create<System.Object, System.Int32>(Pageview.ID
1309
1310 #line default
1311 #line hidden
1312 , 12611), false)
1313 );
1314
1315 WriteLiteral(">\r\n\t\t\t\t<input");
1316
1317 WriteLiteral(" type=\"hidden\"");
1318
1319 WriteLiteral(" name=\"GroupID\"");
1320
1321 WriteAttribute("value", Tuple.Create(" value=\"", 12666), Tuple.Create("\"", 12682)
1322
1323 #line 259 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1324 , Tuple.Create(Tuple.Create("", 12674), Tuple.Create<System.Object, System.Int32>(groupId
1325
1326 #line default
1327 #line hidden
1328 , 12674), false)
1329 );
1330
1331 WriteLiteral(">\r\n\t\t\t\t<input");
1332
1333 WriteLiteral(" type=\"hidden\"");
1334
1335 WriteLiteral(" name=\"ProductID\"");
1336
1337 WriteAttribute("value", Tuple.Create(" value=\"", 12727), Tuple.Create("\"", 12745)
1338
1339 #line 260 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1340 , Tuple.Create(Tuple.Create("", 12735), Tuple.Create<System.Object, System.Int32>(productId
1341
1342 #line default
1343 #line hidden
1344 , 12735), false)
1345 );
1346
1347 WriteLiteral(">\r\n\t\t\t\t<input");
1348
1349 WriteLiteral(" type=\"hidden\"");
1350
1351 WriteLiteral(" name=\"VariantID\"");
1352
1353 WriteAttribute("value", Tuple.Create(" value=\"", 12790), Tuple.Create("\"", 12808)
1354
1355 #line 261 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1356 , Tuple.Create(Tuple.Create("", 12798), Tuple.Create<System.Object, System.Int32>(variantId
1357
1358 #line default
1359 #line hidden
1360 , 12798), false)
1361 );
1362
1363 WriteLiteral(">\r\n\t\t\t\t<a");
1364
1365 WriteLiteral(" href=\"#\"");
1366
1367 WriteLiteral(" role=\"button\"");
1368
1369 WriteLiteral(" onclick=\"swift.PageUpdater.Update(event)\"");
1370
1371 WriteAttribute("class", Tuple.Create(" class=\"", 12883), Tuple.Create("\"", 12982)
1372 , Tuple.Create(Tuple.Create("", 12891), Tuple.Create("nav-link", 12891), true)
1373 , Tuple.Create(Tuple.Create(" ", 12899), Tuple.Create("position-relative", 12900), true)
1374 , Tuple.Create(Tuple.Create(" ", 12917), Tuple.Create("flex-fill", 12918), true)
1375 , Tuple.Create(Tuple.Create(" ", 12927), Tuple.Create("swift_open-preferences-modal", 12928), true)
1376
1377 #line 262 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1378 , Tuple.Create(Tuple.Create(" ", 12956), Tuple.Create<System.Object, System.Int32>(activeClass
1379
1380 #line default
1381 #line hidden
1382 , 12957), false)
1383
1384 #line 262 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1385 , Tuple.Create(Tuple.Create(" ", 12969), Tuple.Create<System.Object, System.Int32>(inPathClass
1386
1387 #line default
1388 #line hidden
1389 , 12970), false)
1390 );
1391
1392 WriteLiteral(" ");
1393
1394
1395 #line 262 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1396 Write(Model.IsActive ? "aria-current='page'" : "");
1397
1398
1399 #line default
1400 #line hidden
1401 WriteLiteral(" data-bs-toggle=\"modal\" data-bs-target=\"#PreferencesModal\">\r\n");
1402
1403
1404 #line 263 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1405
1406
1407 #line default
1408 #line hidden
1409
1410 #line 263 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1411 if (icon != "")
1412 {
1413 if (Path.GetExtension(icon).ToLower() == ".svg" && !icon.ToLower().Contains("none"))
1414 {
1415 string iconPath = Dynamicweb.Context.Current.Server.MapPath(icon);
1416
1417
1418
1419 #line default
1420 #line hidden
1421 WriteLiteral("\t\t\t\t\t\t\t<span");
1422
1423 WriteLiteral(" class=\"icon-2\"");
1424
1425 WriteLiteral(">");
1426
1427
1428 #line 269 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1429 Write(ReadFile(iconPath));
1430
1431
1432 #line default
1433 #line hidden
1434 WriteLiteral("</span>\r\n");
1435
1436
1437 #line 270 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1438 }
1439 }
1440
1441
1442 #line default
1443 #line hidden
1444 WriteLiteral("\t\t\t\t\t<span>");
1445
1446
1447 #line 272 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1448 Write(name);
1449
1450
1451 #line default
1452 #line hidden
1453 WriteLiteral("</span>\r\n\t\t\t\t</a>\r\n\t\t\t</form>\r\n");
1454
1455
1456 #line 275 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1457 }
1458
1459
1460 #line default
1461 #line hidden
1462 WriteLiteral("\t</div>\r\n");
1463
1464
1465 #line 277 "D:\dynamicweb.net\Solutions\nextech\Superhome.swiftstaging.dynamicweb-cms.com\files\Templates\Designs\Swift\Navigation\OffCanvasNavigation.cshtml"
1466
1467 }
1468
1469
1470 #line default
1471 #line hidden
1472 WriteLiteral("</div>\r\n");
1473
1474 }
1475 }
1476 }
1477
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.Navigation.NavigationTreeViewModel>
2 @using System.IO
3 @using System.Text.RegularExpressions
4 @using Dynamicweb
5 @using Dynamicweb.Ecommerce.ProductCatalog
6
7 @{
8 string navType = Model?.Parameters["NavType"] != null ? Model.Parameters["NavType"].ToString() : "first-nav";
9 string menuId = Model.Parameters.ContainsKey("menu-id") ? $"menu_{Model.Parameters["menu-id"].ToString().ToLower()}" : string.Empty;
10 }
11
12 <div class="nav @navType flex-column h-auto w-100 left-0 top-0 offcanvas-navigation @menuId">
13 @foreach (var node in Model.Nodes)
14 {
15
16 string productGroupImageShape = GetViewParameterString("ProductGroupImageShape") != null ? GetViewParameterString("ProductGroupImageShape") : string.Empty;
17 bool showProductGroupImage = GetViewParameterString("ShowProductGroupImage") != null ? GetViewParameterBoolean("ShowProductGroupImage") : false;
18 string productGroupPromotionImageTheme = GetViewParameterString("ProductGroupPromotionImageTheme") != null ? GetViewParameterString("ProductGroupPromotionImageTheme").ToLower() : string.Empty;
19 bool showProductGroupPromotionImage = GetViewParameterString("ShowProductGroupPromotionImage") != null ? GetViewParameterBoolean("ShowProductGroupPromotionImage") : false;
20
21 string ratio = GetViewParameterString("ImageAspectRatio") != null ? GetViewParameterString("ImageAspectRatio") : string.Empty;
22 ratio = ratio != "0" ? ratio : string.Empty;
23
24 var parameters = new Dictionary<string, object>();
25 parameters.Add("ProductGroupImageShape", productGroupImageShape);
26 parameters.Add("ShowProductGroupImage", showProductGroupImage);
27 parameters.Add("ProductGroupPromotionImageTheme", productGroupPromotionImageTheme);
28 parameters.Add("ShowProductGroupPromotionImage", showProductGroupPromotionImage);
29 parameters.Add("Ratio", ratio);
30
31 var page = Dynamicweb.Content.Services.Pages.GetPage(Model.PageId);
32 string pageType = page.ItemType;
33
34 var paragraphId = Pageview.CurrentParagraph.ID;
35 string groupId = Dynamicweb.Context.Current.Request["GroupID"] != null ? Dynamicweb.Context.Current.Request["GroupID"].ToString() : string.Empty;
36 string productId = Dynamicweb.Context.Current.Request["ProductID"] != null ? Dynamicweb.Context.Current.Request["ProductID"].ToString() : string.Empty;
37 string variantId = Dynamicweb.Context.Current.Request["VariantID"] != null ? Dynamicweb.Context.Current.Request["VariantID"].ToString() : string.Empty;
38
39 string productGroupImageSize = "24";
40
41 Regex reg = new Regex(@"\(([^\)]+)\)");
42
43 var navigationTree = new Stack<Dynamicweb.Frontend.Navigation.NavigationTreeNodeViewModel>(Model.Nodes);
44
45 var hasChildren = Model.Nodes.Count() > 0;
46 var nodeId = !string.IsNullOrEmpty(Model.GroupId) ? Model.GroupId : Model.PageId.ToString();
47 var inPathChecked = Model.InPath ? "checked" : string.Empty;
48 var inPathClass = Model.InPath ? " in-path" : string.Empty;
49 var activeClass = Model.IsActive ? " active fw-bold" : string.Empty;
50
51 <div class="nav-item d-flex align-items-center w-100 py-1">
52 @if (pageType != "Swift_Preferences")
53 {
54 var group = Model.GetProductGroup();
55 IList<FieldValueViewModel> groupFields = group.GroupFields != null ? group.GroupFields : null;
56
57 if (Model.IsClickable)
58 {
59 <a class="nav-link position-relative d-flex align-items-center gap-2 flex-grow-1@(activeClass)@(inPathClass)" @(Model.IsActive ? "aria-current='page'" : string.Empty) href="@Model.Link" id="@nodeId">
60 @if (showProductGroupImage && !string.IsNullOrEmpty(Model.GroupId) && groupFields != null)
61 {
62 foreach (FieldValueViewModel field in groupFields)
63 {
64 if (field.SystemName == "ProductGroupNavigationImage" && !string.IsNullOrEmpty(field.Value.ToString()))
65 {
66 var groupImage = field.Value.ToString();
67
68 if (Path.GetExtension(groupImage).ToLower() == ".svg")
69 {
70 <span class="icon-auto @productGroupImageShape" style="height: @(productGroupImageSize)px; width: @(productGroupImageSize)px;">
71 @ReadFile("/Files/Images/" + groupImage)
72 </span>
73 }
74 else
75 {
76 var imagePath = "/Admin/Public/GetImage.ashx?Image=" + "/Files/Images/" + Dynamicweb.Context.Current.Server.UrlEncode(groupImage) + "&Width=" + productGroupImageSize + "&Height=" + productGroupImageSize + "&crop=0";
77 <img loading="lazy" class="@productGroupImageShape" alt="@group.Name" width="@productGroupImageSize" height="@productGroupImageSize" src="@imagePath">
78 }
79 }
80 }
81 }
82 <span class="flex-grow-1">
83 @Model.Name
84 </span>
85 </a>
86
87 if (hasChildren)
88 {
89 <label class="nav-link position-relative" role="button" tabindex="0" aria-label="Unfold @Model.Name" for="nav_@(paragraphId)_@(nodeId)">
90 @{
91 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/arrow-right.svg";
92 if (!iconPath.ToLower().Contains("none") && iconPath != string.Empty)
93 {
94 iconPath = Dynamicweb.Context.Current.Server.MapPath(iconPath);
95 <span class="icon-3">@ReadFile(iconPath)</span>
96 }
97 }
98 </label>
99 }
100 }
101 else
102 {
103 <label class="nav-link position-relative d-flex align-items-center gap-2 flex-grow-1@(activeClass)@(inPathClass)" role="button" tabindex="0" @(Model.IsActive ? "aria-current='page'" : "") aria-label="Unfold @Model.Name" for="nav_@(paragraphId)_@(nodeId)">
104 @if (showProductGroupImage && !string.IsNullOrEmpty(Model.GroupId) && groupFields != null)
105 {
106 foreach (FieldValueViewModel field in groupFields)
107 {
108 if (field.SystemName == "ProductGroupNavigationImage" && !string.IsNullOrEmpty(field.Value.ToString()))
109 {
110 var groupImage = field.Value.ToString();
111
112 if (Path.GetExtension(groupImage).ToLower() == ".svg")
113 {
114 <span class="icon-auto @productGroupImageShape" style="height: @(productGroupImageSize)px; width: @(productGroupImageSize)px;">
115 @ReadFile("/Files/Images/" + groupImage)
116 </span>
117 }
118 else
119 {
120 var imagePath = "/Admin/Public/GetImage.ashx?Image=" + "/Files/Images/" + Dynamicweb.Context.Current.Server.UrlEncode(groupImage) + "&Width=" + productGroupImageSize + "&Height=" + productGroupImageSize + "&crop=0";
121 <img loading="lazy" class="@productGroupImageShape" alt="@group.Name" width="@productGroupImageSize" height="@productGroupImageSize" src="@imagePath">
122 }
123 }
124 }
125 }
126
127 <span class="flex-grow-1">
128 @Model.Name
129 </span>
130
131 @if (hasChildren)
132 {
133 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/arrow-right.svg";
134 if (!iconPath.ToLower().Contains("none") && iconPath != string.Empty)
135 {
136 iconPath = Dynamicweb.Context.Current.Server.MapPath(iconPath);
137 <span class="icon-3">@ReadFile(iconPath)</span>
138 }
139 }
140 </label>
141 }
142
143 if (hasChildren)
144 {
145 <input type="checkbox" class="visually-hidden sub-nav-check" id="nav_@(paragraphId)_@(nodeId)" @inPathChecked>
146 <div class="nav sub-nav position-absolute h-100 opacity-0 pe-none invisible w-100 left-0 top-0">
147 <div class="h-100 w-100 overflow-y-auto overflow-x-hidden">
148 <div class="nav-header position-relative py-1">
149 <label class="nav-link position-relative d-flex align-items-center gap-2 flex-grow-1" role="button" tabindex="0" aria-label="Go back to @Model.Name" for="nav_@(paragraphId)_@(nodeId)">
150 @{
151 string iconPath = "/Files/Templates/Designs/Swift/Assets/icons/arrow-left.svg";
152 if (!iconPath.ToLower().Contains("none") && iconPath != string.Empty)
153 {
154 iconPath = Dynamicweb.Context.Current.Server.MapPath(iconPath);
155 <span class="icon-3">@ReadFile(iconPath)</span>
156 }
157 }
158 <span class="flex-grow-1">@Model.Name</span>
159 </label>
160 </div>
161
162 @foreach (var node in Model.Nodes)
163 {
164 @RenderPartial("Navigation/OffCanvasNavigation/NavItem.cshtml", node, parameters)
165 }
166
167 @if (groupFields != null)
168 {
169 var groupName = group.Name;
170 string ratioCssClass = ratio != string.Empty ? " ratio" : string.Empty;
171 string ratioVariable = ratio != string.Empty ? "style=\"--bs-aspect-ratio: " + ratio + "\"" : string.Empty;
172 string productGroupPromotionImage = string.Empty;
173 string productGroupPromotionImagePath = string.Empty;
174 string productGroupPromotionDescription = string.Empty;
175 string productGroupPromotionLinkLabel = string.Empty;
176 string productGroupPromotionLink = string.Empty;
177 string gridGap = !string.IsNullOrEmpty(productGroupPromotionImageTheme) ? "gap-0" : "gap-3";
178 string themePadding = !string.IsNullOrEmpty(productGroupPromotionImageTheme) ? "p-3" : "p-0";
179
180 foreach (FieldValueViewModel field in groupFields)
181 {
182 if (field.SystemName == "ProductGroupPromotionImage")
183 {
184 productGroupPromotionImage = field.Value != null ? field.Value.ToString() : string.Empty;
185 productGroupPromotionImagePath = "/Admin/Public/GetImage.ashx?Width=" + 480 + "&crop=0&image=" + "Files/Images/" + productGroupPromotionImage;
186 }
187 if (field.SystemName == "ProductGroupPromotionDescription")
188 {
189 productGroupPromotionDescription = field.Value != null ? field.Value.ToString() : string.Empty;
190 }
191 if (field.SystemName == "ProductGroupPromotionLinkLabel")
192 {
193 productGroupPromotionLinkLabel = field.Value != null ? field.Value.ToString() : string.Empty;
194 }
195 if (field.SystemName == "ProductGroupPromotionLink")
196 {
197 productGroupPromotionLink = field.Value != null ? field.Value.ToString() : string.Empty;
198 }
199 }
200 if (showProductGroupPromotionImage)
201 {
202 <div class="grid grid-1 mt-3 mx-3 @gridGap@(productGroupPromotionImageTheme)">
203 @if (productGroupPromotionImage != string.Empty)
204 {
205 productGroupPromotionLink = !string.IsNullOrEmpty(productGroupPromotionLink) ? productGroupPromotionLink : Model.Link;
206
207 <a href="@productGroupPromotionLink" title="@groupName">
208 <figure class="m-0@(ratioCssClass)" @ratioVariable>
209 <img class="img-fluid" src="@productGroupPromotionImagePath" alt="@groupName" style="object-fit:cover">
210 </figure>
211 </a>
212 }
213 @if (!string.IsNullOrEmpty(productGroupPromotionDescription) || !string.IsNullOrEmpty(productGroupPromotionLinkLabel))
214 {
215 <div class="grid grid-1 @themePadding ">
216
217 @if (!string.IsNullOrEmpty(productGroupPromotionDescription))
218 {
219 <h6 class="m-0">@productGroupPromotionDescription</h6>
220 }
221 @if (!string.IsNullOrEmpty(productGroupPromotionLinkLabel))
222 {
223 productGroupPromotionLink = !string.IsNullOrEmpty(productGroupPromotionLink) ? productGroupPromotionLink : Model.Link;
224
225 <a href="@productGroupPromotionLink" title="@productGroupPromotionLinkLabel" class="btn btn-link text-start border-0 p-0">@productGroupPromotionLinkLabel</a>
226 }
227 </div>
228 }
229 </div>
230 }
231 }
232 </div>
233 </div>
234 }
235 }
236 else
237 {
238 bool countrySelector = page.Item?["CountrySelector"] != null ? Convert.ToBoolean(page.Item["CountrySelector"].ToString()) : false;
239 bool languageSelector = page.Item?["LanguageSelector"] != null ? Convert.ToBoolean(page.Item["LanguageSelector"].ToString()) : false;
240 bool currencySelector = page.Item?["CurrencySelector"] != null ? Convert.ToBoolean(page.Item["CurrencySelector"].ToString()) : false;
241 string name = Translate("Preferences");
242 string icon = string.Empty;
243
244 if (languageSelector)
245 {
246 bool hideIcon = page.Item?["HideIcon"] != null ? Convert.ToBoolean(page.Item["HideIcon"].ToString()) : false;
247
248 if (!hideIcon)
249 {
250 icon = $"/Files/FlagIcons/{Pageview.Area.CultureInfo.Name.ToLower()}.svg";
251 }
252
253 name = reg.Replace(Pageview.Area.CultureInfo.DisplayName, string.Empty);
254 }
255
256 <form action="/Default.aspx?ID=@Model.PageId" data-response-target-element="PreferencesModalContent" data-layout-template="Swift_Preferences.cshtml" data-preloader="inline" class="w-100">
257 <input type="hidden" name="Layout" value="modal">
258 <input type="hidden" name="CurrentPageID" value="@Pageview.ID">
259 <input type="hidden" name="GroupID" value="@groupId">
260 <input type="hidden" name="ProductID" value="@productId">
261 <input type="hidden" name="VariantID" value="@variantId">
262 <a href="#" role="button" onclick="swift.PageUpdater.Update(event)" class="nav-link position-relative flex-fill swift_open-preferences-modal @activeClass @inPathClass" @(Model.IsActive ? "aria-current='page'" : "") data-bs-toggle="modal" data-bs-target="#PreferencesModal">
263 @if (icon != "")
264 {
265 if (Path.GetExtension(icon).ToLower() == ".svg" && !icon.ToLower().Contains("none"))
266 {
267 string iconPath = Dynamicweb.Context.Current.Server.MapPath(icon);
268
269 <span class="icon-2">@ReadFile(iconPath)</span>
270 }
271 }
272 <span>@name</span>
273 </a>
274 </form>
275 }
276 </div>
277
278 }
279 </div>
280