Error compiling template "Designs/Standard/_parsed/Page.parsed.cshtml"
Line 375: 'Dynamicweb.Content.Page' does not contain a definition for 'Values' and no extension method 'Values' accepting a first argument of type 'Dynamicweb.Content.Page' could be found (are you missing a using directive or an assembly reference?)
Line 395: 'Dynamicweb.Content.Page' does not contain a definition for 'Values' and no extension method 'Values' accepting a first argument of type 'Dynamicweb.Content.Page' could be found (are you missing a using directive or an assembly reference?)
Line 1159: 'Dynamicweb.Content.Area' does not contain a definition for 'Values' and no extension method 'Values' accepting a first argument of type 'Dynamicweb.Content.Area' could be found (are you missing a using directive or an assembly reference?)
Line 1160: 'Dynamicweb.Content.Page' does not contain a definition for 'Values' and no extension method 'Values' accepting a first argument of type 'Dynamicweb.Content.Page' could be found (are you missing a using directive or an assembly reference?)
Line 1168: The type or namespace name 'Page' does not exist in the namespace 'Dynamicweb.Frontend' (are you missing an assembly reference?)
Line 1168: 'Dynamicweb.Frontend.PageView' does not contain a definition for 'PageCollection' and no extension method 'PageCollection' accepting a first argument of type 'Dynamicweb.Frontend.PageView' could be found (are you missing a using directive or an assembly reference?)
Line 1192: 'Dynamicweb.Content.Page' does not contain a definition for 'AreaID' and no extension method 'AreaID' accepting a first argument of type 'Dynamicweb.Content.Page' could be found (are you missing a using directive or an assembly reference?)
Line 1230: The type or namespace name 'Page' does not exist in the namespace 'Dynamicweb.Frontend' (are you missing an assembly reference?)
Line 1230: 'Dynamicweb.Frontend.PageView' does not contain a definition for 'PageCollection' and no extension method 'PageCollection' accepting a first argument of type 'Dynamicweb.Frontend.PageView' could be found (are you missing a using directive or an assembly reference?)
Line 1282: 'Dynamicweb.Content.Page' does not contain a definition for 'Values' and no extension method 'Values' accepting a first argument of type 'Dynamicweb.Content.Page' could be found (are you missing a using directive or an assembly reference?)
Line 1282: 'Dynamicweb.Content.Page' does not contain a definition for 'Values' and no extension method 'Values' accepting a first argument of type 'Dynamicweb.Content.Page' could be found (are you missing a using directive or an assembly reference?)
Line 1282: 'Dynamicweb.Content.Page' does not contain a definition for 'Values' and no extension method 'Values' accepting a first argument of type 'Dynamicweb.Content.Page' could be found (are you missing a using directive or an assembly reference?)
Line 1288: 'Dynamicweb.Content.Page' does not contain a definition for 'Values' and no extension method 'Values' accepting a first argument of type 'Dynamicweb.Content.Page' could be found (are you missing a using directive or an assembly reference?)
Line 1288: 'Dynamicweb.Content.Page' does not contain a definition for 'Values' and no extension method 'Values' accepting a first argument of type 'Dynamicweb.Content.Page' could be found (are you missing a using directive or an assembly reference?)
Line 1288: 'Dynamicweb.Content.Page' does not contain a definition for 'Values' and no extension method 'Values' accepting a first argument of type 'Dynamicweb.Content.Page' could be found (are you missing a using directive or an assembly reference?)
Line 1823: The type or namespace name 'User' does not exist in the namespace 'Dynamicweb.Modules.UserManagement' (are you missing an assembly reference?)
Line 1823: The type or namespace name 'PagePermissionLevels' does not exist in the namespace 'Dynamicweb.Modules.UserManagement' (are you missing an assembly reference?)
Line 2064: 'Dynamicweb.Base' does not contain a definition for 'MD5HashToString'
Line 2066: 'Dynamicweb.Base' does not contain a definition for 'MD5HashToString'
Line 2067: 'Dynamicweb.Base' does not contain a definition for 'MD5HashToString'
Line 2077: 'Dynamicweb.Base' does not contain a definition for 'MD5HashToString'
Line 2655: 'Dynamicweb.Base' does not contain a definition for 'MD5HashToString'
Line 3411: 'Dynamicweb.Frontend.PageView' does not contain a definition for 'AreaCollection' and no extension method 'AreaCollection' accepting a first argument of type 'Dynamicweb.Frontend.PageView' could be found (are you missing a using directive or an assembly reference?)
Line 3411: The type or namespace name 'Area' does not exist in the namespace 'Dynamicweb.Frontend' (are you missing an assembly reference?)
Line 3411: 'Dynamicweb.Frontend.PageView' does not contain a definition for 'AreaCollection' and no extension method 'AreaCollection' accepting a first argument of type 'Dynamicweb.Frontend.PageView' could be found (are you missing a using directive or an assembly reference?)
Line 3448: The type or namespace name 'Page' does not exist in the namespace 'Dynamicweb.Frontend' (are you missing an assembly reference?)
Line 3448: 'Dynamicweb.Frontend.PageView' does not contain a definition for 'PageCollection' and no extension method 'PageCollection' accepting a first argument of type 'Dynamicweb.Frontend.PageView' could be found (are you missing a using directive or an assembly reference?)
Line 4431: 'Dynamicweb.Frontend.PageView' does not contain a definition for 'AreaCollection' and no extension method 'AreaCollection' accepting a first argument of type 'Dynamicweb.Frontend.PageView' could be found (are you missing a using directive or an assembly reference?)
Line 4434: The type or namespace name 'Area' does not exist in the namespace 'Dynamicweb.Frontend' (are you missing an assembly reference?)

