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