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