1 @using System.IO 2 @using System.Web 3 @helper RenderGoogleConversion(string conversionId, string conversionLanguage, string conversionFormat, string conversionColor, string conversionLabel, string conversionValue, string conversionCurrency, bool remarketingOnly) { 4 var googleConversionId = conversionId; 5 var googleConversionLanguage = string.IsNullOrWhiteSpace(conversionLanguage) ? "en" : conversionLanguage; 6 var googleConversionFormat = string.IsNullOrWhiteSpace(conversionFormat) ? "3" : conversionFormat; 7 var googleConversionColor = string.IsNullOrWhiteSpace(conversionColor) ? "ffffff" : conversionColor; 8 var googleConversionLabel = conversionLabel; 9 var googleConversionValue = string.IsNullOrWhiteSpace(conversionValue) ? "0" : conversionValue; 10 var googleConversionCurrency = string.IsNullOrWhiteSpace(conversionCurrency) ? "DKK" : conversionCurrency; 11 var googleRemarketingOnly = remarketingOnly; 12 13 <!-- Google Code for the Conversion Page --> 14 <script type="text/javascript"> 15 /* <![CDATA[ */ 16 var google_conversion_id = @(googleConversionId); 17 var google_conversion_language = '@(googleConversionLanguage)'; 18 var google_conversion_format = '@(googleConversionFormat)'; 19 var google_conversion_color = '@(googleConversionColor)'; 20 var google_conversion_label = '@(googleConversionLabel)'; 21 var google_conversion_value = @(googleConversionValue); 22 var google_conversion_currency = '@(googleConversionCurrency)'; 23 var google_remarketing_only = @(googleRemarketingOnly ? "true" : "false"); 24 /* ]]> */ 25 </script> 26 <script type="text/javascript" src="https://www.googleadservices.com/pagead/conversion.js"></script> 27 <noscript> 28 <div style="display: inline;"> 29 <img src="https://www.googleadservices.com/pagead/conversion/@(googleConversionId)/?value=@(googleConversionValue)&amp;currency_code=@(googleConversionCurrency)&amp;label=@(googleConversionLabel)&amp;guid=ON&amp;script=0" alt="" width="1" height="1" style="border-style: none;"> 30 </div> 31 </noscript> 32 } 33 @helper RenderGoogleAnalyticsEcommerceTracking(string transactionId, string affiliation, string revenue, string shipping, string tax, string currency, string[][] orderLines) { 34 <script type="text/javascript"> 35 if (!window.skabertrang_ga_ecommerce_callbacks) 36 window.skabertrang_ga_ecommerce_callbacks = []; 37 38 (function() { 39 var orderLines = @(Newtonsoft.Json.JsonConvert.SerializeObject(orderLines)); 40 41 window.skabertrang_ga_ecommerce_callbacks.push(function() { 42 ga('require', 'ecommerce'); 43 44 ga('ecommerce:addTransaction', { 45 'id' : '@(transactionId)', 46 'affiliation' : '@(affiliation)', 47 'revenue' : '@(revenue)', 48 'shipping' : '@(shipping)', 49 'tax' : '@(tax)', 50 'currency' : '@(currency)' 51 }); 52 53 if (orderLines && orderLines.length) { 54 for (var i = 0; i < orderLines.length; i++) { 55 ga('ecommerce:addItem', { 56 'id' : '@(transactionId)', 57 'name' : orderLines[i][1], 58 'sku' : orderLines[i][0], 59 'category' : orderLines[i][2], 60 'price' : orderLines[i][3], 61 'quantity' : orderLines[i][4], 62 'currency' : '@(currency)' 63 }); 64 } 65 } 66 67 ga('ecommerce:send'); 68 }); 69 })(); 70 </script> 71 } 72 @functions { 73 string mediaOverlay(string filePath, string filePathThumb = "", string caption = "", string group = "", string alt = "", string title = "", string extraAttributes = "") { 74 var pv = Dynamicweb.Frontend.PageView.Current(); 75 var imageOverlayType = pv.Area.Item["ImageOverlayType"] as string; 76 77 filePathThumb = !string.IsNullOrWhiteSpace(filePathThumb) ? filePathThumb : filePath; 78 group = !string.IsNullOrWhiteSpace(group) ? group : !string.IsNullOrWhiteSpace(GetString("ParagraphID")) ? GetString("ParagraphID") : "imageGroup"; 79 80 if (imageOverlayType=="Fancybox") { 81 return "<a class='fancybox media-overlay' href='" + filePath + "' rel='" + group + "' title='" + title + "' data-title='" + caption + "'><img src='/Files/Templates/Designs/Standard/"+filePathThumb+"' alt='" + alt + "' title='" + title + "'></a>"; 82 } else { 83 return "<a href='" + filePath + "' class='media-overlay' data-lightbox='" + group + "' data-title='" + caption + "'><img src='/Files/Templates/Designs/Standard/"+filePathThumb+"' alt='" + alt + "' title='" + title + "'></a>"; 84 } 85 } 86 87 string GetImage(string image, int width, int height, int compression, int crop, string colorSpace, bool doNotUpscale) { 88 // Crop 89 // 0 = Center 90 // 1 = From upper left 91 // 2 = From lower left 92 // 3 = From lower right 93 // 4 = From upper right 94 // 5 = Keep aspect ratio 95 // 6 = Fit image 96 97 // ColorSpace 98 // rgb 99 // cmyk 100 // grayscale 101 102 var param = new List<string>(); 103 104 param.Add("Image=" + image); 105 param.Add("Format=" + Path.GetExtension(image).Substring(1)); 106 107 if (width > 0) { 108 param.Add("Width=" + width); 109 } 110 111 if (height > 0) { 112 param.Add("Height=" + height); 113 } 114 115 param.Add("Compression=" + compression); 116 param.Add("Crop=" + crop); 117 param.Add("ColorSpace=" + colorSpace); 118 param.Add("DoNotUpscale=" + (doNotUpscale ? "True" : "False")); 119 120 return "/Admin/Public/GetImage.ashx?" + string.Join("&amp;", param); 121 } 122 123 string GetImagePlaceholder(int width, int height) { 124 return GetImagePlaceholder(width, height, null, null, null); 125 } 126 127 string GetImagePlaceholder(int width, int height, string backgroundColor, string textColor, string text) { 128 var r = "https://placehold.it/" + width; 129 130 if (height > 0) { 131 r += "x" + height; 132 } 133 134 if (!string.IsNullOrWhiteSpace(backgroundColor) && !string.IsNullOrWhiteSpace(textColor)) { 135 r += "/" + backgroundColor; 136 r += "/" + textColor; 137 } 138 139 if (!string.IsNullOrWhiteSpace(text)) { 140 r += "?text=" + text.Replace(" ", "+"); 141 } 142 143 return r; 144 } 145 146 147 T LoadContextItem<T>(string key) { 148 var obj = HttpContext.Current.Items != null ? HttpContext.Current.Items[key] : null; 149 150 if (obj == null) { 151 return default(T); 152 } 153 154 return (T)obj; 155 } 156 157 void SaveContextItem(string key, object value) { 158 if (HttpContext.Current.Items != null && value != null) { 159 HttpContext.Current.Items[key] = value; 160 } 161 } 162 163 string PathCombine(params string[] paths) { 164 return Path.Combine(paths); 165 } 166 167 string NullIfEmpty(string value) { 168 return string.IsNullOrEmpty(value) ? null : value; 169 } 170 171 string NullIfWhiteSpace(string value) { 172 return string.IsNullOrWhiteSpace(value) ? null : value; 173 } 174 175 string ToJson(object value) { 176 return ToJson(value, false); 177 } 178 179 string ToJson(object value, bool indented) { 180 return Newtonsoft.Json.JsonConvert.SerializeObject( 181 value, 182 indented ? Newtonsoft.Json.Formatting.Indented : Newtonsoft.Json.Formatting.None, 183 new Newtonsoft.Json.Converters.IsoDateTimeConverter { DateTimeFormat = "yyyyMMdd'T'HHmmss" } 184 ); 185 } 186 187 void AddCssFile(params string[] files) { 188 var list = LoadContextItem<List<string>>("SB.CssFiles"); 189 190 if (list == null) { 191 list = new List<string>(); 192 } 193 194 foreach (var file in files) { 195 if (!list.Contains(file, StringComparer.OrdinalIgnoreCase)) { 196 list.Add(file); 197 } 198 } 199 200 SaveContextItem("SB.CssFiles", list); 201 } 202 203 void AddJsFile(params string[] files) { 204 var list = LoadContextItem<List<string>>("SB.JsFiles"); 205 206 if (list == null) { 207 list = new List<string>(); 208 } 209 210 foreach (var file in files) { 211 if (!list.Contains(file, StringComparer.OrdinalIgnoreCase)) { 212 list.Add(file); 213 } 214 } 215 216 SaveContextItem("SB.JsFiles", list); 217 } 218 } 219 @using System.Collections 220 @using System.Linq 221 @using System.Xml 222 @using System.Xml.Linq 223 @using System.Xml.XPath 224 @using System.Web 225 @{ 226 var Request = HttpContext.Current.Request; 227 var Response = HttpContext.Current.Response; 228 var Server = HttpContext.Current.Server; 229 230 var topPageview = Dynamicweb.Frontend.PageView.Current(); 231 var topPageviewMainPages = ((ArrayList)topPageview.Area.Values["areamainpages"]).Cast<int>().ToList(); 232 var topPageviewPagePaths = ((ArrayList)topPageview.Page.Values["pagepath"]).Cast<int>().ToList(); 233 234 /* 235 * /Admin/Public/GetNavigationXML.aspx?Expand=2&ParentID=0&StartLevel=1&StopLevel=999&AreaID=1 236 */ 237 238 Func<int, int, Dictionary<string, object>> __topPageviewGetPageById = null; 239 __topPageviewGetPageById = (pageId, pageLevel) => { 240 var page = (Dynamicweb.Frontend.Page)topPageview.PageCollection[pageId]; 241 var pages = page.Children != null ? page.Children.Select(o => __topPageviewGetPageById(o.ID, pageLevel + 1)).Where(o => o != null) : null; 242 243 return new Dictionary<string, object> { 244 { "Id" , page.ID }, 245 { "Active" , topPageview.ID == page.ID }, 246 { "InPath" , topPageviewPagePaths.Contains(page.ID) }, 247 { "Level" , pageLevel }, 248 { "Type" , "page" }, 249 250 { "Menutext" , page.Values["pagemenutext"] != null ? (string)page.Values["pagemenutext"] : string.Empty }, 251 { "NavigationTag" , page.Values["pagenavigationtag"] != null ? (string)page.Values["pagenavigationtag"] : string.Empty }, 252 { "ItemType" , page.Values["pageitemtype"] != null ? (string)page.Values["pageitemtype"] : string.Empty }, 253 { "IsFolder" , page.Values["pageisfolder"] != null ? (bool)page.Values["pageisfolder"] : false }, 254 { "Enabled" , page.Values["pageactive"] != null ? (bool)page.Values["pageactive"] : false }, 255 256 { "PropertyItem" , page.PropertyItem != null ? page.PropertyItem : null }, 257 { "Item" , page.Item != null ? page.Item : null }, 258 259 { "Pages", pages != null && pages.Any() ? pages.ToList() : null } 260 }; 261 }; 262 263 var __xmlNavigation = new Dynamicweb.Frontend.XmlNavigation(topPageview) { Sitemap = true }; 264 var __xmlDocument = __xmlNavigation.XML(0, 1, 999, Dynamicweb.Frontend.XmlNavigation.Expand.All, Pageview.Page.AreaID); 265 var __xNavigation = XDocument.Load(new XmlNodeReader(__xmlDocument)); 266 267 Func<XElement, int, Dictionary<string, object>> __topPageviewGetPageByXml = null; 268 __topPageviewGetPageByXml = (xElement, pageLevel) => { 269 var id = int.Parse((string)xElement.Attribute("ID")); 270 var active = (string)xElement.Attribute("Active") == "True"; 271 var inPath = (string)xElement.Attribute("InPath") == "True"; 272 var type = (string)xElement.Attribute("Type"); 273 var pages = xElement.XPathSelectElements("./Page").Select(o => __topPageviewGetPageByXml(o, pageLevel + 1)); 274 275 // ecom group 276 if (type == "group") { 277 var href = (string)xElement.Attribute("Href"); 278 var productCount = (string)xElement.Attribute("ProductCount"); 279 var menuText = (string)xElement.Attribute("MenuText"); 280 var hrefParsed = HttpUtility.ParseQueryString(href); 281 282 return new Dictionary<string, object> { 283 { "Id" , id }, 284 { "Active" , active }, 285 { "InPath" , inPath }, 286 { "Level" , pageLevel }, 287 { "Type" , type }, 288 289 { "Menutext" , menuText }, 290 { "NavigationTag" , string.Empty }, 291 { "ItemType" , string.Empty }, 292 { "IsFolder" , false }, 293 { "Enabled" , true }, 294 295 { "GroupId" , hrefParsed["GroupID"] }, 296 { "ProductCount" , string.IsNullOrEmpty(productCount) ? 0 : int.Parse(productCount) }, 297 298 { "Pages", pages != null && pages.Any() ? pages.ToList() : null } 299 }; 300 } 301 302 var page = (Dynamicweb.Frontend.Page)topPageview.PageCollection[id]; 303 304 return new Dictionary<string, object> { 305 { "Id" , id }, 306 { "Active" , active }, 307 { "InPath" , inPath }, 308 { "Level" , pageLevel }, 309 { "Type" , "page" }, 310 311 { "Menutext" , page.Values["pagemenutext"] != null ? (string)page.Values["pagemenutext"] : string.Empty }, 312 { "NavigationTag" , page.Values["pagenavigationtag"] != null ? (string)page.Values["pagenavigationtag"] : string.Empty }, 313 { "ItemType" , page.Values["pageitemtype"] != null ? (string)page.Values["pageitemtype"] : string.Empty }, 314 { "IsFolder" , page.Values["pageisfolder"] != null ? (bool)page.Values["pageisfolder"] : false }, 315 { "Enabled" , page.Values["pageactive"] != null ? (bool)page.Values["pageactive"] : false }, 316 317 { "PropertyItem" , page.PropertyItem != null ? page.PropertyItem : null }, 318 { "Item" , page.Item != null ? page.Item : null }, 319 320 { "Pages", pages != null && pages.Any() ? pages.ToList() : null } 321 }; 322 }; 323 324 var __topPageviewPages1 = __xNavigation.XPathSelectElements("/NavigationTree/Page").Select(o => __topPageviewGetPageByXml(o, 1)).ToList(); 325 var __topPageviewPages2 = topPageviewMainPages.Select(o => __topPageviewGetPageById(o, 1)).ToList(); 326 var topPageviewPages = new List<Dictionary<string, object>>(); 327 328 //Udkommenteret for at f� menuen i inspektion til at virke. 329 //foreach (var item in __topPageviewPages1) { 330 // if (!topPageviewPages.Any(o => (int)o["Id"] == (int)item["Id"])) { 331 // topPageviewPages.Add(item); 332 // } 333 //} 334 335 foreach (var item in __topPageviewPages2) { 336 if (!topPageviewPages.Any(o => (int)o["Id"] == (int)item["Id"])) { 337 topPageviewPages.Add(item); 338 } 339 } 340 } 341 @{ 342 var _master_LongLang = GetString("LongLang"); 343 var _master_DesignBaseUrl = GetString("Template:DesignBaseUrl"); 344 var _master_AssetsBaseUrl = _master_DesignBaseUrl + "assets/"; 345 346 var _master_ItemType = string.Empty; 347 var _master_ServiceType = string.Empty; 348 349 { 350 var page = Pageview.Page; 351 352 _master_ItemType = page.Values != null && page.Values.ContainsKey("pageitemtype") ? (string)page.Values["pageitemtype"] : _master_ItemType; 353 _master_ServiceType = page.Item != null && page.Item.ContainsKey("Type") ? (string)page.Item["Type"] : _master_ServiceType; 354 355 while (true) { 356 page = page.Parent; 357 358 if (page == null || page.Values == null || !page.Values.ContainsKey("pageisfolder") || (bool)page.Values["pageisfolder"]) { 359 break; 360 } 361 362 _master_ServiceType = page.Item != null && page.Item.ContainsKey("Type") ? (string)page.Item["Type"] : _master_ServiceType; 363 } 364 } 365 } 366 <!DOCTYPE html> 367 <html lang="@(_master_LongLang.Split('-')[0])"> 368 <head> 369 <meta charset="utf-8"> 370 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 371 <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> 372 <meta name="google-translate-customization" content="3ab294752fbc971b-990b0778fdaa5c49-gd959cd44578dce8b-1a"> 373 374 @RenderSnippet("OpenGraph") 375 376 <title>@GetValue("Title")</title> 377 378 @GetValue("MetaTags") 379 @GetValue("CopyRightNotice") 380 381 @RenderSnippet("Icons") 382 @RenderSnippet("Css") 383 384 @* Loading some needed scripts at top of page - rest before end of body tag *@ 385 @RenderSnippet("TopJs") 386 387 @* HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries *@ 388 @* WARNING: Respond.js doesn't work if you view the page via file:// *@ 389 <!--[if lt IE 9]> 390 <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script> 391 <script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script> 392 <![endif]--> 393 394 @GetValue("Stylesheets") 395 @GetValue("Javascripts") 396 </head> 397 <body data-itemtype="@(_master_ItemType)" data-servicetype="@(_master_ServiceType)" data-areaid="@(Pageview.AreaID)"> 398 <div canvas="container"> 399 400 @helper Page_RenderBanner() { 401 var noBanner = GetBoolean("Item.NoBanner"); 402 var pageBanner = GetString("Item.TopBanner"); 403 404 if (noBanner) { 405 return; 406 } 407 408 if (string.IsNullOrWhiteSpace(pageBanner)) { 409 var page = Pageview.Page; 410 411 while (true) { 412 page = page.Parent; 413 414 if (page == null || (bool)page.Values["pageisfolder"]) { 415 break; 416 } 417 418 noBanner = (bool)page.Item["NoBanner"]; 419 pageBanner = (string)page.Item["TopBanner"]; 420 421 if (noBanner || !string.IsNullOrWhiteSpace(pageBanner)) { 422 break; 423 } 424 } 425 } 426 427 var websiteBanner = GetString("Item.Area.TopBanner"); 428 var bannerImage = !string.IsNullOrWhiteSpace(pageBanner) ? pageBanner : websiteBanner; 429 430 if (noBanner || string.IsNullOrWhiteSpace(bannerImage)) { 431 return; 432 } 433 434 var pageItemType = (string)Pageview.Page.Values["pageitemtype"]; 435 var pageName = GetString("Item.PageName"); 436 437 AddJsFile("https://cdnjs.cloudflare.com/ajax/libs/textfit/2.3.1/textFit.min.js"); 438 439 <div class="banner-block"> 440 <img src="@(bannerImage)" alt="" class="img-responsive"> 441 <div class="banner-title"> 442 <div class="container"> 443 <div class="col-md-9 col-md-offset-3"> 444 @(pageName) 445 </div> 446 </div> 447 @*<div class="hidden">@(pageName)</div>*@ 448 </div> 449 </div> 450 451 <script type="text/javascript"> 452 (function ($) { 453 function resizer() { 454 var $target = $('.container > div', '.banner-title'); 455 $target.removeClass('hidden'); 456 textFit($target, { maxFontSize: 46, alignVert: true, detectMultiLine: false }); 457 } 458 459 $(window).on('load resize orientationchange', resizer); 460 })($); 461 </script> 462 } 463 @helper Page_RenderBreadcrumb(Dictionary<string, object> page) { 464 var id = (int)page["Id"]; 465 var active = (bool)page["Active"]; 466 var inpath = (bool)page["InPath"]; 467 var itemtype = (string)page["ItemType"]; 468 var menutext = (string)page["Menutext"]; 469 var pages = (List<Dictionary<string, object>>)page["Pages"]; 470 var type = (string)page["Type"]; 471 472 if (inpath) { 473 var hideinbreadcrum = false; 474 475 if (type == "page") { 476 var propertyItem = (Dynamicweb.Content.Items.Item)page["PropertyItem"]; 477 hideinbreadcrum = propertyItem != null && propertyItem["HideInBreadcrum"] != null && (bool)propertyItem["HideInBreadcrum"]; 478 } 479 480 if (!hideinbreadcrum) { 481 var url = "/Default.aspx?Id=" + id; 482 url += (type == "group") ? "&amp;GroupId=" + (string)page["GroupId"] : string.Empty; 483 484 <li data-active="@(active ? 1 : 0)" data-inpath="@(inpath ? 1 : 0)" data-pageid="@(id)"><a href="@(url)">@(menutext)</a></li> 485 } 486 487 if (pages != null) { 488 foreach (var subpage in pages) { 489 @Page_RenderBreadcrumb(subpage) 490 } 491 } 492 } 493 } 494 @helper Page_RenderListMenu(Dictionary<string, object> page, int level) { 495 var id = (int)page["Id"]; 496 var active = (bool)page["Active"]; 497 var inpath = (bool)page["InPath"]; 498 var itemtype = (string)page["ItemType"]; 499 var menutext = (string)page["Menutext"]; 500 var pages = (List<Dictionary<string, object>>)page["Pages"]; 501 var isfolder = (bool)page["IsFolder"]; 502 var enabled = (bool)page["Enabled"]; 503 var type = (string)page["Type"]; 504 505 if (!enabled) { 506 return; 507 } 508 509 var hideinbreadcrum = false; 510 511 if (type == "page") { 512 var propertyItem = (Dynamicweb.Content.Items.Item)page["PropertyItem"]; 513 hideinbreadcrum = propertyItem != null && propertyItem["HideInBreadcrum"] != null && (bool)propertyItem["HideInBreadcrum"]; 514 } 515 516 if (hideinbreadcrum) { 517 if (pages != null && inpath) { 518 foreach (var subpage in pages) { 519 @Page_RenderListMenu(subpage, level + 1) 520 } 521 } 522 } else { 523 var url = "/Default.aspx?Id=" + id; 524 url += (type == "group") ? "&amp;GroupId=" + (string)page["GroupId"] : string.Empty; 525 526 <li data-active="@(active ? 1 : 0)" data-inpath="@(inpath ? 1 : 0)" data-level="@(level)" data-pageid="@(id)"> 527 <a href="@(url)">@(menutext)</a> 528 @if (pages != null && inpath) { 529 <ul> 530 @foreach (var subpage in pages) { 531 @Page_RenderListMenu(subpage, level + 1) 532 } 533 </ul> 534 } 535 </li> 536 } 537 } 538 @helper Page_RenderExtras() { 539 var folderStaffs = GetString("Item.Area.Folder_Staffs"); 540 var folderCases = GetString("Item.Area.Folder_Cases"); 541 var folderNews = GetString("Item.Area.Folder_News"); 542 var pageCases = GetString("Item.Area.Page_Cases"); 543 var pageNews = GetString("Item.Area.Page_News"); 544 545 @RenderItemList(new { 546 ItemType = "Staff", 547 ListSourceType = "Page", 548 ListSourcePage = folderStaffs, 549 ItemFieldsList = "*", 550 ListTemplate = "ItemPublisher/List/Staffs-extra.cshtml", 551 ListPageSize = 10000 552 }) 553 554 if (Pageview.Page.ID.ToString() != pageCases) { 555 @RenderItemList(new { 556 ItemType = "Case", 557 ListSourceType = "Page", 558 ListSourcePage = folderCases, 559 ItemFieldsList = "*", 560 ListTemplate = "ItemPublisher/List/Cases-extra.cshtml", 561 ListPageSize = 10000 562 }) 563 } 564 565 if (Pageview.Page.ID.ToString() != pageNews) { 566 @RenderItemList(new { 567 ItemType = "News", 568 ListSourceType = "Page", 569 ListSourcePage = folderNews, 570 ItemFieldsList = "*", 571 ListTemplate = "ItemPublisher/List/News-extra.cshtml", 572 ListPageSize = 10000 573 }) 574 } 575 } 576 @{ 577 var pageType = GetString("Item.PageType"); 578 var hideNavigation = GetBoolean("Item.HideNavigation"); 579 var hideBreadcrumb = GetBoolean("Item.HideBreadcrumb"); 580 581 var contentColumnLeft = GetString("DwContent(columnleft)"); 582 var contentColumnCenter = GetString("DwContent(columncenter)"); 583 var contentColumnRight = GetString("DwContent(columnright)"); 584 585 var existsColumnLeft = !string.IsNullOrWhiteSpace(contentColumnLeft); 586 var existsColumnCenter = !string.IsNullOrWhiteSpace(contentColumnCenter); 587 var existsColumnRight = !string.IsNullOrWhiteSpace(contentColumnRight); 588 589 if (string.IsNullOrWhiteSpace(pageType)) { 590 if (hideNavigation) { 591 if (!existsColumnLeft && !existsColumnRight) { 592 pageType = "1column"; 593 } else if (!existsColumnLeft && existsColumnRight) { 594 pageType = "2columns_right"; 595 } else if (existsColumnLeft && !existsColumnRight) { 596 pageType = "2columns_left"; 597 } else if (existsColumnLeft && existsColumnRight) { 598 pageType = "3columns"; 599 } else if (!existsColumnRight) { 600 pageType = "2columns_left"; 601 } 602 } else { 603 if (!existsColumnLeft && !existsColumnRight) { 604 pageType = "2columns_left"; 605 } else if (!existsColumnLeft && existsColumnRight) { 606 pageType = "3columns"; 607 } else if (existsColumnLeft && !existsColumnRight) { 608 pageType = "2columns_left"; 609 } else if (existsColumnLeft && existsColumnRight) { 610 pageType = "3columns"; 611 } else if (!existsColumnRight) { 612 pageType = "2columns_left"; 613 } 614 } 615 } 616 617 var columns = 2; 618 var showLeft = true; 619 var showRight = false; 620 621 switch (pageType) { 622 case "3columns": 623 // 3 kolonner 624 columns = 3; 625 showRight = true; 626 break; 627 628 case "2columns_left": 629 // 2 kolonner ingen hoejre 630 break; 631 632 case "2columns_right": 633 // 2 kolonner ingen venstre 634 showLeft = false; 635 showRight = true; 636 break; 637 638 case "1column": 639 // 1 kolonne 640 columns = 1; 641 showLeft = false; 642 break; 643 } 644 645 var classColumnCenter = "col-md-9"; 646 647 if (columns == 3) { 648 classColumnCenter = "col-md-6"; 649 } else if (columns == 1) { 650 classColumnCenter = "col-md-12"; 651 } 652 } 653 @if (false) { 654 <div id="column-left">@GetValue("DwContent(columnleft)")</div> 655 <div id="column-center">@GetValue("DwContent(columncenter)")</div> 656 <div id="column-right">@GetValue("DwContent(columnright)")</div> 657 <div id="extra-block">@GetValue("DwContent(extrablock)")</div> 658 } 659 @Page_RenderBanner() 660 661 <div class="container"> 662 @if (!hideBreadcrumb) { 663 <div class="breadcrumb-menu"> 664 <ul class="breadcrumb"> 665 @foreach (var page in topPageviewPages) { 666 @Page_RenderBreadcrumb(page) 667 } 668 </ul> 669 </div> 670 } else { 671 <div class="breadcrumb-blank"></div> 672 } 673 674 <div class="row"> 675 @if (showLeft) { 676 var tmpTopPageviewPages = new List<Dictionary<string, object>>(); 677 678 if (!hideNavigation) { 679 var tmpPage = topPageviewPages.FirstOrDefault(o => (int)o["Id"] == topPageviewPagePaths[0]); 680 681 while (true) { 682 if (tmpPage == null) { 683 break; 684 } 685 686 var propertyItem = (Dynamicweb.Content.Items.Item)tmpPage["PropertyItem"]; 687 var hideinbreadcrum = propertyItem != null && propertyItem["HideInBreadcrum"] != null && (bool)propertyItem["HideInBreadcrum"]; 688 var isfolder = (bool)tmpPage["IsFolder"]; 689 var pages = (List<Dictionary<string, object>>)tmpPage["Pages"]; 690 691 if (hideinbreadcrum || isfolder) { 692 if (pages != null) { 693 foreach (var subpage in pages) { 694 if ((bool)subpage["InPath"]) { 695 tmpPage = subpage; 696 continue; 697 } 698 } 699 } 700 } 701 702 tmpTopPageviewPages.Add(tmpPage); 703 break; 704 } 705 } 706 707 <div class="col-md-3"> 708 @if (tmpTopPageviewPages.Any()) { 709 <div class="list-menu"> 710 <ul> 711 @foreach (var page in tmpTopPageviewPages) { 712 @Page_RenderListMenu(page, 1) 713 } 714 </ul> 715 </div> 716 } 717 718 @if (existsColumnLeft) { 719 <div class="row"> 720 @(contentColumnLeft) 721 </div> 722 } 723 </div> 724 } 725 726 <div class="@(classColumnCenter)"> 727 @if (existsColumnCenter) { 728 <div class="row"> 729 @(contentColumnCenter) 730 </div> 731 } 732 </div> 733 734 @if (showRight) { 735 <div class="col-md-3"> 736 @if (existsColumnRight) { 737 <div class="row"> 738 @(contentColumnRight) 739 </div> 740 } 741 </div> 742 } 743 </div> 744 745 @RenderSnippet("SNS") 746 </div> 747 748 @Page_RenderExtras() 749 750 @RenderSnippet("Footer") 751 </div> 752 753 @RenderSnippet("Top") 754 755 <div off-canvas="navbar-stage right shift"> 756 @RenderSnippet("NavBarStage") 757 </div> 758 759 <div off-canvas="contact-form bottom push"> 760 @RenderSnippet("ContactForm") 761 </div> 762 763 <div class="modal fade" id="contactformModal" tabindex="-1" role="dialog" aria-labelledby="contactformModalLabel"> 764 <div class="modal-dialog modal-sm" role="document"> 765 <div class="modal-content"> 766 <div class="modal-body"></div> 767 </div> 768 </div> 769 </div> 770 771 @* Scripts placed at the end of the page to make it load faster *@ 772 @RenderSnippet("BottomJs") 773 @RenderSnippet("ParagraphJs") 774 @RenderSnippet("GoogleAnalytics") 775 @RenderSnippet("CookieNotice") 776 777 @{ 778 var backendUser = Dynamicweb.Modules.UserManagement.User.get_Current(Dynamicweb.Modules.UserManagement.PagePermissionLevels.Backend); 779 } 780 @if (backendUser != null) { 781 <div class="page-edit" style="position: fixed; bottom: 10px; right: 10px; z-index: 100"> 782 <div class="btn-group dropup"> 783 <button type="button" class="btn btn-default">@Translate("Page actions")</button> 784 <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> 785 <span class="caret"></span> 786 </button> 787 <ul class="dropdown-menu pull-right"> 788 @if (Pageview.Page.Item == null) { 789 <li><a target="backend" href="/Admin/Content/PageEdit.aspx?ID=@Pageview.Page.ID">@Translate("Edit page properties")</a></li> 790 <li><a target="backend" href="/Admin/Content/ParagraphList.aspx?PageID=@Pageview.Page.ID">@Translate("Edit paragraphs")</a></li> 791 } else { 792 <li><a target="backend" href="/Admin/Content/Items/Editing/ItemEdit.aspx?PageID=@Pageview.Page.ID">@Translate("Edit page")</a></li> 793 <li><a target="backend" href="/Admin/Content/ParagraphList.aspx?PageID=@Pageview.Page.ID&amp;mode=viewParagraphs">@Translate("Edit paragraphs")</a></li> 794 <li><a target="backend" href="/Admin/Content/PageEdit.aspx?ID=@Pageview.Page.ID">@Translate("Edit page properties")</a></li> 795 } 796 </ul> 797 </div> 798 </div> 799 } 800 </body> 801 </html> 802 803 @SnippetStart("BottomJs") 804 @{ 805 var bottomJs_DesignBaseUrl = GetString("Template:DesignBaseUrl"); 806 var bottomJs_AssetsBaseUrl = bottomJs_DesignBaseUrl + "assets/"; 807 var bottomJs_LongLang = GetString("LongLang"); 808 809 if (GetBoolean("Item.Area.CookieEnabled")) { 810 AddJsFile("https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.4/cookieconsent.min.js"); 811 } 812 813 AddJsFile( 814 bottomJs_AssetsBaseUrl + "formvalidation/js/formValidation.min.js", 815 bottomJs_AssetsBaseUrl + "formvalidation/js/framework/bootstrap.min.js", 816 bottomJs_AssetsBaseUrl + "formvalidation/js/language/" + bottomJs_LongLang.Replace("-", "_").Replace("GB", "US") + ".js", 817 818 bottomJs_DesignBaseUrl + "js/script.js" 819 ); 820 821 var listBottomJs = LoadContextItem<List<string>>("SB.JsFiles"); 822 } 823 <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script> 824 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script> 825 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script> 826 <script src="https://cdnjs.cloudflare.com/ajax/libs/slidebars/2.0.2/slidebars.min.js"></script> 827 828 @if (!true) { 829 var listBottomJsObj = listBottomJs.Select(o => new { 830 Path = o, 831 IsCDN = o.StartsWith("http", StringComparison.OrdinalIgnoreCase) || o.StartsWith("//") 832 }).ToList(); 833 834 foreach (var js in listBottomJsObj.Where(o => o.IsCDN)) { 835 <script src="@(js.Path)"></script> 836 } 837 838 var bottomJses = string.Join(",", listBottomJsObj.Where(o => !o.IsCDN).Select(o => o.Path)); 839 <script src="/Admin/Public/ControlResourcesHandler.ashx?OutputType=js&amp;Files=@(bottomJses)"></script> 840 } else { 841 foreach (var js in listBottomJs) { 842 <script src="@(js)"></script> 843 } 844 } 845 @SnippetEnd("BottomJs") 846 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 847 @using Dynamicweb.Rendering 848 849 @SnippetStart("ContactForm") 850 @{ 851 int currentAreaId = Pageview.AreaID; 852 853 var contactForm_FormCH1_h = Dynamicweb.Base.MD5HashToString(HttpContext.Current.Session.SessionID + "dwdotnetsecret"); 854 855 var contactForm_FormCH1_s = Dynamicweb.Base.MD5HashToString(HttpContext.Current.Session.SessionID); 856 var contactForm_FormCH1_i = Dynamicweb.Base.MD5HashToString(HttpContext.Current.Request.ServerVariables["REMOTE_HOST"]); 857 858 859 } 860 @if(currentAreaId == 2) { 861 var contactForm_PageId = 403; 862 var contactForm_ParagraphId = 440; 863 var contactForm_Id = 6; 864 var contactForm_FormCH1_f = Dynamicweb.Base.MD5HashToString(contactForm_Id + "dwdotnetsecret"); 865 866 var contactForm_T_Firmanavn = Translate("Company name"); 867 var contactForm_T_Email = Translate("E-mail"); 868 var contactForm_T_Tlf = Translate("Tel"); 869 var contactForm_T_Kontaktperson = Translate("Contact name"); 870 871 var contactForm_T_Certificering = Translate("Certificering"); 872 var contactForm_T_InspektionOgVejledning = Translate("Inspektion og vejledning"); 873 var contactForm_T_Inspektion = Translate("Inspektion"); 874 var contactForm_T_Vejledning = Translate("Testing"); 875 var contactForm_T_TraeningOgKurser = Translate("Traening og kurser"); 876 var contactForm_T_Andet = Translate("Andet"); 877 878 <div class="contactform-block"> 879 <div class="container"> 880 <div class="row"> 881 <div class="col-md-offset-2 col-md-8"> 882 <form method="post" enctype="multipart/form-data" data-fv-live="enabled" data-fv-framework="bootstrap" data-fv-icon-required="fa fa-asterisk" data-fv-icon-valid="fa fa-check" data-fv-icon-invalid="fa fa-times" data-fv-icon-validating="fa fa-refresh"> 883 <div class="row"> 884 885 886 <div class="col-sm-6"> 887 <div class="form-group"> 888 <label class="control-label hidden-xs hidden-sm" for="cf_email">@(contactForm_T_Email)</label> 889 <input type="text" class="form-control input-sm" id="cf_email" name="cf_email" placeholder="@(contactForm_T_Email)" data-fv-notempty="true" data-fv-emailaddress="true"> 890 </div> 891 </div> 892 893 <div class="col-sm-6"> 894 <div class="form-group"> 895 <label class="control-label hidden-xs hidden-sm" for="cf_companyname">@(contactForm_T_Firmanavn)</label> 896 <input type="text" class="form-control input-sm" id="cf_companyname" name="cf_companyname" placeholder="@(contactForm_T_Firmanavn)" data-fv-notempty="true"> 897 </div> 898 </div> 899 900 <div class="col-sm-6"> 901 <div class="form-group"> 902 <label class="control-label hidden-xs hidden-sm" for="cf_phone">@(contactForm_T_Tlf)</label> 903 <input type="text" class="form-control input-sm" id="cf_phone" name="cf_phone" placeholder="@(contactForm_T_Tlf)" data-fv-notempty="true"> 904 </div> 905 </div> 906 907 <div class="col-sm-6"> 908 <div class="form-group"> 909 <label class="control-label hidden-xs hidden-sm" for="cf_contact">@(contactForm_T_Kontaktperson)</label> 910 <input type="text" class="form-control input-sm" id="cf_contact" name="cf_contact" placeholder="@(contactForm_T_Kontaktperson)" data-fv-notempty="true"> 911 </div> 912 </div> 913 914 <div class="col-sm-6"> 915 <div class="form-group"> 916 <label class="control-label">Please specify your inquiry</label> 917 <div> 918 919 @*<div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 920 <label class="checkbox-inline"> 921 <input type="checkbox" id="cf_interested_inspektionogvejledning" name="cf_interesteds" value="@(contactForm_T_InspektionOgVejledning)"> @(contactForm_T_InspektionOgVejledning) 922 </label> 923 </div>*@ 924 925 <div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 926 <label class="checkbox-inline"> 927 <input type="checkbox" id="cf_interested_inspektion" name="cf_interesteds" value="@(contactForm_T_Inspektion)"> @(contactForm_T_Inspektion) 928 </label> 929 </div> 930 <div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 931 <label class="checkbox-inline"> 932 <input type="checkbox" id="cf_interested_certificering" name="cf_interesteds" value="@(contactForm_T_Certificering)"> @(contactForm_T_Certificering) 933 </label> 934 </div> 935 936 937 <div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 938 <label class="checkbox-inline"> 939 <input type="checkbox" id="cf_interested_vejledning" name="cf_interesteds" value="@(contactForm_T_Vejledning)"> @(contactForm_T_Vejledning) 940 </label> 941 </div> 942 943 @*<div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 944 <label class="checkbox-inline"> 945 <input type="checkbox" id="cf_interested_traeningogkurser" name="cf_interesteds" value="@(contactForm_T_TraeningOgKurser)"> @(contactForm_T_TraeningOgKurser) 946 </label> 947 </div> 948 <div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 949 <label class="checkbox-inline"> 950 <input type="checkbox" id="cf_interested_andet" name="cf_interesteds" value="@(contactForm_T_Andet)" onclick="cf_interested_andet_toggle()"> @(contactForm_T_Andet) 951 </label> 952 </div>*@ 953 </div> 954 </div> 955 956 <div class="cf-interested-andet-text-wrapper hidden"> 957 <div class="form-group"> 958 <textarea class="form-control input-sm" id="cf_interested_andet_text" name="cf_interested_andet_text" rows="3" placeholder="@(contactForm_T_Andet)"></textarea> 959 </div> 960 </div> 961 </div> 962 963 <div class="col-sm-6"> 964 <div class="hidden-sm hidden-md hidden-lg"> 965 <hr> 966 </div> 967 <div class="form-group"> 968 <div> 969 <label class="checkbox-inline"> 970 <input type="checkbox" id="cf_callme" name="cf_callme" value="1"> @(Translate("Ring mig op")) 971 </label> 972 @*<label class="checkbox-inline"> 973 <input type="checkbox" id="cf_sendbrochures" name="cf_sendbrochures" value="1"> @(Translate("Send brochuremateriale")) 974 </label>*@ 975 </div> 976 </div> 977 <button type="submit" class="btn btn-monza btn-sm">@(Translate("Send"))</button> 978 </div> 979 </div> 980 </form> 981 </div> 982 </div> 983 </div> 984 </div> 985 986 <script type="text/javascript"> 987 function cf_interested_andet_toggle() { 988 var $andet = $('#cf_interested_andet'); 989 var controller = window['slidebars-controller']; 990 991 if ($andet.prop('checked')) { 992 $('.cf-interested-andet-text-wrapper').removeClass('hidden'); 993 } else { 994 $('.cf-interested-andet-text-wrapper').addClass('hidden'); 995 } 996 997 controller && controller.css(); 998 } 999 1000 $(function() { 1001 var $form = $('form', '.contactform-block'); 1002 var controller = window['slidebars-controller']; 1003 1004 function onPreValidate(evt) { 1005 var $target = $(evt.target); 1006 } 1007 1008 function onError(evt) { 1009 controller && controller.css(); 1010 1011 var $target = $(evt.target); 1012 var fv = $target.data('formValidation'); 1013 1014 if (fv.getSubmitButton()) { 1015 fv.disableSubmitButtons(false); 1016 } 1017 } 1018 1019 function onSuccess(evt) { 1020 controller && controller.css(); 1021 1022 evt.preventDefault(); 1023 1024 var $target = $(evt.target); 1025 var fv = $target.data('formValidation'); 1026 1027 var postdata = { 1028 ID : '@(contactForm_PageId)', 1029 FormPID : '@(contactForm_ParagraphId)', 1030 FormID : '@(contactForm_Id)', 1031 SubmitForm : 'true', 1032 _sys_to_email : 'bot@dynamicweb.com', 1033 1034 FormCH1_h : '', 1035 FormCH1_f : '@(contactForm_FormCH1_f)', 1036 FormCH1_s : '@(contactForm_FormCH1_s)', 1037 FormCH1_i : '@(contactForm_FormCH1_i)', 1038 1039 inspection_contact_date : '@(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"))', 1040 inspection_contact_name : '', 1041 inspection_contact_email : '', 1042 inspection_contact_tel : '', 1043 inspection_contact_contact : '', 1044 inspection_contact_inquiry : '', 1045 inspection_contact_call : '' 1046 }; 1047 1048 postdata.FormCH1_h = '@(contactForm_FormCH1_h)'; 1049 postdata._sys_to_email = ''; 1050 1051 postdata.inspection_contact_name = $.trim($('input[name="cf_companyname"]', $form).val()); 1052 postdata.inspection_contact_email = $.trim($('input[name="cf_email"]', $form).val()); 1053 postdata.inspection_contact_tel = $.trim($('input[name="cf_phone"]', $form).val()); 1054 postdata.inspection_contact_contact = $.trim($('input[name="cf_contact"]', $form).val()); 1055 postdata.inspection_contact_inquiry = $('input[name="cf_interesteds"]:checked', $form).map(function() { 1056 var $this = $(this); 1057 var value = $.trim($this.val()); 1058 1059 if (value == '@(contactForm_T_Andet)') { 1060 var andettext = $.trim($('textarea[name="cf_interested_andet_text"]', $form).val()); 1061 1062 if (andettext != '') { 1063 return value + ': ' + andettext; 1064 } 1065 } 1066 1067 return value; 1068 }).get().join(', '); 1069 console.log(postdata); 1070 1071 postdata.inspection_contact_call = $('input[name="cf_callme"]', $form).prop('checked') ? 'Ja' : 'Nej'; 1072 //postdata.Form_Kontakt_Send_brochuremateriale = $('input[name="cf_sendbrochures"]', $form).prop('checked') ? 'Ja' : 'Nej'; 1073 1074 $('input[type="text"], input[type="checkbox"], textarea', $form).prop('disabled', true); 1075 1076 var $modal = $('#contactformModal'); 1077 1078 $modal.on('show.bs.modal', function (e) { 1079 $('.modal-body', $modal).html('<h3>@(Translate("Vent venligst..."))</h3>'); 1080 $('.modal-footer', $modal).remove(); 1081 }); 1082 1083 $modal.modal({ keyboard: false, backdrop: 'static' }); 1084 1085 $.ajax({ 1086 type : 'POST', 1087 url : '/Default.aspx?ID=' + postdata.ID, 1088 data : postdata, 1089 success : function(data) { 1090 $('.modal-body', $modal).html('<h3>@(Translate("Beskeden er sendt!"))</h3>@(Translate("Tak for din henvendelse."))'); 1091 $('.modal-content', $modal).append( 1092 '<div class="modal-footer">' + 1093 '<button type="button" class="btn btn-monza" data-dismiss="modal">@(Translate("Luk"))</button>' + 1094 '</div>' 1095 ); 1096 1097 $('input[type="text"], input[type="checkbox"], textarea', $form).prop('disabled', false); 1098 $('input[type="text"], textarea', $form).val(''); 1099 $('input[type="checkbox"]', $form).prop('checked', false); 1100 1101 cf_interested_andet_toggle(); 1102 1103 $form.data('formValidation').resetForm(); 1104 } 1105 }); 1106 } 1107 1108 $form 1109 .formValidation({ 1110 locale : 'en_US', 1111 onPreValidate : onPreValidate, 1112 onError : onError, 1113 onSuccess : onSuccess 1114 }) 1115 .on('err.field.fv', function(e, data) { 1116 data.element.data('fv.icon').hide(); 1117 data.fv.disableSubmitButtons(false); 1118 1119 controller && controller.css(); 1120 }) 1121 .on('success.field.fv', function(e, data) { 1122 var $parent = data.element.parents('.form-group'); 1123 $parent.removeClass('has-success'); 1124 data.element.data('fv.icon').hide(); 1125 1126 data.fv.disableSubmitButtons(false); 1127 1128 controller && controller.css(); 1129 }); 1130 }); 1131 </script> 1132 } else { 1133 var contactForm_PageId = 41; 1134 var contactForm_ParagraphId = 43; 1135 if(currentAreaId == 3) 1136 { 1137 contactForm_PageId = 342; 1138 contactForm_ParagraphId = 368; 1139 } 1140 var contactForm_Id = 1; 1141 var contactForm_FormCH1_f = Dynamicweb.Base.MD5HashToString(contactForm_Id + "dwdotnetsecret"); 1142 1143 var contactForm_T_Firmanavn = Translate("Firmanavn"); 1144 var contactForm_T_Email = Translate("E-mail"); 1145 var contactForm_T_Tlf = Translate("Tlf."); 1146 var contactForm_T_Kontaktperson = Translate("Kontaktperson"); 1147 var contactForm_T_Certificering = Translate("Certificering"); 1148 var contactForm_T_InspektionOgVejledning = Translate("Inspektion og vejledning"); 1149 var contactForm_T_Inspektion = Translate("Inspektion"); 1150 var contactForm_T_Vejledning = Translate("Vejledning"); 1151 var contactForm_T_TraeningOgKurser = Translate("Traening og kurser"); 1152 var contactForm_T_Andet = Translate("Andet"); 1153 <div class="contactform-block"> 1154 <div class="container"> 1155 <div class="row"> 1156 <div class="col-md-offset-2 col-md-8"> 1157 <form method="post" enctype="multipart/form-data" data-fv-live="enabled" data-fv-framework="bootstrap" data-fv-icon-required="fa fa-asterisk" data-fv-icon-valid="fa fa-check" data-fv-icon-invalid="fa fa-times" data-fv-icon-validating="fa fa-refresh"> 1158 <div class="row"> 1159 <div class="col-sm-6"> 1160 <div class="form-group"> 1161 <label class="control-label hidden-xs hidden-sm" for="cf_companyname">@(contactForm_T_Firmanavn)</label> 1162 <input type="text" class="form-control input-sm" id="cf_companyname" name="cf_companyname" placeholder="@(contactForm_T_Firmanavn)" data-fv-notempty="true"> 1163 </div> 1164 </div> 1165 1166 <div class="col-sm-6"> 1167 <div class="form-group"> 1168 <label class="control-label hidden-xs hidden-sm" for="cf_email">@(contactForm_T_Email)</label> 1169 <input type="text" class="form-control input-sm" id="cf_email" name="cf_email" placeholder="@(contactForm_T_Email)" data-fv-notempty="true" data-fv-emailaddress="true"> 1170 </div> 1171 </div> 1172 1173 <div class="col-sm-6"> 1174 <div class="form-group"> 1175 <label class="control-label hidden-xs hidden-sm" for="cf_phone">@(contactForm_T_Tlf)</label> 1176 <input type="text" class="form-control input-sm" id="cf_phone" name="cf_phone" placeholder="@(contactForm_T_Tlf)" data-fv-notempty="true"> 1177 </div> 1178 </div> 1179 1180 <div class="col-sm-6"> 1181 <div class="form-group"> 1182 <label class="control-label hidden-xs hidden-sm" for="cf_contact">@(contactForm_T_Kontaktperson)</label> 1183 <input type="text" class="form-control input-sm" id="cf_contact" name="cf_contact" placeholder="@(contactForm_T_Kontaktperson)" data-fv-notempty="true"> 1184 </div> 1185 </div> 1186 1187 <div class="col-sm-6"> 1188 <div class="form-group"> 1189 <label class="control-label">@(Translate("Hvad er du interesseret i?"))</label> 1190 <div> 1191 1192 @*<div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 1193 <label class="checkbox-inline"> 1194 <input type="checkbox" id="cf_interested_inspektionogvejledning" name="cf_interesteds" value="@(contactForm_T_InspektionOgVejledning)"> @(contactForm_T_InspektionOgVejledning) 1195 </label> 1196 </div>*@ 1197 <div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 1198 <label class="checkbox-inline"> 1199 <input type="checkbox" id="cf_interested_certificering" name="cf_interesteds" value="@(contactForm_T_Certificering)"> @(contactForm_T_Certificering) 1200 </label> 1201 </div> 1202 <div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 1203 <label class="checkbox-inline"> 1204 <input type="checkbox" id="cf_interested_inspektion" name="cf_interesteds" value="@(contactForm_T_Inspektion)"> @(contactForm_T_Inspektion) 1205 </label> 1206 </div> 1207 1208 1209 1210 <div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 1211 <label class="checkbox-inline"> 1212 <input type="checkbox" id="cf_interested_vejledning" name="cf_interesteds" value="@(contactForm_T_Vejledning)"> @(contactForm_T_Vejledning) 1213 </label> 1214 </div> 1215 1216 @*<div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 1217 <label class="checkbox-inline"> 1218 <input type="checkbox" id="cf_interested_traeningogkurser" name="cf_interesteds" value="@(contactForm_T_TraeningOgKurser)"> @(contactForm_T_TraeningOgKurser) 1219 </label> 1220 </div> 1221 <div class="visible-xs-inline-block visible-sm-inline-block visible-md-block visible-lg-block"> 1222 <label class="checkbox-inline"> 1223 <input type="checkbox" id="cf_interested_andet" name="cf_interesteds" value="@(contactForm_T_Andet)" onclick="cf_interested_andet_toggle()"> @(contactForm_T_Andet) 1224 </label> 1225 </div>*@ 1226 </div> 1227 </div> 1228 1229 <div class="cf-interested-andet-text-wrapper hidden"> 1230 <div class="form-group"> 1231 <textarea class="form-control input-sm" id="cf_interested_andet_text" name="cf_interested_andet_text" rows="3" placeholder="@(contactForm_T_Andet)"></textarea> 1232 </div> 1233 </div> 1234 </div> 1235 1236 <div class="col-sm-6"> 1237 <div class="hidden-sm hidden-md hidden-lg"> 1238 <hr> 1239 </div> 1240 <div class="form-group"> 1241 <div> 1242 <label class="checkbox-inline"> 1243 <input type="checkbox" id="cf_callme" name="cf_callme" value="1"> @(Translate("Ring mig op")) 1244 </label> 1245 @* 1246 <label class="checkbox-inline"> 1247 <input type="checkbox" id="cf_sendbrochures" name="cf_sendbrochures" value="1"> @(Translate("Send brochuremateriale")) 1248 </label> *@ 1249 </div> 1250 </div> 1251 1252 <button type="submit" class="btn btn-monza btn-sm">@(Translate("Send"))</button> 1253 </div> 1254 </div> 1255 </form> 1256 </div> 1257 </div> 1258 </div> 1259 </div> 1260 1261 <script type="text/javascript"> 1262 console.log('la: ' + navigator.language); 1263 function cf_interested_andet_toggle() { 1264 var $andet = $('#cf_interested_andet'); 1265 var controller = window['slidebars-controller']; 1266 1267 if ($andet.prop('checked')) { 1268 $('.cf-interested-andet-text-wrapper').removeClass('hidden'); 1269 } else { 1270 $('.cf-interested-andet-text-wrapper').addClass('hidden'); 1271 } 1272 1273 controller && controller.css(); 1274 } 1275 1276 $(function() { 1277 var $form = $('form', '.contactform-block'); 1278 var controller = window['slidebars-controller']; 1279 1280 function onPreValidate(evt) { 1281 console.log('prevalidate'); 1282 var $target = $(evt.target); 1283 } 1284 1285 function onError(evt) { 1286 console.log('prevalidate'); 1287 controller && controller.css(); 1288 1289 var $target = $(evt.target); 1290 var fv = $target.data('formValidation'); 1291 1292 if (fv.getSubmitButton()) { 1293 fv.disableSubmitButtons(false); 1294 } 1295 } 1296 1297 function onSuccess(evt) { 1298 console.log('succes!'); 1299 controller && controller.css(); 1300 1301 evt.preventDefault(); 1302 1303 var $target = $(evt.target); 1304 var fv = $target.data('formValidation'); 1305 1306 var postdata = { 1307 ID : '@(contactForm_PageId)', 1308 FormPID : '@(contactForm_ParagraphId)', 1309 FormID : '@(contactForm_Id)', 1310 SubmitForm : 'true', 1311 _sys_to_email : 'bot@dynamicweb.com', 1312 1313 FormCH1_h : '', 1314 FormCH1_f : '@(contactForm_FormCH1_f)', 1315 FormCH1_s : '@(contactForm_FormCH1_s)', 1316 FormCH1_i : '@(contactForm_FormCH1_i)', 1317 1318 Form_Kontakt__Dato : '@(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"))', 1319 Form_Kontakt_Firmanavn : '', 1320 Form_Kontakt_Email : '', 1321 Form_Kontakt_Tlf : '', 1322 Form_Kontakt_Kontaktperson : '', 1323 Form_Kontakt_Hvad_er_du_interesseret_i : '', 1324 Form_Kontakt_Ring_mig_op : '', 1325 Form_Kontakt_Send_brochuremateriale : '' 1326 }; 1327 1328 postdata.FormCH1_h = '@(contactForm_FormCH1_h)'; 1329 postdata._sys_to_email = ''; 1330 1331 postdata.Form_Kontakt_Firmanavn = $.trim($('input[name="cf_companyname"]', $form).val()); 1332 postdata.Form_Kontakt_Email = $.trim($('input[name="cf_email"]', $form).val()); 1333 postdata.Form_Kontakt_Tlf = $.trim($('input[name="cf_phone"]', $form).val()); 1334 postdata.Form_Kontakt_Kontaktperson = $.trim($('input[name="cf_contact"]', $form).val()); 1335 postdata.Form_Kontakt_Hvad_er_du_interesseret_i = $('input[name="cf_interesteds"]:checked', $form).map(function() { 1336 var $this = $(this); 1337 var value = $.trim($this.val()); 1338 1339 if (value == '@(contactForm_T_Andet)') { 1340 var andettext = $.trim($('textarea[name="cf_interested_andet_text"]', $form).val()); 1341 1342 if (andettext != '') { 1343 return value + ': ' + andettext; 1344 } 1345 } 1346 1347 return value; 1348 }).get().join(', '); 1349 1350 postdata.Form_Kontakt_Ring_mig_op = $('input[name="cf_callme"]', $form).prop('checked') ? 'Ja' : 'Nej'; 1351 postdata.Form_Kontakt_Send_brochuremateriale = $('input[name="cf_sendbrochures"]', $form).prop('checked') ? 'Ja' : 'Nej'; 1352 1353 $('input[type="text"], input[type="checkbox"], textarea', $form).prop('disabled', true); 1354 1355 var $modal = $('#contactformModal'); 1356 1357 $modal.on('show.bs.modal', function (e) { 1358 $('.modal-body', $modal).html('<h3>@(Translate("Vent venligst..."))</h3>'); 1359 $('.modal-footer', $modal).remove(); 1360 }); 1361 1362 $modal.modal({ keyboard: false, backdrop: 'static' }); 1363 1364 $.ajax({ 1365 type : 'POST', 1366 url : '/Default.aspx?ID=' + postdata.ID, 1367 data : postdata, 1368 success : function(data) { 1369 $('.modal-body', $modal).html('<h3>@(Translate("Beskeden er sendt!"))</h3>@(Translate("Tak for din henvendelse."))'); 1370 $('.modal-content', $modal).append( 1371 '<div class="modal-footer">' + 1372 '<button type="button" class="btn btn-monza" data-dismiss="modal">@(Translate("Luk"))</button>' + 1373 '</div>' 1374 ); 1375 1376 $('input[type="text"], input[type="checkbox"], textarea', $form).prop('disabled', false); 1377 $('input[type="text"], textarea', $form).val(''); 1378 $('input[type="checkbox"]', $form).prop('checked', false); 1379 1380 cf_interested_andet_toggle(); 1381 1382 $form.data('formValidation').resetForm(); 1383 } 1384 }); 1385 } 1386 1387 $form 1388 .formValidation({ 1389 locale : 'en_DK', 1390 onPreValidate : onPreValidate, 1391 onError : onError, 1392 onSuccess : onSuccess 1393 }) 1394 .on('err.field.fv', function(e, data) { 1395 data.element.data('fv.icon').hide(); 1396 data.fv.disableSubmitButtons(false); 1397 1398 controller && controller.css(); 1399 }) 1400 .on('success.field.fv', function(e, data) { 1401 var $parent = data.element.parents('.form-group'); 1402 $parent.removeClass('has-success'); 1403 data.element.data('fv.icon').hide(); 1404 1405 data.fv.disableSubmitButtons(false); 1406 1407 controller && controller.css(); 1408 }); 1409 }); 1410 </script> 1411 } 1412 1413 @SnippetEnd("ContactForm") 1414 @SnippetStart("CookieNotice") 1415 @if (GetBoolean("Item.Area.CookieEnabled")) { 1416 <script type="text/javascript"> 1417 (function(window) { 1418 window.cookieconsent.initialise({ 1419 palette: { 1420 popup: { 1421 background : '#000000', 1422 text : '#ffffff' 1423 }, 1424 button: { 1425 background : '#da022a', 1426 text : '#ffffff' 1427 } 1428 }, 1429 1430 elements: { 1431 header : '<span class="cc-header">{{header}}</span>&nbsp;', 1432 message : '<span id="cookieconsent:desc" class="cc-message">{{message}}</span>', 1433 messagelink : '<span id="cookieconsent:desc" class="cc-message">{{message}} <a aria-label="learn more about cookies" role="button" tabindex="0" class="cc-link" href="{{href}}">{{link}}</a></span>', 1434 dismiss : '<a aria-label="dismiss cookie message" role="button" tabindex="0" class="cc-btn cc-dismiss">{{dismiss}}</a>', 1435 allow : '<a aria-label="allow cookies" role="button" tabindex="0" class="cc-btn cc-allow">{{allow}}</a>', 1436 deny : '<a aria-label="deny cookies" role="button" tabindex="0" class="cc-btn cc-deny">{{deny}}</a>', 1437 link : '<a aria-label="learn more about cookies" role="button" tabindex="0" class="cc-link" href="{{href}}">{{link}}</a>', 1438 close : '<span aria-label="dismiss cookie message" role="button" tabindex="0" class="cc-close">{{close}}</span>' 1439 }, 1440 1441 content: { 1442 message : '@(GetString("Item.Area.CookieMassage").Replace("'", "\'"))', 1443 dismiss : '@(GetString("Item.Area.CookieDismissText").Replace("'", "\'"))', 1444 link : '@(GetString("Item.Area.CookieReadMoreText").Replace("'", "\'"))', 1445 href : '/@(GetString("Item.Area.CookieReadMoreLink").Replace("'", "\'"))' 1446 }, 1447 1448 position: 'top' 1449 }); 1450 })(window); 1451 </script> 1452 } 1453 @SnippetEnd("CookieNotice") 1454 @SnippetStart("Css") 1455 @{ 1456 var css_DesignBaseUrl = GetString("Template:DesignBaseUrl"); 1457 var css_AssetsBaseUrl = css_DesignBaseUrl + "assets/"; 1458 1459 if (GetBoolean("Item.Area.CookieEnabled")) { 1460 AddCssFile("https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.4/cookieconsent.min.css"); 1461 } 1462 1463 AddCssFile( 1464 css_AssetsBaseUrl + "formvalidation/css/formValidation.min.css", 1465 css_DesignBaseUrl + "css/style.min.css?v=2016-11-30T09:02" 1466 ); 1467 1468 var listCss = LoadContextItem<List<string>>("SB.CssFiles"); 1469 } 1470 <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"> 1471 <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> 1472 <link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css" rel="stylesheet"> 1473 <link href="https://cdnjs.cloudflare.com/ajax/libs/slidebars/2.0.2/slidebars.min.css" rel="stylesheet"> 1474 @if (!true) { 1475 var listCssObj = listCss.Select(o => new { 1476 Path = o, 1477 IsCDN = o.StartsWith("http", StringComparison.OrdinalIgnoreCase) || o.StartsWith("//") 1478 }).ToList(); 1479 1480 foreach (var css in listCssObj.Where(o => o.IsCDN)) { 1481 <link href="@(css.Path)" rel="stylesheet"> 1482 } 1483 1484 var csses = string.Join(",", listCssObj.Where(o => !o.IsCDN).Select(o => o.Path)); 1485 <link href="/Admin/Public/ControlResourcesHandler.ashx?OutputType=css&amp;Files=@(csses)" rel="stylesheet"> 1486 } else { 1487 foreach (var css in listCss) { 1488 <link href="@(css)" rel="stylesheet"> 1489 } 1490 } 1491 @SnippetEnd("Css") 1492 @SnippetStart("Footer") 1493 @using System.Text.RegularExpressions 1494 @{ 1495 var footer_LockArea = new int[] { 1, 2 }; 1496 var footer_AreaFirstPage = GetInteger("DwAreaFirstPageID"); 1497 var footer_DesignBaseUrl = GetString("Template:DesignBaseUrl"); 1498 var footer_AssetsBaseUrl = footer_DesignBaseUrl + "assets/"; 1499 1500 var footer_Logos = new List<dynamic>(); 1501 var footer_TermsId = GetString("Item.Area.Page_Terms"); 1502 var footer_PageLogin = GetString("Item.Area.Page_Login"); 1503 var footer_TermsText = string.Empty; 1504 string footerLogo = GetString("Item.Area.Company_logo"); 1505 var footerAreaId = GetInteger("DwAreaID"); 1506 var footer_BaseArea = Pageview.AreaCollection.ContainsKey(2) ? (Dynamicweb.Frontend.Area)Pageview.AreaCollection[2] : null; 1507 1508 if (!footer_LockArea.Contains(Pageview.AreaID)) { 1509 var footer_BaseFooterLogosId = footer_BaseArea != null && footer_BaseArea.Item.ContainsKey("FooterLogos") ? (int)footer_BaseArea.Item["FooterLogos"] : 0; 1510 var footer_BaseFooterLogosItems = Dynamicweb.Content.Items.ItemList.GetItemListById(footer_BaseFooterLogosId); 1511 var footer_BaseFooterLogos = footer_BaseFooterLogosItems != null && footer_BaseFooterLogosItems.Relations != null ? footer_BaseFooterLogosItems.Relations.Select(o => { 1512 var x = new Dynamicweb.Content.Items.Item(o); 1513 1514 return new { 1515 Logo = (string)x["Logo"], 1516 LogoHover = (string)x["LogoHover"], 1517 Link = (string)x["Link"], 1518 Target = (string)x["Target"] 1519 }; 1520 }).ToList() : null; 1521 1522 if (footer_BaseFooterLogos != null) { 1523 footer_Logos.AddRange(footer_BaseFooterLogos); 1524 } 1525 } 1526 1527 footer_Logos.AddRange( 1528 GetLoop("Item.Area.FooterLogos") 1529 .Select(o => new { 1530 Logo = o.GetString("Item.Area.FooterLogos.Logo"), 1531 LogoHover = o.GetString("Item.Area.FooterLogos.LogoHover"), 1532 Link = o.GetString("Item.Area.FooterLogos.Link"), 1533 Target = o.GetString("Item.Area.FooterLogos.Target") 1534 }) 1535 .Where(o => !footer_Logos.Any(x => x.Logo == o.Logo)) 1536 ); 1537 1538 if (string.IsNullOrWhiteSpace(footer_TermsId) && GetInteger("DwAreaID") != 1) { 1539 footer_TermsId = footer_BaseArea != null && footer_BaseArea.Item.ContainsKey("Page_Terms") ? (string)footer_BaseArea.Item["Page_Terms"] : string.Empty; 1540 } 1541 1542 if (!string.IsNullOrWhiteSpace(footer_TermsId)) { 1543 footer_TermsText = (string)((Dynamicweb.Frontend.Page)Pageview.PageCollection[int.Parse(footer_TermsId)]).Values["pagemenutext"]; 1544 } 1545 1546 var footer_Addresses = GetLoop("Item.Area.FooterAddresses"); 1547 string aaaCreditRatingImgPath = "/Admin/Public/GetImage.ashx?Image=/Files/Images/footer-logos/AAA_464x595px.jpg&Width=130&format=jpg"; 1548 } 1549 <div class="footer"> 1550 <div class="footer-block"> 1551 <div class="footer-logos"> 1552 <div class="fg-container"> 1553 <div class="fg-row"> 1554 @foreach (var item in footer_Logos) { 1555 if (string.IsNullOrWhiteSpace(item.LogoHover) && string.IsNullOrWhiteSpace(item.Logo)) { 1556 continue; 1557 } 1558 1559 var link = item.Link; 1560 1561 if (string.IsNullOrWhiteSpace(link)) { 1562 link = "javascript:void(0)"; 1563 } 1564 1565 <div class="fg-col-xs"> 1566 <div class="footer-logo-block"> 1567 <a href="@(link)" target="@(item.Target)"> 1568 @if (!string.IsNullOrWhiteSpace(item.LogoHover)) { 1569 <img src="@(item.LogoHover)" alt="" class="img-responsive"> 1570 } 1571 @if (!string.IsNullOrWhiteSpace(item.Logo)) { 1572 <img src="@(item.Logo)" alt="" class="img-responsive"> 1573 } 1574 </a> 1575 </div> 1576 </div> 1577 } 1578 </div> 1579 </div> 1580 </div> 1581 1582 <div class="footer-socials"> 1583 <div class="container"> 1584 @if (footerAreaId == 1) 1585 { 1586 <a href="https://www.linkedin.com/in/baltic-control-certification-bcc-57231618a/" target="_blank"> 1587 <img src="@(footer_DesignBaseUrl)img/logo-linkedin.png" alt="" class="img-responsive"> 1588 </a> 1589 <a href="https://www.facebook.com/balticcontrolcom" target="_blank"> 1590 <img src="@(footer_DesignBaseUrl)img/logo-facebook.png" alt="" class="img-responsive"> 1591 </a> 1592 } 1593 else 1594 { 1595 <a href="https://www.linkedin.com/company/baltic-control-ltd" target="_blank"> 1596 <img src="@(footer_DesignBaseUrl)img/logo-linkedin.png" alt="" class="img-responsive"> 1597 </a> 1598 <a href="https://www.facebook.com/balticcontrolcom" target="_blank"> 1599 <img src="@(footer_DesignBaseUrl)img/logo-facebook.png" alt="" class="img-responsive"> 1600 </a> 1601 } 1602 1603 1604 1605 </div> 1606 </div> 1607 </div> 1608 1609 <div class="footer-contact-block"> 1610 <div class="container"> 1611 <div class="footer-contact-logo"> 1612 @*<img src="@(footer_DesignBaseUrl)img/logo.png" alt="" class="img-responsive">*@ 1613 @if (!string.IsNullOrWhiteSpace(footerLogo)) { 1614 <img src="@footerLogo" alt="" class="img-responsive"> 1615 } else { 1616 <img src="@(footer_DesignBaseUrl)img/logo.png" alt="" class="img-responsive"> 1617 } 1618 </div> 1619 1620 <div class="footer-contact-content"> 1621 <div> 1622 @if (footerAreaId == 2) { 1623 <b>Baltic Control&reg;</b><br> 1624 } else { 1625 <b>Baltic Control&reg; Certification</b><br> 1626 } 1627 <ul class="list-unstyled"> 1628 @if (!string.IsNullOrWhiteSpace(footer_TermsId)) { 1629 <li><a href="/Default.aspx?Id=@(footer_TermsId)" target="_blank">@(footer_TermsText)</a></li> 1630 } 1631 @if (!string.IsNullOrWhiteSpace(footer_PageLogin)) { 1632 <li class="topbarnav-login"> 1633 <a href="/Default.aspx?Id=@(footer_PageLogin)" target="_blank"><i class="fa fa-lock" aria-hidden="true"></i> @(Translate("Login"))</a> 1634 </li> 1635 } 1636 </ul> 1637 <img width="130" height="79" src="@aaaCreditRatingImgPath" alt="AAA credit rating" class="img-responsive"> 1638 </div> 1639 1640 @foreach (var item in footer_Addresses) { 1641 <div> 1642 <address> 1643 <b>@(item.GetString("Item.Area.FooterAddresses.Name"))</b><br> 1644 @(item.GetString("Item.Area.FooterAddresses.Address")) 1645 </address> 1646 </div> 1647 } 1648 </div> 1649 </div> 1650 </div> 1651 </div> 1652 1653 <div class="footer-btncontact-block"> 1654 <a class="btn btn-monza" href="javascript:void(footerContactFormToggle())" onclick="this.blur()" role="button">@(Translate("Kontakt os"))</a> 1655 </div> 1656 1657 <script type="text/javascript"> 1658 function footerContactFormToggle() { 1659 var controller = window['slidebars-controller']; 1660 1661 controller && controller.toggle('contact-form'); 1662 } 1663 1664 $(function () { 1665 var $canvas = $('[canvas="container"]'); 1666 var $footer = $('.footer'); 1667 var $btn = $('.footer-btncontact-block'); 1668 1669 function getProps() { 1670 return { 1671 canvasHeight: $canvas.outerHeight(false), 1672 canvasScrollTop: $canvas.scrollTop(), 1673 canvasScrollHeight: $canvas[0].scrollHeight, 1674 1675 footerTop: $footer.position().top, 1676 footerHeight: $footer.outerHeight(true), 1677 1678 btnHeight: $btn.outerHeight(true) 1679 }; 1680 } 1681 1682 var lastScrollTop = 0; 1683 1684 function sticky() { 1685 var controller = window['slidebars-controller']; 1686 var props = getProps(); 1687 var scrollDir = props.canvasScrollTop > lastScrollTop ? 'down' : props.canvasScrollTop < lastScrollTop ? 'up' : ''; 1688 1689 var topA = (props.canvasScrollTop + props.footerTop + props.footerHeight) - props.btnHeight; 1690 var topB = (props.canvasScrollTop + props.canvasHeight) - props.btnHeight; 1691 1692 if (topA < topB || (controller && controller.isActiveSlidebar('contact-form'))) { 1693 $btn.removeClass('transition-enabled'); 1694 } else { 1695 if (scrollDir == 'down') { 1696 $btn.removeClass('transition-enabled'); 1697 } else if (scrollDir == 'up') { 1698 $btn.addClass('transition-enabled'); 1699 } 1700 } 1701 1702 $btn.css({ 1703 top: Math.min(topA, topB), 1704 bottom: 'auto' 1705 }); 1706 1707 lastScrollTop = props.canvasScrollTop; 1708 } 1709 1710 $canvas.on('scroll', sticky); 1711 $(window).on('load resize orientationchange', sticky); 1712 }); 1713 </script> 1714 @SnippetEnd("Footer") 1715 @SnippetStart("GoogleAnalytics") 1716 @{ 1717 var googleAnalytics_Code = GetString("Item.Area.Google_Analytics_Code"); 1718 } 1719 @if (!string.IsNullOrWhiteSpace(googleAnalytics_Code)) { 1720 <script type="text/javascript"> 1721 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 1722 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 1723 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 1724 })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 1725 ga('create', '@(googleAnalytics_Code)', 'auto'); 1726 ga('send', 'pageview'); 1727 </script> 1728 1729 <script type="text/javascript"> 1730 if (window.skabertrang_ga_ecommerce_callbacks && window.skabertrang_ga_ecommerce_callbacks.length) { 1731 for (var i = 0; i < window.skabertrang_ga_ecommerce_callbacks.length; i++) { 1732 window.skabertrang_ga_ecommerce_callbacks[i](); 1733 } 1734 } 1735 </script> 1736 } 1737 @SnippetEnd("GoogleAnalytics") 1738 @SnippetStart("Icons") 1739 @{ 1740 /* 1741 * http://www.favicon-generator.org 1742 */ 1743 1744 var icons_DesktopIconsFolder = GetString("Item.Area.Icons_Desktopicons_Folder"); 1745 var icons_FacebookShareIcon = GetString("Item.Area.Icons_FacebookShareIcon"); 1746 1747 if (!string.IsNullOrWhiteSpace(icons_DesktopIconsFolder) && icons_DesktopIconsFolder.EndsWith("/")) { 1748 icons_DesktopIconsFolder = icons_DesktopIconsFolder.Remove(icons_DesktopIconsFolder.Length - 1); 1749 } 1750 1751 if (icons_DesktopIconsFolder.ToUpper() == "/FILES") { 1752 icons_DesktopIconsFolder = null; 1753 } 1754 } 1755 @if (!string.IsNullOrWhiteSpace(icons_DesktopIconsFolder)) { 1756 <link rel="shortcut icon" href="@(icons_DesktopIconsFolder)/favicon.ico"> 1757 1758 <link rel="apple-touch-icon" sizes="57x57" href="@(icons_DesktopIconsFolder)/apple-icon-57x57.png"> 1759 <link rel="apple-touch-icon" sizes="60x60" href="@(icons_DesktopIconsFolder)/apple-icon-60x60.png"> 1760 <link rel="apple-touch-icon" sizes="72x72" href="@(icons_DesktopIconsFolder)/apple-icon-72x72.png"> 1761 <link rel="apple-touch-icon" sizes="76x76" href="@(icons_DesktopIconsFolder)/apple-icon-76x76.png"> 1762 <link rel="apple-touch-icon" sizes="114x114" href="@(icons_DesktopIconsFolder)/apple-icon-114x114.png"> 1763 <link rel="apple-touch-icon" sizes="120x120" href="@(icons_DesktopIconsFolder)/apple-icon-120x120.png"> 1764 <link rel="apple-touch-icon" sizes="144x144" href="@(icons_DesktopIconsFolder)/apple-icon-144x144.png"> 1765 <link rel="apple-touch-icon" sizes="152x152" href="@(icons_DesktopIconsFolder)/apple-icon-152x152.png"> 1766 <link rel="apple-touch-icon" sizes="180x180" href="@(icons_DesktopIconsFolder)/apple-icon-180x180.png"> 1767 1768 <link rel="icon" type="image/png" sizes="192x192" href="@(icons_DesktopIconsFolder)/android-icon-192x192.png"> 1769 <link rel="icon" type="image/png" sizes="32x32" href="@(icons_DesktopIconsFolder)/favicon-32x32.png"> 1770 <link rel="icon" type="image/png" sizes="96x96" href="@(icons_DesktopIconsFolder)/favicon-96x96.png"> 1771 <link rel="icon" type="image/png" sizes="16x16" href="@(icons_DesktopIconsFolder)/favicon-16x16.png"> 1772 1773 <link rel="manifest" href="@(icons_DesktopIconsFolder)/manifest.json"> 1774 1775 <meta name="msapplication-TileColor" content="#da022a"> 1776 <meta name="msapplication-TileImage" content="@(icons_DesktopIconsFolder)/ms-icon-144x144.png"> 1777 <meta name="msapplication-config" content="@(icons_DesktopIconsFolder)/browserconfig.xml"> 1778 <meta name="theme-color" content="#da022a"> 1779 } 1780 @if (!string.IsNullOrWhiteSpace(icons_FacebookShareIcon)) { 1781 <link rel="image_src" href="@(icons_FacebookShareIcon)"> 1782 } 1783 @SnippetEnd("Icons") 1784 @SnippetStart("NavBarStage") 1785 @{ 1786 var navBarStage_FirstPageID = GetInteger("DwAreaFirstPageID"); 1787 var navBarStage_DesignBaseUrl = GetString("Template:DesignBaseUrl"); 1788 var navBarStage_AssetsBaseUrl = navBarStage_DesignBaseUrl + "assets/"; 1789 1790 var navBarStage_EcomMenuType = GetString("Item.Area.Ecommerce_Menu_Type"); 1791 var navBarStage_EcomProductPage = GetString("Item.Area.Ecommerce_Product_Page"); 1792 } 1793 @helper NavBarStage_RenderItemMenu(Dictionary<string, object> page, bool dropdown, string extraClassName) { 1794 var id = (int)page["Id"]; 1795 var active = (bool)page["Active"]; 1796 var inpath = (bool)page["InPath"]; 1797 var level = (int)page["Level"]; 1798 var type = (string)page["Type"]; 1799 var menutext = (string)page["Menutext"]; 1800 var itemtype = (string)page["ItemType"]; 1801 var isfolder = (bool)page["IsFolder"]; 1802 var enabled = (bool)page["Enabled"]; 1803 var pages = (List<Dictionary<string, object>>)page["Pages"]; 1804 1805 if (!(type == "page" || type == "group")) { 1806 return; 1807 } 1808 1809 if (!enabled) { 1810 return; 1811 } 1812 1813 if (isfolder) { 1814 return; 1815 } 1816 1817 var className = string.Empty; 1818 className += active ? " active" : string.Empty; 1819 className += inpath ? " inpath" : string.Empty; 1820 className += !string.IsNullOrWhiteSpace(extraClassName) ? " " + extraClassName : string.Empty; 1821 1822 var url = "/Default.aspx?Id=" + id; 1823 url += (type == "group") ? "&amp;GroupId=" + (string)page["GroupId"] : string.Empty; 1824 1825 var ariaExpanded = inpath ? "true" : "false"; 1826 var inClass = inpath ? "in" : string.Empty; 1827 1828 <li class="@(className.Trim())" data-active="@(active ? 1 : 0)" data-inpath="@(inpath ? 1 : 0)" data-level="@(level)" data-type="@(type)" data-pageid="@(id)" data-pages="@(pages != null ? pages.Count : 0)"> 1829 @if (pages != null && dropdown) { 1830 <a href="@(url)">@(menutext)</a> 1831 <a href="#ssm-@(id)" data-toggle="collapse" role="button" aria-expanded="@(ariaExpanded)" aria-controls="ssm-@(id)"><i class="fa fa-caret-right" aria-hidden="true"></i></a> 1832 1833 <ul class="nav nav-bordered nav-stacked collapse @(inClass)" id="ssm-@(id)"> 1834 @foreach (var subpage in pages) { 1835 @NavBarStage_RenderItemMenu(subpage, false, null) 1836 } 1837 </ul> 1838 } else { 1839 <a href="@(url)">@(menutext)</a> 1840 } 1841 </li> 1842 } 1843 <ul class="nav nav-bordered nav-stacked"> 1844 @if (navBarStage_EcomMenuType == "Ecommerce" && !string.IsNullOrWhiteSpace(navBarStage_EcomProductPage)) { 1845 foreach (var page in (List<Dictionary<string, object>>)topPageviewPages.First(o => (int)o["Id"] == int.Parse(navBarStage_EcomProductPage))["Pages"]) { 1846 @NavBarStage_RenderItemMenu(page, false, null) 1847 } 1848 } else { 1849 foreach (var page in topPageviewPages) { 1850 @NavBarStage_RenderItemMenu(page, true, null) 1851 } 1852 } 1853 </ul> 1854 @SnippetEnd("NavBarStage") 1855 @SnippetStart("OpenGraph") 1856 @{ 1857 var openGraph_Domain = "http://" + Request.Url.Host; 1858 var openGraph_Url = GetString("Item.Page.OgUrl"); 1859 var openGraph_Title = GetString("Item.Page.OgTitle"); 1860 var openGraph_Type = GetString("Item.Page.OgType"); 1861 var openGraph_Description = GetString("Item.Page.OgDescription"); 1862 var openGraph_Image = GetString("Item.Page.OgImage"); 1863 } 1864 @if (!string.IsNullOrWhiteSpace(openGraph_Url)) { 1865 <meta property="og:url" content="@(openGraph_Domain)/Default.aspx?ID=@(openGraph_Url)"> 1866 } 1867 @if (!string.IsNullOrWhiteSpace(openGraph_Title)) { 1868 <meta property="og:title" content="@(openGraph_Title)"> 1869 } 1870 @if (!string.IsNullOrWhiteSpace(openGraph_Type)) { 1871 <meta property="og:type" content="@(openGraph_Type)"> 1872 } 1873 @if (!string.IsNullOrWhiteSpace(openGraph_Description)) { 1874 <meta property="og:description" content="@(openGraph_Description)"> 1875 } 1876 @if (!string.IsNullOrWhiteSpace(openGraph_Image)) { 1877 <meta property="og:image" content="@(openGraph_Domain)@(openGraph_Image)"> 1878 } 1879 @SnippetEnd("OpenGraph") 1880 @SnippetStart("SNS") 1881 <div class="sns-block"> 1882 <span>@Translate("Del siden"):</span> 1883 <div class="addthis_toolbox addthis_default_style"> 1884 <a class="addthis_button_preferred_1"></a> 1885 <a class="addthis_button_preferred_2"></a> 1886 <a class="addthis_button_preferred_3"></a> 1887 <a class="addthis_button_preferred_4"></a> 1888 <a class="addthis_button_compact"></a> 1889 <a class="addthis_counter addthis_bubble_style"></a> 1890 </div> 1891 </div> 1892 <script type="text/javascript"> 1893 var addthis_config = { data_track_addressbar: false }; 1894 </script> 1895 <script src="https://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-51c009407d4aa776"></script> 1896 @SnippetEnd("SNS") 1897 @SnippetStart("Top") 1898 @{ 1899 var top_FirstPageID = GetInteger("DwAreaFirstPageID"); 1900 var top_DesignBaseUrl = GetString("Template:DesignBaseUrl"); 1901 var top_AssetsBaseUrl = top_DesignBaseUrl + "assets/"; 1902 string companyLogo = GetString("Item.Area.Company_logo"); 1903 1904 var top_EcomMenuType = GetString("Item.Area.Ecommerce_Menu_Type"); 1905 var top_EcomProductPage = GetString("Item.Area.Ecommerce_Product_Page"); 1906 var top_FolderTopBarNav = GetString("Item.Area.Folder_TopBarNav"); 1907 1908 var top_Websites = Pageview.AreaCollection 1909 .Cast<DictionaryEntry>() 1910 .Select(o => { 1911 var area = (Dynamicweb.Frontend.Area)o.Value; 1912 1913 return new { 1914 Id = area.ID, 1915 PageId = area.Values.ContainsKey("areafirstpage") ? (int)area.Values["areafirstpage"] : 0, 1916 Culture = area.Values.ContainsKey("areaculture") ? (string)area.Values["areaculture"] : string.Empty, 1917 Sort = area.Values.ContainsKey("areasort") ? (int)area.Values["areasort"] : 0 1918 }; 1919 }) 1920 .OrderBy(o => o.Sort) 1921 .ToList(); 1922 } 1923 @helper Top_TopBarNav_RenderItemMenu(Dictionary<string, object> page) { 1924 var id = (int)page["Id"]; 1925 var active = (bool)page["Active"]; 1926 var inpath = (bool)page["InPath"]; 1927 var level = (int)page["Level"]; 1928 var type = (string)page["Type"]; 1929 var menutext = (string)page["Menutext"]; 1930 var itemtype = (string)page["ItemType"]; 1931 var isfolder = (bool)page["IsFolder"]; 1932 var enabled = (bool)page["Enabled"]; 1933 1934 if (!enabled) { 1935 return; 1936 } 1937 1938 if (isfolder) { 1939 return; 1940 } 1941 1942 var className = string.Empty; 1943 className += active ? " active" : string.Empty; 1944 className += inpath ? " inpath" : string.Empty; 1945 1946 if (id == 385) { 1947 className += "red-btn"; 1948 } 1949 1950 <li class="@(className.Trim())" data-active="@(active ? 1 : 0)" data-inpath="@(inpath ? 1 : 0)"> 1951 <a href="/Default.aspx?ID=@(id)">@(menutext)</a> 1952 </li> 1953 } 1954 @helper Top_NavBar_RenderItemMenu(Dictionary<string, object> page, bool dropdown, string extraClassName) { 1955 var id = (int)page["Id"]; 1956 var active = (bool)page["Active"]; 1957 var inpath = (bool)page["InPath"]; 1958 var level = (int)page["Level"]; 1959 var type = (string)page["Type"]; 1960 var menutext = (string)page["Menutext"]; 1961 var itemtype = (string)page["ItemType"]; 1962 var isfolder = (bool)page["IsFolder"]; 1963 var enabled = (bool)page["Enabled"]; 1964 var pages = (List<Dictionary<string, object>>)page["Pages"]; 1965 1966 if (!(type == "page" || type == "group")) { 1967 return; 1968 } 1969 1970 if (!enabled) { 1971 return; 1972 } 1973 1974 if (isfolder) { 1975 return; 1976 } 1977 1978 var className = string.Empty; 1979 className += active ? " active" : string.Empty; 1980 className += inpath ? " inpath" : string.Empty; 1981 className += pages != null && dropdown ? " dropdown" : string.Empty; 1982 className += !string.IsNullOrWhiteSpace(extraClassName) ? " " + extraClassName : string.Empty; 1983 1984 var url = "/Default.aspx?Id=" + id; 1985 url += (type == "group") ? "&amp;GroupId=" + (string)page["GroupId"] : string.Empty; 1986 1987 <li class="@(className.Trim())" data-active="@(active ? 1 : 0)" data-inpath="@(inpath ? 1 : 0)" data-level="@(level)" data-type="@(type)" data-pageid="@(id)" data-pages="@(pages != null ? pages.Count : 0)"> 1988 @if (pages != null && dropdown) { 1989 <a href="@(url)" class="dropdown-toggle" data-toggle="" role="button" aria-haspopup="true" aria-expanded="false">@(menutext)</a> 1990 <ul class="dropdown-menu"> 1991 @foreach (var subpage in pages) { 1992 @Top_NavBar_RenderItemMenu(subpage, false, null) 1993 } 1994 </ul> 1995 } else { 1996 <a href="@(url)">@(menutext)</a> 1997 } 1998 </li> 1999 } 2000 <div class="top" canvas=""> 2001 <div class="container"> 2002 <div class="topbarnav-menu"> 2003 <ul> 2004 @if (!string.IsNullOrWhiteSpace(top_FolderTopBarNav)) { 2005 foreach (var page in topPageviewPages) { 2006 var pages = (List<Dictionary<string, object>>)page["Pages"]; 2007 2008 if (top_FolderTopBarNav != ((int)page["Id"]).ToString() || pages == null) { 2009 continue; 2010 } 2011 2012 foreach (var subpage in pages) { 2013 @Top_TopBarNav_RenderItemMenu(subpage) 2014 } 2015 } 2016 } 2017 @{ 2018 int searchpageid = 11; 2019 if (Pageview.Area.ID == 2) { 2020 searchpageid = 97; 2021 } 2022 else if (Pageview.Area.ID == 3) { 2023 searchpageid = 341; 2024 } 2025 } 2026 <li class="topbarnav-search"> 2027 <a href="javascript:void(toggleSearch())"><i class="fa fa-search" aria-hidden="true"></i></a> 2028 <div class="topbarnav-search-block"> 2029 <form method="get" action="/Default.aspx" role="search"> 2030 <input type="hidden" name="ID" value="@searchpageid"> 2031 <div class="input-group input-group-sm"> 2032 <input type="text" class="form-control" name="q" placeholder='@(Translate("Search"))'> 2033 <span class="input-group-btn"> 2034 <button type="submit" class="btn btn-monza"><i class="fa fa-search"></i></button> 2035 </span> 2036 </div> 2037 </form> 2038 </div> 2039 </li> 2040 2041 @if (Pageview.AreaID == 1 || Pageview.AreaID == 3) { 2042 <li class="topbarnav-language"> 2043 @foreach (var item in top_Websites) { 2044 if (item.Id == 2 || item.Id == 4 || item.Id == 5) { 2045 continue; 2046 } 2047 if (Pageview.Area.ID == item.Id) { 2048 var flag = item.Culture.Substring(3, 2); 2049 2050 <a href="javascript:void(toggleLanguage())" style="background-image: url(/Admin/Images/Flags/Small/flag_@(flag).png);"><i class="fa fa-angle-down" aria-hidden="true"></i></a> 2051 } 2052 } 2053 </li> 2054 } 2055 </ul> 2056 2057 </div> 2058 </div> 2059 2060 <div class="navbar-wrapper"> 2061 <div class="navbar navbar-transparent" role="navigation"> 2062 <div class="container"> 2063 <div class="navbar-header"> 2064 <button type="button" class="navbar-toggle collapsed" data-toggle="sliderbar" data-target="navbar-stage" aria-expanded="false"> 2065 <span class="sr-only">Toggle navigation</span> 2066 <i class="fa fa-bars" aria-hidden="true"></i> Menu 2067 </button> 2068 2069 <a href="/Default.aspx?Id=@(top_FirstPageID)" class="navbar-brand"> 2070 @if (!string.IsNullOrWhiteSpace(companyLogo)) { 2071 <img src="@companyLogo" alt="" class="img-responsive"> 2072 } else { 2073 <img src="@(top_DesignBaseUrl)img/logo.png" alt="" class="img-responsive"> 2074 } 2075 </a> 2076 </div> 2077 2078 <div class="navbar-collapse collapse"> 2079 <ul class="nav navbar-nav navbar-right"> 2080 @if (top_EcomMenuType == "Ecommerce" && !string.IsNullOrWhiteSpace(top_EcomProductPage)) { 2081 foreach (var page in (List<Dictionary<string, object>>)topPageviewPages.First(o => (int)o["Id"] == int.Parse(top_EcomProductPage))["Pages"]) { 2082 @Top_NavBar_RenderItemMenu(page, false, null) 2083 } 2084 } else { 2085 foreach (var page in topPageviewPages) { 2086 @Top_NavBar_RenderItemMenu(page, true, null) 2087 } 2088 } 2089 </ul> 2090 </div> 2091 </div> 2092 </div> 2093 </div> 2094 </div> 2095 2096 <div id="modalLanguages" class="modal fade" tabindex="-1" role="dialog"> 2097 <div class="modal-dialog modal-sm" role="document"> 2098 <div class="modal-content"> 2099 <div class="modal-header"> 2100 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> 2101 <h4 class="modal-title">Choose language</h4> 2102 </div> 2103 <div class="modal-body text-center"> 2104 @foreach (var item in top_Websites) 2105 { 2106 if (item.Id == 2 || item.Id == 4 || item.Id == 5) 2107 { 2108 continue; 2109 } 2110 var flag = item.Culture.Substring(3, 2); 2111 2112 if (!string.IsNullOrWhiteSpace(flag) && flag == "GB") 2113 { 2114 //Remove this and the if/else when SSL is installed and force ssl is set 2115 //and render the <a> tag from the else 2116 <a href="http://www.bccertification.com//Default.aspx?Id=@(item.PageId)" data-active="@(Pageview.Area.ID == item.Id ? 1 : 0)"><img src="/Admin/Images/Flags/flag_@(flag).png" alt=""></a> 2117 } 2118 else 2119 { 2120 <a href="/Default.aspx?Id=@(item.PageId)" data-active="@(Pageview.Area.ID == item.Id ? 1 : 0)"><img src="/Admin/Images/Flags/flag_@(flag).png" alt=""></a> 2121 } 2122 2123 } 2124 </a></div> 2125 </div> 2126 </div> 2127 </div> 2128 2129 <script type="text/javascript"> 2130 function toggleSearch() { 2131 var $target = $('.topbarnav-search'); 2132 2133 if ($target.data('toggle')) { 2134 $target.data('toggle', false); 2135 $target.removeClass('topbarnav-search-toggle'); 2136 } else { 2137 $target.data('toggle', true); 2138 $target.addClass('topbarnav-search-toggle'); 2139 2140 $('input[name="q"]', $target).focus(); 2141 } 2142 } 2143 2144 function toggleLanguage() { 2145 var $modal = $('#modalLanguages'); 2146 $modal.modal({ keyboard: false, backdrop: 'static' }); 2147 } 2148 2149 (function ($) { 2150 $(document).on('click', '[data-toggle="sliderbar"]', function () { 2151 var target = $(this).data('target'); 2152 var controller = window['slidebars-controller']; 2153 2154 controller && controller.toggle(target); 2155 }); 2156 })(jQuery); 2157 </script> 2158 @SnippetEnd("Top") 2159 @SnippetStart("TopJs") 2160 <!--[if lt IE 9]> 2161 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> 2162 <![endif]--> 2163 <!--[if gte IE 9]><!--> 2164 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script> 2165 <!--<![endif]--> 2166 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.17.0/jquery.validate.js"></script> 2167 @SnippetEnd("TopJs")</dynamic>