Error compiling template "Designs/RO/_parsed/InstagramImport.parsed.cshtml"
Line 1673: 'Dynamicweb.Content.Page' does not contain a definition for 'GetPageById'
Line 1675: 'Dynamicweb.Content.Page' does not contain a definition for 'GetPagesByParentID'
Line 1701: 'Dynamicweb.Content.Page' does not contain a definition for 'Save' and no extension method 'Save' accepting a first argument of type 'Dynamicweb.Content.Page' could be found (are you missing a using directive or an assembly reference?)
Line 1961: Possible unintended reference comparison; to get a value comparison, cast the left hand side to type 'string'
Line 1987: Possible unintended reference comparison; to get a value comparison, cast the left hand side to type 'string'
Line 2013: Possible unintended reference comparison; to get a value comparison, cast the left hand side to type 'string'
Line 2039: Possible unintended reference comparison; to get a value comparison, cast the left hand side to type 'string'

1 @using System.Web; 2 @{ 3 string assetVersion = "?v1.1"; 4 string SearchQuery = HttpContext.Current.Request["Search"]; 5 if (string.IsNullOrEmpty(SearchQuery)) 6 { 7 SearchQuery = ""; 8 } 9 10 string SearchQueryMobile = HttpContext.Current.Request["Search"]; 11 if (string.IsNullOrEmpty(SearchQueryMobile)) 12 { 13 SearchQueryMobile = ""; 14 } 15 16 var GAtracking = GetString("Item.Area.Google_Analytics"); 17 18 var GTM = GetString("Item.Area.GTM"); 19 20 var mailchimpID = GetString("Item.Area.MailChimp_ID"); 21 22 var remarketingTag = GetString("Item.Area.Remarketing_Tag"); 23 24 25 } 26 <!DOCTYPE html> 27 28 @if(GetGlobalValue("Global:Pageview.Url.Raw").Contains("CountryCode") || GetGlobalValue("Global:Pageview.Url.Raw").Contains("CurrencyCode")){ 29 <script> 30 var ID = @GetInteger("DwPageID"); 31 alturl = "/Default.aspx?ID=" + ID; 32 window.location.href = alturl; 33 </script> 34 } 35 36 <html> 37 <head> 38 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 39 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> 40 <title>@GetValue("Title")</title> 41 @GetValue("MetaTags") 42 @GetValue("CopyRightNotice") 43 44 45 46 @if(GetGlobalValue("Global:Pageview.Url.Raw").Contains("productid") || @GetBoolean("Item.Page.ShopPage") || GetInteger("DwPageID")== 4919 || GetInteger("DwPageID")== 6104 ){ 47 48 49 <!--@Snippet(MetaDescription)--> 50 51 }else{ 52 53 <!-- not set meta @GetGlobalValue("Global:Pageview.Url.Raw") --> 54 55 <title></title> 56 57 58 59 60 61 } 62 63 64 65 @*<link rel="stylesheet" href="/Files/Templates/Designs/RO/css/bootstrap.min.css"> 66 <link rel="stylesheet" href="https://unpkg.com/flickity@2/dist/flickity.min.css"> 67 <link rel="stylesheet" href="/Files/Templates/Designs/RO/css/ro_style.min.css">*@ 68 @* <link href="/Files/Templates/Designs/RO/css/bundle.min.css@(assetVersion)" rel="stylesheet"> *@ 69 <link href="/Files/Templates/Designs/RO/css/newbundle.css?ver=5" rel="stylesheet"> 70 <link href="/Files/Templates/Designs/RO/css/custom.css?ver=4" rel="stylesheet"> 71 <link rel="stylesheet" href="/Files/Templates/Designs/RO/css/f-style.css?ver=4"> 72 <link rel="icon" href="/Files/Templates/Designs/RO/favicon.ico"> 73 74 75 76 <link rel="alternate" href="https://rocopenhagen.dk" hreflang="da-DK"> 77 <link rel="alternate" href="https://rocopenhagen.com" hreflang="en-US"> 78 <!--GTM Data Layer--> 79 <script> 80 dataLayer = []; 81 </script> 82 83 @if(!string.IsNullOrWhiteSpace(GetString("Item.Area.GTM"))){ 84 <!-- GTM --> 85 <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 86 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 87 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 88 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 89 })(window,document,'script','dataLayer','@GTM');</script> 90 <!-- End GTM --> 91 } 92 93 94 95 <script src="https://use.typekit.net/tjl4wdh.js"></script> 96 <script>try { Typekit.load({ async: true }); } catch (e) { }</script> 97 @*<script src="https://code.jquery.com/jquery.min.js"></script>*@ 98 <script src="/Files/Templates/Designs/RO/js/jquery.min.js@(assetVersion)"></script> 99 <!-- Facebook Pixel Code --> 100 <script> 101 !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? 102 n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; 103 n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; 104 t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, 105 document,'script','https://connect.facebook.net/en_US/fbevents.js'); 106 fbq('init', '145461159424985' 107 ); 108 fbq('track', 'PageView'); 109 </script> 110 <noscript> 111 <img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=145461159424985&ev=PageView&noscript=1"> 112 </noscript> 113 <!-- DO NOT MODIFY --> 114 <!-- End Facebook Pixel Code --> 115 116 117 <!-- Google Code for Remarketing Tag --> 118 <!-------------------------------------------------- 119 Remarketing tags may not be associated with personally identifiable 120 information or placed on pages related to sensitive categories. See more 121 information and instructions on how to setup the tag on: 122 http://google.com/ads/remarketingsetup 123 124 ---------------------------------------------------> 125 <script type="text/javascript"> 126 /* <![CDATA[ */ 127 var google_conversion_id = @remarketingTag; 128 var google_custom_params = window.google_tag_params; 129 var google_remarketing_only = true; 130 /* ]]> */ 131 </script> 132 <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> 133 </script> 134 <noscript> 135 <div style="display:inline;"> 136 <img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/831067084/?guid=ON&amp;script=0"> 137 </div> 138 </noscript> 139 140 @* 141 <!-- script type="text/javascript" src="//downloads.mailchimp.com/js/signup-forms/popup/_embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script --> 142 <!-- script type="text/javascript">require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us16.list-manage.com","uuid":"4dd87e9d150463df79cfbb660","lid":"@mailchimpID"}) })</script --> 143 144 <!--script id="mcjs">!function(c,h,i,m,p){m=c.createElement(h),p=c.getElementsByTagName(h)[0],m.async=1,m.src=i,p.parentNode.insertBefore(m,p)}(document,"script","https://chimpstatic.com/mcjs-connected/js/users/4dd87e9d150463df79cfbb660/acea8145de4d14207c3c5fcc0.js");</script --> 145 *@ 146 147 <style> 148 *::-webkit-input-placeholder { 149 opacity: 1; 150 } 151 *:-moz-placeholder { 152 /* FF 4-18 */ 153 opacity: 1; 154 } 155 *::-moz-placeholder { 156 /* FF 19+ */ 157 opacity: 1; 158 } 159 *:-ms-input-placeholder { 160 /* IE 10+ */ 161 opacity: 1; 162 } 163 </style> 164 165 @*if(!string.IsNullOrWhiteSpace(GetString("Item.Area.Google_Analytics"))&&string.IsNullOrWhiteSpace(GetString("Item.Area.GTM"))){*@ 166 @if(!string.IsNullOrWhiteSpace(GetString("Item.Area.Google_Analytics"))){ 167 <script> 168 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 169 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 170 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 171 })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 172 173 ga('create', '@GAtracking', 'auto'); 174 ga('send', 'pageview'); 175 ga('require', 'ecommerce'); 176 </script> 177 } 178 @GetValue("Stylesheets") 179 @GetValue("Javascripts") 180 </head> 181 <body> 182 @if(!string.IsNullOrWhiteSpace(GetString("Item.Area.GTM"))){ 183 <!-- GTM (noscript) --> 184 <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=@(GTM)" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> 185 <!-- End GTM (noscript) --> 186 } 187 188 189 190 @{ 191 var ID = GetString("Item.Area.Produktside").Replace("Default.aspx?ID=", ""); 192 } 193 <form name="EcomSearchMobile" method="get" action='@GetString("Item.Area.Produktside")'> 194 <div id="searchbarmobile" style="display: none;"> 195 <input type="hidden" name="ID" value="@ID"> 196 <input type="text" name="Search" placeholder="Search" id="mobiletextsearch" value="@(SearchQueryMobile)"> 197 <button type="submit" onclick="submitSearchMobile()" class="button" id="searchbutton"> 198 <span class="glyphicon glyphicon-search" aria-hidden="true" id="searchmobile"></span> 199 </button> 200 </div> 201 </form> 202 <div id="overlay" onclick="closeOverlay()"></div> 203 <header id="header"> 204 <div class="container-fluid paddingtop"> 205 <div class="row"> 206 <div class="col-xs-12"> 207 <div id="top" style="display: block;"> 208 @{ 209 int numLang = 0; 210 foreach (var language in GetLoop("Languages")) { 211 numLang++; 212 } 213 } 214 215 <div class="language"> 216 @if (numLang > 1) { 217 <div class="languageDiv"> 218 <select id="selectLanguage" onchange="switchLanguage($(this))"> 219 @foreach (var language in GetLoop("Languages")) 220 { 221 if (language.GetBoolean("IsCurrent")) 222 { 223 <option value='@language.GetString("PageID")' selected="">@language.GetString("Name")</option> 224 } 225 else 226 { 227 <option value='@language.GetString("PageID")'>@language.GetString("Name")</option> 228 } 229 } 230 </select> 231 <i class="fa fa-caret-down" aria-hidden="true"></i> 232 </div> 233 } 234 235 <div class="currencieDiv"> 236 <select id="selectCurrencie" onchange="switchCurrencie($(this))"> 237 @foreach (var curn in GetLoop("Currencies")) 238 { 239 if (curn.GetBoolean("Currency.IsCurrent")) 240 { 241 <option value='@curn.GetString("Currency.Code")' selected="">@curn.GetString("Currency.Name")</option> 242 } 243 else 244 { 245 <option value='@curn.GetString("Currency.Code")'>@curn.GetString("Currency.Name")</option> 246 } 247 } 248 </select> 249 <i class="fa fa-caret-down" aria-hidden="true"></i> 250 </div> 251 252 253 @RenderSnippet("SocialMedia") 254 </div> 255 256 257 258 259 <div> 260 <!--ul class="dwnavigation" id="topMenulist" data-settings="template:Navbar.xslt;endlevel:1;expandmode:all;parentid:7091;"></ul--> 261 @GetValue("DwNavigation(topMenulist)") 262 </div> 263 264 <div class="functions"> 265 <form name="EcomSearch" method="get" action='@GetString("Item.Area.Produktside")'> 266 <div id="search" class="searchbar" style="display: none;"> 267 <input type="hidden" name="ID" value="@ID"> 268 <button type="submit" onclick="submitSearch()"> 269 <span style="display: inline;font-size: 21px;color: black; vertical-align: middle;" class="glyphicon glyphicon-search"></span> 270 </button> 271 <input type="text" name="Search" placeholder="@Translate(" search","søg")"="" id="textsearch" value="@(SearchQuery)"> 272 <!--<hr />--> 273 </div> 274 </form> 275 <button id="searchbuttontrigger" onclick="triggerSearch()" type="button"> 276 <span style="display: inline;font-size: 24px;color: black; vertical-align: middle;" class="glyphicon glyphicon-search"></span> 277 </button> 278 @if (GetGlobalValue("Global:Area.Lang") == "da") 279 { 280 <button class="clickable" data-toggle="modal" data-target="#modal-slide-down-basket" data-backdrop="true"> 281 <img src="/Files/Templates/Designs/RO/images/basket.png" alt="kurv">@RenderParagraphContent(158) 282 </button> 283 } 284 else 285 { 286 <button class="clickable" data-toggle="modal" data-target="#modal-slide-down-basket" data-backdrop="true"> 287 <img src="/Files/Templates/Designs/RO/images/basket.png" alt="basket">@RenderParagraphContent(194) 288 </button> 289 } 290 <input type="hidden" name="DwAreaCartPageID" value='@GetInteger("DwAreaCartPageID")'> 291 292 <div class="modal down fade" id="modal-slide-down-basket" tabindex="-1" role="dialog" aria-labelledby="myModalLabel2"> 293 <div class="modal-dialog" role="document"> 294 <div class="modal-content"> 295 296 <div class="modal-header container-fluid"> 297 <div class="row"> 298 <div class="col-xs-12"> 299 <h3 class="modal-title" id="myModalLabel2">Din Kurv</h3> 300 <button type="button" class="close" data-dismiss="modal"><img src='/Files/Templates/Designs/RO/images/close2.png' alt="close luk"></button> 301 </div> 302 </div> 303 <hr> 304 </div> 305 306 <div class="modal-body container-fluid"> 307 <div class="row"> 308 <div class="col-xs-12 col-sm-7"> 309 <h3>@Translate("summary","Summary")</h3> 310 <hr> 311 @foreach (LoopItem orderline in GetLoop("OrderLines")) 312 { 313 string productNumber = orderline.GetString("Ecom:Product.Number"); 314 string productsize = orderline.GetString("Ecom:Product:Field.productsize.Value"); 315 string productImage = ""; 316 317 if (orderline.GetString("Ecom:Order:OrderLine.Type") == "1") 318 { 319 productNumber = "1"; 320 } 321 322 var filePath = "/Files/Images/RO/Produkter/" + productNumber + "_packshot.png"; 323 324 if (productsize == "small") 325 { 326 productImage = "/Admin/Public/getImage.ashx?Image=/Files/Images/RO/Produkter/" + productNumber + "_packshot.png&format=png&width=240&height=180&crop=0"; 327 } 328 else 329 { 330 productImage = "/Admin/Public/getImage.ashx?Image=/Files/Images/RO/Produkter/" + productNumber + "_packshot.png&format=png&width=240&height=180&crop=0"; 331 } 332 333 string material = orderline.GetString("Ecom:Product:Field.material.Value"); 334 string translatedmaterial = Translate(material, material); 335 string karat = orderline.GetString("Ecom:Product:Field.karat.Value") + "kt"; 336 337 string price = orderline.GetString("Ecom:Order:OrderLine.Price.PriceWithVAT"); 338 339 string meta = ""; 340 var m = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(filePath); 341 if(m != null) 342 { 343 var lang = GetGlobalValue("Global:Area.Lang"); 344 if (lang == "da") 345 { 346 meta = m.GetValue("Alt"); 347 } 348 else if (lang == "en") 349 { 350 meta = m.GetValue("AltEng"); 351 } 352 } 353 354 <div class="row"> 355 <div class="col-xs-12 col-sm-4"> 356 <img class="img-responsive img-top" src="@productImage" alt="produktbillede productimage"> 357 </div> 358 <div class="col-xs-12 col-sm-8"> 359 <div class="orderlineinfo"> 360 @if (orderline.GetString("Ecom:Order:OrderLine.Type") != "1" && orderline.GetString("Ecom:Order:OrderLine.Type") != "6") 361 { 362 <h2>@orderline.GetString("Ecom:Order:OrderLine.ProductName")</h2> 363 <p>@karat @translatedmaterial</p> 364 <p>@orderline.GetString("Ecom:Order:OrderLine.ProductVariantText")</p> 365 <p>@Translate("quantity", "Amount"): @orderline.GetValue("Ecom:Order:OrderLine.Quantity") <span class="price">@GetString("Ecom:Order.Currency.Code") @price</span></p> 366 } 367 368 @if (orderline.GetString("Ecom:Order:OrderLine.Type") == "6") 369 { 370 <h2>@orderline.GetString("Ecom:Order:OrderLine.ProductName")</h2> 371 <p>@Translate("quantity", "Amount"): @orderline.GetValue("Ecom:Order:OrderLine.Quantity") <span class="price">@GetString("Ecom:Order.Currency.Code") @price</span></p> 372 } 373 374 @if (orderline.GetString("Ecom:Order:OrderLine.Type") == "1") 375 { 376 <h2>@orderline.GetString("Ecom:Order:OrderLine.ProductName") <i><small>(@Translate("giftcardredeem", "Redeem"))</small></i></h2> 377 <p><span class="price">@GetString("Ecom:Order.Currency.Code") @price</span></p> 378 } 379 </div> 380 </div> 381 </div> 382 383 <hr> 384 } 385 </div> 386 <div class="col-xs-12 col-sm-offset-1 col-sm-4"> 387 <h3>@Translate("total", "Total")</h3> 388 <hr> 389 @{ 390 string shippingname = GetString("Ecom:Order.ShippingMethod"); 391 string shippingprice = GetString("Ecom:Order.ShippingFee.Price"); 392 393 string totalDiscount = GetString("Ecom:Order.OrderLines.TotalDiscount"); 394 bool activeDiscount = false; 395 if (totalDiscount.Contains("-") || totalDiscount.Contains("(")) 396 { 397 activeDiscount = true; 398 } 399 400 if (activeDiscount) 401 { 402 <p>@Translate("discount", "Discount")</p> 403 } 404 } 405 406 <div class="row"> 407 <div class="col-xs-6"> 408 <p>@Translate("subtotal", "Sub total")</p> 409 <p>@Translate("vat", "VAT")</p> 410 @if (activeDiscount) 411 { 412 <p>@Translate("discount", "Discount")</p> 413 } 414 <p>@shippingname</p> 415 </div> 416 <div class="col-xs-6 text-right"> 417 418 @{ 419 var priceWithoutDiscountAndShipping = GetDouble("Ecom:Order.Price.PriceWithoutVAT") - GetDouble("Ecom:Order.ShippingFee.Price"); 420 string newprice = priceWithoutDiscountAndShipping.ToString("N"); 421 } 422 423 <p>@GetString("Ecom:Order.Currency.Code") @*<span id="combinedSubPrice"></span>*@ @newprice</p> 424 <p id="vattype">@GetString("Ecom:Order.Currency.Code") @GetString("Ecom:Order.Price.VAT")</p> 425 @if (!String.IsNullOrEmpty(GetString("Ecom:Product.Discount.Price"))) 426 { 427 <p>@GetString("Ecom:Order.Currency.Code") @GetString("Ecom:Product.Discount.Price.Price")</p> 428 } 429 @if (activeDiscount) 430 { 431 <p>@GetString("Ecom:Order.Currency.Code") -@GetString("Ecom:Order.OrderLines.TotalDiscount").Replace("€", "").Replace("(", "").Replace("kr. ", "").Replace(")", "").Replace("-", "")</p> 432 } 433 <p>@GetString("Ecom:Order.Currency.Code") @shippingprice</p> 434 </div> 435 </div> 436 <hr> 437 <div class="row"> 438 <div class="col-xs-6"> 439 <p class="price">Total</p> 440 </div> 441 <div class="col-xs-6 text-right"> 442 <p class="price">@GetString("Ecom:Order.Currency.Code") @GetString("Ecom:Order.OrderLines.TotalPriceWithoutSymbol")</p> 443 </div> 444 <hr> 445 <button style="width: 100%;" class="btn" onclick="GoToBasket()">@Translate("basketcheckout", "Basket / Checkout")</button> 446 </div> 447 </div> 448 </div> 449 </div> 450 </div><!-- modal-content --> 451 </div><!-- modal-dialog --> 452 </div><!-- modal --> 453 454 </div> 455 456 </div> 457 <nav class="navbar navbar-default"> 458 <div class="container"> 459 <div class="navbar-header"> 460 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false" onclick="hideTop()"> 461 <span class="sr-only"></span> 462 <span class="icon-bar"></span> 463 <span class="icon-bar"></span> 464 <span class="icon-bar"></span> 465 </button> 466 </div> 467 <div class="collapse navbar-collapse" id="navbar-collapse"> 468 <button type="button" id="searchbuttonmobile" onclick="openSearchMobile()"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></button> 469 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false" onclick="hideTop()"> 470 <span class="sr-only"></span> 471 <span class="closemobile">&#10005;</span> 472 </button> 473 <div class="logo" style="display: none;"> 474 <img src="/Files/Templates/Designs/RO/images/ro_logo.png" class="img-responsive" alt="ro logo"> 475 </div> 476 @GetValue("DwNavigation(topnavigation)") 477 478 @GetValue("DwNavigation(topMenulistmobile)") 479 480 <div class="language mobile text-center"> 481 @if (numLang > 1) { 482 <div class="languageDiv visible-xs" style="margin-top: 2em;display: inline-block !important; float: initial;"> 483 <select id="selectLanguageMobile" onchange="switchLanguage($(this))"> 484 @foreach (var language in GetLoop("Languages")) 485 { 486 if (language.GetBoolean("IsCurrent")) 487 { 488 <option value='@language.GetString("PageID")' selected="">@language.GetString("Name")</option> 489 } 490 else 491 { 492 <option value='@language.GetString("PageID")'>@language.GetString("Name")</option> 493 } 494 } 495 </select> 496 <i class="fa fa-caret-down" aria-hidden="true" style="position: relative; top: -21px; left: 77px; float: left"></i> 497 </div> 498 } 499 500 <div class="currencieDiv"> 501 <select id="selectCurrencie" onchange="switchCurrencie($(this))"> 502 @foreach (var curn in GetLoop("Currencies")) 503 { 504 if (curn.GetBoolean("Currency.IsCurrent")) 505 { 506 <option value='@curn.GetString("Currency.Code")' selected="">@curn.GetString("Currency.Name")</option> 507 } 508 else 509 { 510 <option value='@curn.GetString("Currency.Code")'>@curn.GetString("Currency.Name")</option> 511 } 512 } 513 </select> 514 <i class="fa fa-caret-down" aria-hidden="true"></i> 515 </div> 516 517 </div> 518 <div class="mobile-social">@RenderSnippet("SocialMedia")</div> 519 </div> 520 </div> 521 </nav> 522 523 @if (GetInteger("DwAreaFirstPageID") == GetInteger("DwPageID")) { 524 <div class="logo on-front"> 525 <a href='Default.aspx?ID=@GetInteger("DwAreaFirstPageID")'> 526 <img src="/Files/Templates/Designs/RO/images/ro_logo.png" class="img-responsive" alt="ro logo"> 527 </a> 528 </div> 529 } 530 531 @if (GetInteger("DwAreaFirstPageID") != GetInteger("DwPageID")) { 532 <div class="logo"> 533 <a href='Default.aspx?ID=@GetInteger("DwAreaFirstPageID")'> 534 <img src="/Files/Templates/Designs/RO/images/ro_logo.png" class="img-responsive" alt="ro logo"> 535 </a> 536 </div> 537 } 538 539 </div> 540 </div> 541 </div> 542 </header> 543 544 <div class="main"> 545 <div class="breadcrumbs-title"> 546 <div class="container-fluid"> 547 548 <div> 549 @if (GetInteger("DwAreaFirstPageID") != GetInteger("DwPageID")) 550 { 551 var productpage = ""; 552 553 if (GetString("DWExtranetAction").Contains("productid")) 554 { 555 productpage = "true"; 556 } 557 558 <ul class="breadcrumb" id="breadcrumb"></ul> 559 560 <script> 561 $(document).ready(function () { 562 var urlNoHost = location.href.split('/').slice(3); 563 564 function capitalizeFirstLetter(string) { 565 return string.charAt(0).toUpperCase() + string.slice(1); 566 } 567 568 function noDash(string) { 569 return string.replace(/\-/g, " ").trim(); 570 } 571 572 function convertSpecialChars(name) { 573 return name.replace("ae", "æ").replace("&#230;", "æ").replace("oe", "ø").replace("&#248;", "ø").replace("aa", "å").replace("&#229;", "å"); 574 } 575 576 function setLiAndA(name,number) { 577 578 var host = location.protocol + '//' + location.host + '/'; 579 var url = location.href; 580 url = url.substring(0, url.indexOf(name)); 581 var link = url + name; 582 var newname = ""; 583 584 if ("@productpage" == "true" && number == urlNoHost.length - 1) 585 { 586 newname = document.getElementById('prodName').innerHTML; 587 } 588 else 589 { 590 newname = noDash(name); 591 } 592 593 if("@GetString("DwAreaName")" == "Dansk") 594 { 595 newname = convertSpecialChars(newname); 596 } 597 598 newname = capitalizeFirstLetter(newname); 599 if (newname.indexOf('?') > -1) 600 { 601 newname = newname.substring(0, newname.indexOf('?')); 602 } 603 604 $('<a />', { 605 href: link, 606 text: newname 607 }).wrap('<li />').parent().appendTo('#breadcrumb'); 608 } 609 610 for (var i in urlNoHost) { 611 if (urlNoHost[i] == 'produkter' || urlNoHost[i] == 'products') { 612 urlNoHost.splice(i, 1); 613 } 614 } 615 616 for (var i in urlNoHost) { 617 setLiAndA(urlNoHost[i],i); 618 } 619 }) 620 </script> 621 } 622 </div> 623 624 625 @if (GetInteger("DwAreaFirstPageID") != GetInteger("DwPageID")) { 626 <h1>@GetString("DwPageName")</h1> 627 } 628 </div></div> 629 630 631 @using Newtonsoft.Json; 632 @using Newtonsoft.Json.Linq; 633 @using System.Net; 634 @using System.IO; 635 @using System.Web; 636 @using System.Collections; 637 @using System.Linq; 638 639 @functions{ 640 641 public class FeedResolver 642 { 643 public Meta meta { get; set; } 644 public Pagination pagination { get; set; } 645 public List<Data> data { get; set; } 646 } 647 648 public class Data 649 { 650 public Images images { get; set; } 651 public Caption caption { get; set; } 652 public double created_time { get; set; } 653 public string id { get; set; } 654 } 655 656 public class Caption 657 { 658 public string text { get; set; } 659 } 660 661 public class Pagination 662 { 663 public string next_url { get; set; } 664 public string next_max_id { get; set; } 665 } 666 667 // Meta class 668 public class Meta 669 { 670 public string code { get; set; } 671 } 672 673 public class Images 674 { 675 public Image low_resolution { get; set; } 676 public Image thumbnail { get; set; } 677 public Image standard_resolution { get; set; } 678 public Image __original { get; set; } 679 } 680 681 public class Image 682 { 683 public string url { get; set; } 684 public string width { get; set; } 685 public string height { get; set; } 686 } 687 688 public string getListJson(string url) 689 { 690 691 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); 692 request.Method = "GET"; 693 request.Accept = "application/json"; 694 WebResponse response = request.GetResponse(); 695 Stream stream = response.GetResponseStream(); 696 StreamReader reader = new StreamReader(stream); 697 string content = reader.ReadToEnd(); 698 reader.Close(); 699 response.Close(); 700 701 return content; 702 703 } 704 705 public JToken convertToObject(string jsonString) 706 { 707 JToken token = JObject.Parse(jsonString); 708 return token; 709 } 710 711 public static DateTime UnixTimeStampToDateTime(double unixTimeStamp) 712 { 713 // Unix timestamp is seconds past epoch 714 System.DateTime dtDateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, System.DateTimeKind.Utc); 715 dtDateTime = dtDateTime.AddSeconds(unixTimeStamp).ToLocalTime(); 716 return dtDateTime; 717 } 718 } 719 720 @{ 721 // Hent resultater som json 722 string ApiUrl = "https://api.instagram.com/v1/users/1966900245/media/recent/?access_token=1966900245.c9c6b68.375ea7bd65914bcfb827ad081c2b4ef2&count=33"; 723 string JsonList = getListJson(ApiUrl); 724 FeedResolver ListOfImages = Newtonsoft.Json.JsonConvert.DeserializeObject<FeedResolver>(JsonList); 725 int Increment = 0; 726 727 728 var parentPage = Dynamicweb.Content.Page.GetPageById(7004); 729 int TopPageForFeedEntries = parentPage.ID; 730 var CurrentFeedEntries = Dynamicweb.Content.Page.GetPagesByParentID(TopPageForFeedEntries, parentPage.AreaID); 731 } 732 733 @foreach (var insta in ListOfImages.data) 734 { 735 736 var CountExistingPage = CurrentFeedEntries.Where(x => 737 x != null && 738 !string.IsNullOrEmpty(x.NavigationTag) && 739 x.NavigationTag.Equals(insta.id) 740 ); 741 742 743 if (!CountExistingPage.Any() ) 744 { 745 746 try 747 { 748 var NewPage = new Dynamicweb.Content.Page(parentPage.AreaID, TopPageForFeedEntries); 749 750 NewPage.ItemType = "InstagramBillede"; 751 NewPage.MenuText = "" + insta.id; 752 NewPage.Hidden = true; 753 NewPage.NavigationTag = insta.id; 754 NewPage.Active = false; 755 NewPage.Save(); 756 757 var item = Dynamicweb.Content.Items.ItemManager.Storage.GetById(NewPage.ItemType, NewPage.ItemId); 758 item["Dato"] = UnixTimeStampToDateTime(insta.created_time); 759 item["Billede"] = insta.images.__original.url; 760 item["BilledeBredde"] = insta.images.__original.width; 761 item["BilledeH_jde"] = insta.images.__original.height; 762 item["Overskrift"] = "" + insta.id; 763 if (insta.caption != null) 764 { 765 item["Tekst"] = insta.caption.text; 766 } 767 768 item.Save(); 769 770 Increment++; 771 } 772 catch (Exception e) 773 { 774 <text>Fejl i oprettelse af side @(Increment) @e<br></text> 775 } 776 } 777 } 778 779 780 <!--@If(Global:CookieOptInLevel == "_All")--> 781 <div class="cookie" id="cookieWarningDiv"> 782 <div class="container-fluid bg-grey"> 783 <div class="row"> 784 <div class="col-xs-12" style="padding: 1.5em;"> 785 <p> 786 @Translate("cookie", "This website uses cookies to remember your preferences, statistics and direct targeting. Read more about our policy <a href='#'>here</a>") 787 <a class="cookie-close pull-right" onclick="return setOptInCookie(2);"> 788 <span style="display:block; float:left; color: #000000; cursor: pointer;">X</span> 789 </a> 790 </p> 791 </div> 792 </div> 793 </div> 794 </div> 795 <!--@EndIf--> 796 </div> 797 798 <footer> 799 <div class="container-fluid bg-grey nav-bottom"> 800 <div class="row"> 801 <div class="col-xs-12 col-sm-12 col-md-6"> 802 <div class="row"> 803 <div class="col-xs-12 col-sm-6 left-nav-part"> 804 <ul> 805 @{ 806 foreach (LoopItem item in GetLoop("Item.Area.Menupunkter")) 807 { 808 if (item.GetString("Item.Area.Menupunkter.Placering.Value") == "left") 809 { 810 if (item.GetString("Item.Area.Menupunkter.Link.Value") != "") 811 { 812 <li><a href='@item.GetString("Item.Area.Menupunkter.Link.Value")'> @item.GetString("Item.Area.Menupunkter.Overskrift.Value")</a></li> 813 } 814 } 815 } 816 } 817 </ul> 818 </div> 819 @* Is possible to set Placering.Value = center. See properties at Website setttings *@ 820 <div class="col-xs-12 col-sm-6"> 821 <ul> 822 @{ 823 foreach (LoopItem item in GetLoop("Item.Area.Menupunkter")) 824 { 825 if (item.GetString("Item.Area.Menupunkter.Placering.Value") == "right") 826 { 827 if (item.GetString("Item.Area.Menupunkter.Link.Value") != "") 828 { 829 <li><a href='@item.GetString("Item.Area.Menupunkter.Link.Value")'> @item.GetString("Item.Area.Menupunkter.Overskrift.Value")</a></li> 830 } 831 } 832 } 833 } 834 </ul> 835 </div> 836 </div> 837 </div> 838 <div class="col-xs-12 col-sm-12 col-md-6"> 839 @* 840 <div class="col-xs-12 col-sm-offset-1 col-sm-7 pull-right" id="maillistdiv"> 841 <p id="maillisttext">Mail list</p> 842 <table id="maillisttable"> 843 <tr> 844 <td style="width: 100%;"><input type="text" name="maillist" value=""></td> 845 <td><button class="btn" name="maillistsubmit" type="submit">@Translate("submit", "Submit")</button></td> 846 </tr> 847 </table> 848 </div> 849 *@ 850 851 @{ var translateTing = @Translate("submit", "Tilmeld"); 852 var newsLetterPlaceholder = @Translate("newsletter-placeholder", "Indtast e-mail adresse"); 853 } 854 855 @if(GetString("LongLang")=="en-GB") { 856 @RenderParagraphContent(1297) 857 } else { 858 @RenderParagraphContent(1296) 859 } 860 861 @* 862 <!-- Begin MailChimp Signup Form --> 863 <!--<link href="//cdn-images.mailchimp.com/embedcode/slim-10_7.css" rel="stylesheet" type="text/css"> --> 864 865 <div id="mc_embed_signup"> 866 <form action="https://rocopenhagen.us16.list-manage.com/subscribe/post?u=4dd87e9d150463df79cfbb660&amp;id=@mailchimpID" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate=""> 867 <div id="mc_embed_signup_scroll"> 868 <label for="mce-EMAIL" style="font-weight: normal;">@Translate("newsletter", "Tilmeld nyhedsbrev")</label><br> 869 870 <div class="input-append"> 871 <input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="@newsLetterPlaceholder" required="" style="border: none; padding: 0.4em 0.6em;width:50%;"> 872 <input type="submit" value="@translateTing" name="subscribe" id="mc-embedded-subscribe" class="button" style="margin-left: -10px;background-color: #000;border-radius: 0 !important;color: #fff !important;text-decoration: none;border: none;padding: 0.4em 0.6em;"> 873 </div> 874 875 <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups--> 876 <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_4dd87e9d150463df79cfbb660_@mailchimpID" tabindex="-1" value=""></div> 877 <div class="clear"></div> 878 </div> 879 </form> 880 </div><!--End mc_embed_signup--> 881 *@ 882 </div> 883 </div> 884 885 <div class="row cards"> 886 <div class="col-xs-12 connect">@RenderSnippet("SocialMedia")</div> 887 <div class="col-xs-12"> 888 <img src="/Files/Templates/Designs/RO/images/dankort_22.gif" alt="dankort"> 889 <img src="/Files/Templates/Designs/RO/images/master_22.gif" alt="master card"> 890 <img src="/Files/Templates/Designs/RO/images/visa-22.gif" alt="visa"> 891 <img src="/Files/Templates/Designs/RO/images/jcb_22.gif" alt="jcb"> 892 <img src="/Files/Templates/Designs/RO/images/MobilePay_Logo.png" alt="MobilePay"> 893 </div> 894 </div> 895 </div> 896 897 <div class="container-fluid bg-grey information"> 898 <div class="row"> 899 <div class="col-xs-12 content">@GetString("Item.Area.Information")</div> 900 </div> 901 </div> 902 </footer> 903 904 @SnippetStart("SocialMedia") 905 906 @if (GetValue("Item.Area.Facebook") != "") 907 { 908 <a href='@GetString("Item.Area.Facebook")' target="_blank" class="nounderline"> 909 <div class="fa fa-facebook fa-3" aria-hidden="true"></div> 910 </a> 911 } 912 @if (GetValue("Item.Area.Pinterest") != "") 913 { 914 <a href='@GetString("Item.Area.Pinterest")' target="_blank" class="nounderline"> 915 <div class="fa fa-pinterest" aria-hidden="true"></div> 916 </a> 917 } 918 @if (GetValue("Item.Area.LinkedIn") != "") 919 { 920 <a href='@GetString("Item.Area.LinkedIn")' target="_blank" class="nounderline"> 921 <div class="fa fa-linkedin" aria-hidden="true"></div> 922 </a> 923 } 924 @if (GetValue("Item.Area.Instagram") != "") 925 { 926 <a href='@GetString("Item.Area.Instagram")' target="_blank" class="nounderline"> 927 <div class="fa fa-instagram" aria-hidden="true"></div> 928 </a> 929 } 930 @SnippetEnd("SocialMedia") 931 932 933 @*<script src="/Files/Templates/Designs/RO/js/bootstrap.min.js"></script> 934 <script src="https://unpkg.com/flickity@2/dist/flickity.pkgd.min.js"></script> 935 <script src="https://unpkg.com/packery@2/dist/packery.pkgd.min.js"></script> 936 <script src="https://use.fontawesome.com/a5f6115c09.js"></script>*@ 937 <script src="/Files/Templates/Designs/RO/js/bundle.js@(assetVersion)"></script> 938 939 <script> 940 var $container = $('.grid').imagesLoaded(function () { 941 // init Packery after all images have loaded 942 $container.packery({ 943 itemSelector: 'div[class*="col-"', 944 percentPosition: true 945 }); 946 }); 947 948 function hideTop() { 949 var top = document.getElementById('top'); 950 951 if (top.style.display == "none") { 952 top.style.display = "block"; 953 } 954 else { 955 top.style.display = "none"; 956 } 957 } 958 959 function openSearchMobile() { 960 var searchbar = document.getElementById('searchbarmobile'); 961 var navbar = document.getElementById('navbar-collapse'); 962 var overlay = document.getElementById('overlay'); 963 964 if (searchbar.style.display == "none") { 965 searchbar.style.display = "block"; 966 setTimeout(function () { 967 searchbar.style.opacity = 1; 968 }, 0); 969 overlay.style.display = "block"; 970 } 971 else { 972 searchbar.style.display = "none"; 973 navbar.style.top = "0%"; 974 overlay.style.display = "none"; 975 } 976 } 977 978 function closeOverlay() { 979 var searchbar = document.getElementById('searchbarmobile'); 980 var navbar = document.getElementById('navbar-collapse'); 981 var overlay = document.getElementById('overlay'); 982 983 searchbar.style.display = "none"; 984 searchbar.style.opacity = 0; 985 overlay.style.display = "none"; 986 } 987 988 function setOptInCookie(optInLevel) { 989 var xmlhttp; 990 if (window.XMLHttpRequest) { 991 xmlhttp = new XMLHttpRequest(); 992 } 993 else { 994 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 995 } 996 xmlhttp.onreadystatechange = function () { 997 if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 998 var div = document.getElementById("cookieWarningDiv"); 999 div.parentNode.removeChild(div); 1000 return false; 1001 } 1002 } 1003 xmlhttp.open("GET", "/admin/public/CookieOptInLevelConfig.aspx?cmd=SetCookieOptInLevel&OptInLevel=" + optInLevel, true); 1004 xmlhttp.send(); 1005 return false; 1006 } 1007 1008 var searchbutton = document.getElementById('searchbuttontrigger'); 1009 var searchbar = document.getElementById('search'); 1010 var textsearch = document.getElementById('textsearch'); 1011 var topContainer = document.getElementById('top'); 1012 var check = 0; 1013 1014 function triggerSearch() { 1015 1016 if (searchbar.style.display == "none") { 1017 searchbar.style.display = "block"; 1018 setTimeout(function () { 1019 searchbar.style.opacity = 1; 1020 searchbar.style.transition = "all 0.5s"; 1021 searchbutton.style.transition = "all 0.5s" 1022 }, 0); 1023 searchbutton.style.display = "none"; 1024 check = 1; 1025 topContainer.classList.add("active"); 1026 } 1027 } 1028 1029 $(document).click(function (e) { 1030 if (check == 0 && e.target != textsearch) { 1031 topContainer.classList.remove("active"); 1032 searchbar.style.display = "none"; 1033 setTimeout(function () { 1034 searchbutton.style.opacity = 1; 1035 searchbutton.style.transition = "all 0.5s"; 1036 searchbar.style.transition = "all 0.5s" 1037 }, 0); 1038 searchbutton.style.display = "inline-block"; 1039 1040 } 1041 else { 1042 check = 0; 1043 } 1044 }); 1045 1046 function submitSearch() { 1047 document.EcomSearch.submit(); 1048 } 1049 1050 function submitSearchMobile() { 1051 document.EcomSearchMobile.submit(); 1052 } 1053 1054 function switchLanguage(caller) { 1055 var selectLang = document.getElementById($(caller).attr('id')); 1056 var ID = selectLang.options[selectLang.selectedIndex].value; 1057 1058 // empty the cart before we go to new language layer 1059 var url = '<!--@Global:Pageview.Url.Raw.JSEncoded()-->'; 1060 // $.post(url, { 1061 // 'CartCmd': 'emptycart' 1062 // }) 1063 // .done(function () { 1064 // 1065 // }) 1066 1067 alturl = "/Default.aspx?ID=" + ID; 1068 @if (!string.IsNullOrEmpty(Dynamicweb.Base.Request("GroupID"))){ 1069 <text>alturl = alturl + "&GroupID=@Dynamicweb.Base.Request("GroupID")";</text> 1070 } 1071 @if (!string.IsNullOrEmpty(Dynamicweb.Base.Request("ProductId"))){ 1072 <text>alturl = alturl + "&ProductID=@Dynamicweb.Base.Request("ProductID")";</text> 1073 } 1074 1075 window.location.href = alturl; 1076 } 1077 1078 function switchCurrencie(caller) { 1079 var selectCurn = document.getElementById($(caller).attr('id')); 1080 var CC = selectCurn.options[selectCurn.selectedIndex].value; 1081 var ID = @GetInteger("DwPageID"); 1082 1083 1084 // var url = '<!--@Global:Pageview.Url.Raw.JSEncoded()-->'; 1085 1086 alturl = "/Default.aspx?ID=" + ID; 1087 1088 if(CC=="DKK"){ 1089 alturl = alturl + "&CountryCode=DK&CurrencyCode=DKK"; 1090 }else if(CC=="GBP"){ 1091 alturl = alturl + "&CountryCode=GB&CurrencyCode=GBP"; 1092 }else{ 1093 // alturl = alturl + "&CountryCode=DE&CurrencyCode=EUR"; 1094 alturl = alturl + "&CurrencyCode=EUR"; 1095 } 1096 window.location.href = alturl; 1097 1098 1099 // alert(alturl) 1100 1101 } 1102 1103 1104 function GoToBasket() { 1105 var url = document.getElementsByName("DwAreaCartPageID")[0].value; 1106 window.location.href = "/Default.aspx?ID=" + url; 1107 } 1108 </script> 1109 <!--@Snippet(AdditionalJavascript)--> 1110 1111 1112 </body> 1113 </html> 1114 1115