Error executing template "/Designs/HagsCore/Paragraph/AssetsSearch.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_30ca9d9b44b048dfa469707cfc0850c6.Execute() in C:\Projects\Hags\Files\Templates\Designs\HagsCore\Paragraph\AssetsSearch.cshtml:line 892
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using System.Web.Optimization; 3 @using Dynamicweb.Ecommerce.Variants; 4 @{ 5 string validationMessages = string.Format("messages_{0}.min.js", GetGlobalValue("Global:Area.Lang")); 6 string areaLanguage = GetGlobalValue("Global:Area.Lang"); 7 string customErrorMessage = HagsWeb.Library.Utilities.DWUtilities.GetTranslation("AdvancedSearchError", "You must provide a Product Code or a Product Name for your Search", GetGlobalValue("Global:Area.LongLang")); 8 } 9 10 @*@Scripts.Render("~/bundle/AssetSearch") 11 12 @if (areaLanguage != "en") 13 { 14 // non english validation messages 15 <script src="/Files/Templates/Designs/HagsCore/script/source/libraries/validation/localization/@validationMessages"></script> 16 }*@ 17 18 <input type="hidden" id="CultureLanguage" value="@GetGlobalValue("Global:Area.LongLang")" /> 19 <input type="hidden" id="PageID" value="@GetGlobalValue("Global:Page.ID")" /> 20 <input type="hidden" id="ErrorMessage" value="@customErrorMessage" /> 21 22 <div id="advancedSearch"> 23 <div class="m-search-primary"> 24 <div class="text-center"> 25 <ul> 26 <li><a class="m-btn-search-options btn btn-default text-uppercase" role="button" href="#advancedsearch-ui" data-toggle="tab">@Translate("AdvancedSearch", "Advanced Search")</a></li> 27 <li><a class="m-btn-search-options btn btn-default text-uppercase" role="button" href="#downloadfinder" data-toggle="tab">@Translate("ProductDownloads", "Product Downloads")</a></li> 28 <li><a class="m-btn-search-options btn btn-default text-uppercase" role="button" href="#productcollection" data-toggle="tab">@Translate("MyProductCollection", "My Product Collection")</a></li> 29 <li><a class="m-btn-search-options btn btn-default text-uppercase" role="button" href="#inspirationfinder" data-toggle="tab">@Translate("InspirationFinder", "Inspiration Finder")</a></li> 30 </ul> 31 </div> 32 </div> 33 34 35 <div class="container"> 36 37 <div class="content"> 38 39 <div class="tab-content"> 40 41 <div class="tab-pane fade" id="advancedsearch-ui"> 42 43 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 44 @using Dynamicweb.Ecommerce.Variants; 45 @using HagsWeb.Library.BusinessObjects.UsersLists; 46 @using HagsWeb.Library.State; 47 @{} 48 49 @*@helper AdvancedSearch(string name) { 50 // your helper can contain code and/or markup, e.g. 51 // var msg = "Hello " + name; 52 // <p>@msg</p> 53 // For more information, visit http://go.microsoft.com/fwlink/?LinkID=204658 54 }*@ 55 56 57 @{ 58 Dynamicweb.Frontend.PageView thisPage = Dynamicweb.Frontend.PageView.Current() ?? Dynamicweb.Frontend.PageView.Current(); 59 Dynamicweb.Content.Area area = new Dynamicweb.Content.AreaService().GetArea(thisPage.AreaID); 60 61 // KOD string advancedSearchUrla = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl((Int32)thisPage.Area..get_Value("dwareasearchpageid")); 62 string advancedSearchUrl = "a"; // Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl((Int32)thisPage.Area.GetByKey("dwareasearchpageid")); 63 var s = GetString("DwAreaSearchPageID"); 64 //string advancedSearchUrl = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(s); 65 66 // Search Results in Session - Phase 2 67 //List<AdvancedSearchState> advancedSearchState = SessionManager.UsersAdvancedSearchState != null ? SessionManager.UsersAdvancedSearchState as List<AdvancedSearchState> : new List<AdvancedSearchState>(); 68 69 70 71 72 73 // Dynamicweb.Frontend.PageView thisPage = Dynamicweb.Frontend.PageView.Current() ?? Dynamicweb.Frontend.PageView.Current(); 74 // var area = Dynamicweb.Content.Area.GetAreaById(thisPage.AreaID); 75 76 //var AnchoringVariants = GlobalAnchoringVariants; // Defined in AssetsSearch.cshtml, the controls' parent 77 78 //Dynamicweb.Frontend.PageView thisPage = Dynamicweb.Frontend.PageView.Current() ?? Dynamicweb.Frontend.PageView.Current(); 79 //var area = Dynamicweb.Content.Area.GetAreaById(thisPage.AreaID); 80 81 //Dynamicweb.Frontend.PageView thisPage = Dynamicweb.Frontend.PageView.Current() ?? Dynamicweb.Frontend.PageView.Current(); 82 //ParagraphCollection pageParagraphCollection = Dynamicweb.Content.Paragraph.GetParagraphsByPageID(thisPage.ID); 83 //string pageId = thisPage.ID.ToString(); 84 85 //var area = Dynamicweb.Content.Area.GetAreaById(thisPage.AreaID); 86 // //var l = area.EcomLanguageId; 87 //string EcomLanguageID = area.EcomLanguageId; 88 //string EcomShopID = area.EcomShopID; 89 90 ////string lang = thisPage.GlobalTags.GetTagByName("LongLang").Value; 91 //string l = thisPage.Area.Values["areaecomlanguageid"].ToString(); 92 } 93 94 <div class="m-search-advanced" style="display:block;visibility:visible;"> 95 <div class="m-search-advanced-panel m-search-advanced-product" id="m-search-advanced-product" style="display:block;visibility:visible;"> 96 <div class="l-page"> 97 <div class="container-fluid"> 98 <nav class="text-center"> 99 <ul class="m-nav-tabs-search nav nav-tabs text-uppercase"> 100 <li id="tabSearchPlay" class="active"><a href="#advancedsearch-Play" data-toggle="tab">@Translate("Play", "Play")</a></li> 101 <li id="tabSearchSportFitness"><a href="#advancedsearch-SportFitness" data-toggle="tab">@Translate("SportFitness", "Sport &amp; Fitness")</a></li> 102 <li id="tabSearchParkUrban"><a href="#advancedsearch-ParkUrban" data-toggle="tab">@Translate("ParkUrban", "Park &amp; Urban")</a></li> 103 <li id="tabSearchMarine"><a href="#advancedsearch-Marine" data-toggle="tab">@Translate("Marine", "Marine")</a></li> 104 <li id="tabSearchShade"><a href="#advancedsearch-Shade" data-toggle="tab">@Translate("Shade", "Shade")</a></li> 105 </ul> 106 </nav> 107 </div> <!-- container-fluid --> 108 <div class="tab-content"> 109 <div class="tab-pane fade in active" id="advancedsearch-Play"> 110 <form id="search-play" name="search-form" method="get" action="@advancedSearchUrl"> 111 <input type="hidden" name="Products" value="Play" /> 112 <div class="l-page"> 113 <div class="container-fluid"> 114 <div class="form-horizontal"> 115 <fieldset class="m-theme-border-grey"> 116 117 <div class="row"> 118 <div class="col-ms-4 col-sm-4"> 119 <div class="form-group"> 120 <label for="ProductCode" class="col-sm-5 control-label">@Translate("ProductCode", "Product Code")</label> 121 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductCode" name="ProductCode" /></div> 122 </div> 123 </div> 124 <div class="col-ms-4 col-sm-4"> 125 <div class="form-group"> 126 <label for="ProductName" class="col-sm-5 control-label">@Translate("Name", "Name")</label> 127 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductName" name="ProductName" /></div> 128 </div> 129 </div> 130 @{ 131 List<VariantOption> PlayAnchoringVariants = new HagsWeb.Library.Methods.AssetSearch.ProductAssets().CheckValidVariantOptions("ATP3", "Play", area.EcomLanguageId); 132 133 if (PlayAnchoringVariants.Any()) 134 { 135 <div class="col-ms-4 col-sm-4"> 136 <div class="form-group"> 137 138 <label for="AnchoringType" class="col-sm-5 control-label">@Translate("Anchoring", "Anchoring")</label> 139 <div class="col-sm-7"> 140 <select class="form-control" name="AnchoringType"> 141 <option value="0">@Translate("SelectAnchoring", "Select Anchoring Type")</option> 142 @foreach (var option in PlayAnchoringVariants) 143 { 144 <option value='@option.Id'>@option.Name</option> 145 } 146 </select> 147 </div> 148 </div> 149 </div> 150 } 151 else 152 { 153 <input type="hidden" name="AnchoringType" value="0" /> 154 } 155 156 } 157 158 </div> <!-- row --> 159 160 @*<input type="hidden" name="productsInSession" value="@advancedSearchState.Count()" />*@ 161 162 </fieldset > 163 164 165 166 167 </div > <!--form - horizontal--> 168 </div > <!--container - fluid--> 169 </div > <!--l - page--> 170 <div class="m-search-advanced-buttons text-center"> 171 <button class="m-btn-search btn btn-default text-uppercase" type="reset" name="reset">@Translate("Reset", "Reset")</button> 172 <button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("Search", "Search")</button> 173 </div> 174 </form> 175 176 @*<script> 177 $("#search-play").validate(); 178 </script>*@ 179 <div id="results-search-play" class="m-search-advanced-results-panel"> 180 181 @*// Search Results in Session - Phase 2 182 @if (advancedSearchState.Any()) 183 { 184 185 foreach (AdvancedSearchState product in advancedSearchState) 186 { 187 @String.Format("{0}", product.Products) 188 } 189 }*@ 190 191 </div> 192 </div> 193 <div class="tab-pane fade in" id="advancedsearch-SportFitness"> 194 <form id="search-sport" name="search-form" method="get" action="@advancedSearchUrl" > 195 <input type="hidden" name="Products" value="Sport" /> 196 <div class="l-page"> 197 <div class="container-fluid"> 198 <div class="form-horizontal"> 199 <fieldset class="m-theme-border-grey"> 200 <div class="row"> 201 <div class="col-ms-4 col-sm-4"> 202 <div class="form-group"> 203 <label for="inputAdvancedSearch1" class="col-sm-5 control-label">@Translate("ProductCode", "Product Code")</label> 204 <div class="col-sm-7"><input type = "text" class="form-control search-group" id="inputProductCode" name="ProductCode" /></div> 205 </div> 206 </div> 207 <div class="col-ms-4 col-sm-4"> 208 <div class="form-group"> 209 <label for="inputAdvancedSearch3" class="col-sm-5 control-label">@Translate("Name", "Name")</label> 210 <div class="col-sm-7"><input type = "text" class="form-control search-group" id="inputProductName" name="ProductName" /></div> 211 </div> 212 </div> 213 214 @{ 215 List<VariantOption> SportAnchoringVariants = new HagsWeb.Library.Methods.AssetSearch.ProductAssets().CheckValidVariantOptions("ATP3", "Sport", area.EcomLanguageId); 216 217 if (SportAnchoringVariants.Count() > 0) 218 { 219 <div class="col-ms-4 col-sm-4"> 220 <div class="form-group"> 221 <label for="inputAdvancedSearch6" class="col-sm-5 control-label">@Translate("Anchoring", "Anchoring")</label> 222 <div class="col-sm-7"> 223 <select class="form-control" name="AnchoringType"> 224 <option value="0"> @Translate("SelectAnchoring", "Select Anchoring Type") </option> 225 @foreach (var option in SportAnchoringVariants) 226 { 227 <option value='@option.Id'> @option.Name </option> 228 } 229 </select> 230 </div> 231 </div> 232 </div> 233 } 234 else 235 { 236 <input type="hidden" name="AnchoringType" value="0" /> 237 } 238 } 239 240 </div> <!-- row --> 241 </fieldset> 242 </div> <!-- form-horizontal --> 243 </div> <!-- container-fluid --> 244 </div> <!-- l-page --> 245 <div class="m-search-advanced-buttons text-center"> 246 <button class="m-btn-search btn btn-default text-uppercase" type="reset" name="reset">@Translate("Reset", "Reset")</button> 247 <button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("Search", "Search")</button> 248 </div> 249 </form> 250 <div id = "results-search-sportfitness" class="m-search-advanced-results-panel"> 251 @*// Search Results in Session - Phase 2 252 @if (advancedSearchState.Any()) 253 { 254 255 foreach (AdvancedSearchState product in advancedSearchState) 256 { 257 @String.Format("{0}", product.Products) 258 } 259 }*@ 260 </div> 261 </div> 262 <div class="tab-pane fade in" id="advancedsearch-ParkUrban"> 263 <form id="search-park" name="search-form" method="get" action="@advancedSearchUrl"> 264 <input type="hidden" name="Products" value="Park" /> 265 <div class="l-page"> 266 <div class="container-fluid"> 267 <div class="form-horizontal"> 268 <fieldset class="m-theme-border-grey"> 269 <div class="row"> 270 <div class="col-ms-4 col-sm-4"> 271 <div class="form-group"> 272 <label for="inputAdvancedSearch1" class="col-sm-5 control-label">@Translate("ProductCode", "Product Code")</label> 273 <div class="col-sm-7"><input type = "text" class="form-control search-group" name="ProductCode" /></div> 274 </div> 275 </div> 276 <div class="col-ms-4 col-sm-4"> 277 <div class="form-group"> 278 <label for="inputAdvancedSearch3" class="col-sm-5 control-label">@Translate("Name", "Name")</label> 279 <div class="col-sm-7"><input type = "text" class="form-control search-group" name="ProductName" /></div> 280 </div> 281 </div> 282 @{ 283 List<VariantOption> ParkAnchoringVariants = new HagsWeb.Library.Methods.AssetSearch.ProductAssets().CheckValidVariantOptions("ATP3", "Park", area.EcomLanguageId); 284 285 if (ParkAnchoringVariants.Count() > 0) 286 { 287 <div class="col-ms-4 col-sm-4"> 288 <div class="form-group"> 289 <label for="inputAdvancedSearch6" class="col-sm-5 control-label">@Translate("Anchoring", "Anchoring")</label> 290 <div class="col-sm-7"> 291 <select class="form-control" name="AnchoringType"> 292 <option value="0"> @Translate("SelectAnchoring", "Select Anchoring Type") </option> 293 @foreach (var option in ParkAnchoringVariants) 294 { 295 <option value='@option.Id'> @option.Name </option> 296 } 297 </select> 298 </div> 299 </div> 300 </div> 301 } 302 else 303 { 304 <input type="hidden" name="AnchoringType" value="0" /> 305 } 306 } 307 308 </div> <!-- row --> 309 </fieldset> 310 </div> <!-- form-horizontal --> 311 </div> <!-- container-fluid --> 312 </div> <!-- l-page --> 313 <div class="m-search-advanced-buttons text-center"> 314 <button class="m-btn-search btn btn-default text-uppercase" type="reset" name="reset">@Translate("Reset", "Reset")</button> 315 <button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("Search", "Search")</button> 316 </div> 317 </form> 318 <div id = "results-search-parkurban" class="m-search-advanced-results-panel"> 319 @*// Search Results in Session - Phase 2 320 @if (advancedSearchState.Any()) 321 { 322 323 foreach (AdvancedSearchState product in advancedSearchState) 324 { 325 @String.Format("{0}", product.Products) 326 } 327 }*@ 328 </div> 329 </div> 330 <div class="tab-pane fade in" id="advancedsearch-Marine"> 331 <form id="search-marine" name="search-form" method="get" action="@advancedSearchUrl"> 332 <input type="hidden" name="Products" value="Marine" /> 333 <div class="l-page"> 334 <div class="container-fluid"> 335 <div class="form-horizontal"> 336 <fieldset class="m-theme-border-grey"> 337 <div class="row"> 338 <div class="col-ms-4 col-sm-4"> 339 <div class="form-group"> 340 <label for="inputAdvancedSearch1" class="col-sm-5 control-label">@Translate("ProductCode", "Product Code")</label> 341 <div class="col-sm-7"><input type = "text" class="form-control search-group" name="ProductCode" /></div> 342 </div> 343 </div> 344 <div class="col-ms-4 col-sm-4"> 345 <div class="form-group"> 346 <label for="inputAdvancedSearch3" class="col-sm-5 control-label">@Translate("Name", "Name")</label> 347 <div class="col-sm-7"><input type = "text" class="form-control search-group" name="ProductName" /></div> 348 </div> 349 </div> 350 @{ 351 List<VariantOption> MarineAnchoringVariants = new HagsWeb.Library.Methods.AssetSearch.ProductAssets().CheckValidVariantOptions("ATP3", "Marine", area.EcomLanguageId); 352 353 if (MarineAnchoringVariants.Count() > 0) 354 { 355 <div class="col-ms-4 col-sm-4"> 356 <div class="form-group"> 357 <label for="inputAdvancedSearch6" class="col-sm-5 control-label">@Translate("Anchoring", "Anchoring")</label> 358 <div class="col-sm-7"> 359 <select class="form-control" name="AnchoringType"> 360 <option value="0"> @Translate("SelectAnchoring", "Select Anchoring Type") </option> 361 @foreach (var option in MarineAnchoringVariants) 362 { 363 <option value='@option.Id'> @option.Name </option> 364 } 365 </select> 366 </div> 367 </div> 368 </div> 369 } 370 else 371 { 372 <input type="hidden" name="AnchoringType" value="0" /> 373 } 374 } 375 376 </div> <!-- row --> 377 </fieldset> 378 </div> <!-- form-horizontal --> 379 </div> <!-- container-fluid --> 380 </div> <!-- l-page --> 381 <div class="m-search-advanced-buttons text-center"> 382 <button class="m-btn-search btn btn-default text-uppercase" type="reset" name="reset">@Translate("Reset", "Reset")</button> 383 <button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("Search", "Search")</button> 384 </div> 385 </form> 386 <div id = "results-search-marine" class="m-search-advanced-results-panel"> 387 @*// Search Results in Session - Phase 2 388 @if (advancedSearchState.Any()) 389 { 390 391 foreach (AdvancedSearchState product in advancedSearchState) 392 { 393 @String.Format("{0}", product.Products) 394 } 395 }*@ 396 </div> 397 </div> 398 <div class="tab-pane fade in" id="advancedsearch-Shade"> 399 <form id="search-shade" name="search-form" method="get" action="@advancedSearchUrl"> 400 <input type="hidden" name="Products" value="Shade" /> 401 <div class="l-page"> 402 <div class="container-fluid"> 403 <div class="form-horizontal"> 404 <fieldset class="m-theme-border-grey"> 405 <div class="row"> 406 <div class="col-ms-4 col-sm-4"> 407 <div class="form-group"> 408 <label for="inputAdvancedSearch1" class="col-sm-5 control-label">@Translate("ProductCode", "Product Code")</label> 409 <div class="col-sm-7"><input type = "text" class="form-control search-group" name="ProductCode" /></div> 410 </div> 411 </div> 412 <div class="col-ms-4 col-sm-4"> 413 <div class="form-group"> 414 <label for="inputAdvancedSearch3" class="col-sm-5 control-label">@Translate("Name", "Name")</label> 415 <div class="col-sm-7"><input type = "text" class="form-control search-group" name="ProductName" /></div> 416 </div> 417 </div> 418 @{ 419 List<VariantOption> ShadeAnchoringVariants = new HagsWeb.Library.Methods.AssetSearch.ProductAssets().CheckValidVariantOptions("ATP3", "Shade", area.EcomLanguageId); 420 421 if (ShadeAnchoringVariants.Count() >0) 422 { 423 <div class="col-ms-4 col-sm-4"> 424 <div class="form-group"> 425 <label for="inputAdvancedSearch6" class="col-sm-5 control-label">@Translate("Anchoring", "Anchoring")</label> 426 <div class="col-sm-7"> 427 <select class="form-control" name="AnchoringType"> 428 <option value="0"> @Translate("SelectAnchoring", "Select Anchoring Type") </option> 429 @foreach (var option in ShadeAnchoringVariants) 430 { 431 <option value='@option.Id'> @option.Name </option> 432 } 433 </select> 434 </div> 435 </div> 436 </div> 437 } 438 else 439 { 440 <input type="hidden" name="AnchoringType" value="0" /> 441 } 442 } 443 444 </div> <!-- row --> 445 </fieldset> 446 </div> <!-- form-horizontal --> 447 </div> <!-- container-fluid --> 448 </div> <!-- l-page --> 449 <div class="m-search-advanced-buttons text-center"> 450 <button class="m-btn-search btn btn-default text-uppercase" type="reset" name="reset">@Translate("Reset", "Reset")</button> 451 <button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("Search", "Search")</button> 452 </div> 453 </form> 454 <div id = "results-search-shade" class="m-search-advanced-results-panel"> 455 @*// Search Results in Session - Phase 2 456 @if (advancedSearchState.Any()) 457 { 458 459 foreach (AdvancedSearchState product in advancedSearchState) 460 { 461 @String.Format("{0}", product.Products) 462 } 463 }*@ 464 </div> 465 </div> 466 </div> 467 </div> <!-- l-page --> 468 </div> <!-- m-search-advanced-product --> 469 <div class="text-center"> 470 <a href = "#advancedsearch-ui" class="m-search-advanced-close"><img src = "/Files/Templates/Designs/HagsCore/res/img/buttons/search-advanced-close.svg" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/buttons/search-advanced-close.png" width="112" alt="Search Advanced Close"></a> 471 </div> 472 </div> 473 474 475 476 @*<h1>@GetGlobalValue("Global:Page.Name")</h1> 477 <h1>@GetValue("Global:Page.Name")</h1> 478 <h1>The Advanced Search Include is here.. PageID = @pageId, l=, LanguageID=@EcomLanguageID, ShopID=@EcomShopID, lang=@l</h1> 479 480 <h1>Set Tag = @GetString("CheckTag") // @GetValue("CheckTag") </h1> 481 482 @foreach (var p in pageParagraphCollection) 483 { 484 var a = p.Template; 485 var b = p.ID.ToString(); 486 var c = p.Text; 487 var f = p.Languages; 488 <ul> 489 <li>@a</li> 490 <li>@b</li> 491 <li>@c</li> 492 <li>@f</li> 493 </ul> 494 }*@ 495 496 497 </div> 498 499 <div class="tab-pane fade" id="downloadfinder"> 500 501 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 502 @using HagsWeb.Library.BusinessObjects.UsersLists; 503 @using HagsWeb.Library.State; 504 @using Dynamicweb.Ecommerce.Variants; 505 @{ 506 Dynamicweb.Frontend.PageView aPage = Dynamicweb.Frontend.PageView.Current() ?? Dynamicweb.Frontend.PageView.Current(); 507 var area2 = new Dynamicweb.Content.AreaService().GetArea(aPage.AreaID); 508 509 //string downloadsSearchUrl = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl((Int32)aPage.Area.get_Value("dwareasearchpageid")); 510 string downloadsSearchUrl = "a"; // Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl((Int32)thisPage.Area.GetByKey("dwareasearchpageid")); 511 var sa = GetString("DwAreaSearchPageID"); 512 513 // This seems to be still valid 514 List<VariantOption> ProductDownloadsAnchoringVariants = new HagsWeb.Library.Methods.AssetSearch.ProductAssets().GetVariantOptions("ATP3", area2.EcomLanguageId); 515 516 517 #region Search Results in Session - Phase 2 518 519 520 //// Search Results in Session - Phase 2 521 //List<AdvancedSearchState> downloadsSearchState = SessionManager.UsersAdvancedSearchState != null ? SessionManager.UsersAdvancedSearchState as List<AdvancedSearchState> : new List<AdvancedSearchState>(); 522 //List<AdvancedSearchState> brochuresStateList = new List<AdvancedSearchState>(); 523 //List<AdvancedSearchState> dwgsStateList = new List<AdvancedSearchState>(); 524 //List<AdvancedSearchState> certificatesStateList = new List<AdvancedSearchState>(); 525 //List<AdvancedSearchState> installationGuidesStateList = new List<AdvancedSearchState>(); 526 527 //if (downloadsSearchState.Count() > 0) 528 //{ 529 // foreach (AdvancedSearchState downloadsState in downloadsSearchState) 530 // { 531 // if (!String.IsNullOrEmpty(downloadsState.Brochures)) 532 // { 533 // AdvancedSearchState broch = new AdvancedSearchState(); 534 // broch.Brochures = downloadsState.Brochures; 535 // brochuresStateList.Add(broch); 536 // } 537 // if (!String.IsNullOrEmpty(downloadsState.Dwgs)) 538 // { 539 // AdvancedSearchState dwg = new AdvancedSearchState(); 540 // dwg.Dwgs = downloadsState.Dwgs; 541 // dwgsStateList.Add(dwg); 542 // } 543 // if (!String.IsNullOrEmpty(downloadsState.Certificates)) 544 // { 545 // AdvancedSearchState certs = new AdvancedSearchState(); 546 // certs.Certificates = downloadsState.Certificates; 547 // certificatesStateList.Add(certs); 548 // } 549 // if (!String.IsNullOrEmpty(downloadsState.InstallationGuides)) 550 // { 551 // AdvancedSearchState guide = new AdvancedSearchState(); 552 // guide.InstallationGuides = downloadsState.InstallationGuides; 553 // installationGuidesStateList.Add(guide); 554 // } 555 // } 556 557 //} 558 #endregion 559 560 } 561 562 563 <div class="m-search-advanced" style="display:block;visibility:visible;"> 564 <div class="m-search-advanced-panel m-search-advanced-product" id="m-search-advanced-product" style="display:block;visibility:visible;"> 565 <div class="l-page"> 566 <div class="container-fluid"> 567 <nav class="text-center"> 568 <ul class="m-nav-tabs-search nav nav-tabs text-uppercase"> 569 <li><a href="#download-brochures" data-toggle="tab">@Translate("Brochures", "Brochures")</a></li> 570 <li><a href="#download-dwg" data-toggle="tab">@Translate("DWGFiles", "DWG Files")</a></li> 571 <li><a href="#download-certificates" data-toggle="tab">@Translate("Certificates", "Certificates")</a></li> 572 <li><a href="#download-installationguides" data-toggle="tab">@Translate("InstallationGuides", "Installation Guides")</a></li> 573 </ul> 574 </nav> 575 <p>@Translate("ProductDownloadsInstructions", "To find product downloads simply click on one of the options above and then use the search form displayed to find all the documents associated with your search.")</p> 576 <p>&nbsp;</p> 577 </div> <!-- container-fluid --> 578 <div class="tab-content"> 579 580 581 582 583 <div class="tab-pane fade in" id="download-brochures"> 584 <form id="search-brochures" method="post" action="@downloadsSearchUrl?Assets=download-brochures" > 585 <div class="l-page"> 586 <div class="container-fluid"> 587 <div class="form-horizontal"> 588 <input type="hidden" name="SearchType" value="download-brochures" /> 589 @*<input type="hidden" name="ProductCode" value="0" /> 590 <input type="hidden" name="Products" value="0" />*@ 591 <!--<fieldset class="m-theme-border-grey"> 592 <input type="hidden" name="Assets" value="download-brochures" /> 593 <div class="row"> 594 <div class="col-ms-4 col-sm-4"> 595 <div class="form-group"> 596 <label for="inputProductCode" class="col-sm-5 control-label">@Translate("ProductCode", "Product Code")</label> 597 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductCode" name="ProductCode" /></div> 598 </div> 599 </div> 600 <div class="col-ms-4 col-sm-4"> 601 <div class="form-group"> 602 <label for="inputProductName" class="col-sm-5 control-label">@Translate("Name", "Name")</label> 603 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductName" name="ProductName" /></div> 604 </div> 605 </div> 606 607 @if (ProductDownloadsAnchoringVariants.Count() > 0) 608 { 609 610 <div class="col-ms-4 col-sm-4"> 611 <div class="form-group"> 612 <label for="AnchoringType" class="col-sm-5 control-label">@Translate("Anchoring", "Anchoring")</label> 613 <div class="col-sm-7"> 614 <select class="form-control" name="AnchoringType"> 615 <option value="0">@Translate("SelectAnchoring", "Select Anchoring Type")</option> 616 @foreach (var option in ProductDownloadsAnchoringVariants) 617 { 618 <option value='@option.Id'>@option.Name</option> 619 } 620 </select> 621 </div> 622 </div> 623 </div> 624 625 } 626 627 </div> 628 </fieldset>--> 629 </div> <!-- form-horizontal --> 630 </div> <!-- container-fluid --> 631 </div> <!-- l-page --> 632 <div class="m-search-advanced-buttons text-center"> 633 @*<button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("DownloadAll", "Download All")</button>*@ 634 @*<button class="m-btn-search btn btn-default text-uppercase" type="reset" >@Translate("Reset", "Reset")</button>*@ 635 <button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("DisplayBrochures", "Display All Brochures")</button> 636 </div> 637 <div class="l-page"> 638 <div class="container-fluid"> 639 640 <div id="results-brochures" class="m-downloads m-search-advanced-results-panel"> 641 @*// SearchState - Phase 2 642 @if (brochuresStateList.Any()) 643 { 644 foreach (AdvancedSearchState brochures in brochuresStateList) 645 { 646 @String.Format("{0}", brochures.Brochures) 647 } 648 }*@ 649 </div> <!-- m-downloads --> 650 </div> <!-- container-fluid --> 651 </div> <!-- l-page --> 652 </form> 653 </div> 654 655 656 657 658 659 <div class="tab-pane fade in" id="download-dwg"> 660 <form id="search-dwg" method="post" action="@downloadsSearchUrl?Assets=download-dwg"> 661 <div class="l-page"> 662 <div class="container-fluid"> 663 <div class="form-horizontal"> 664 <fieldset id="dwg-criteria" class="m-theme-border-grey"> 665 <input type="hidden" name="SearchType" value="download-dwg" /> 666 <div class="row"> 667 <div class="col-ms-4 col-sm-4"> 668 <div class="form-group"> 669 <label for="inputProductCode" class="col-sm-5 control-label">@Translate("ProductCode", "Product Code")</label> 670 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductCode" name="ProductCode" /></div> 671 </div> 672 </div> 673 <div class="col-ms-4 col-sm-4"> 674 <div class="form-group"> 675 <label for="inputProductName" class="col-sm-5 control-label">@Translate("Name", "Name")</label> 676 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductName" name="ProductName" /></div> 677 </div> 678 </div> 679 @if (ProductDownloadsAnchoringVariants.Count() > 0) 680 { 681 682 <div class="col-ms-4 col-sm-4"> 683 <div class="form-group"> 684 685 <label for="AnchoringType" class="col-sm-5 control-label">@Translate("Anchoring", "Anchoring")</label> 686 <div class="col-sm-7"> 687 <select class="form-control" name="AnchoringType"> 688 <option value="0">@Translate("SelectAnchoring", "Select Anchoring Type")</option> 689 @foreach (var option in ProductDownloadsAnchoringVariants) 690 { 691 <option value='@option.Id'>@option.Name</option> 692 } 693 </select> 694 </div> 695 </div> 696 </div> 697 698 } 699 </div> <!-- row --> 700 </fieldset> 701 </div> <!-- form-horizontal --> 702 </div> <!-- container-fluid --> 703 </div> <!-- l-page --> 704 <div class="m-search-advanced-buttons text-center"> 705 @*<button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("DownloadAll", "Download All")</button>*@ 706 <button class="m-btn-search btn btn-default text-uppercase" type="reset">@Translate("Reset", "Reset")</button> 707 <button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("Search", "Search")</button> 708 </div> 709 <div class="l-page"> 710 <div class="container-fluid"> 711 712 <div id="results-dwgs" class="m-downloads m-search-advanced-results-panel"> 713 @*// SearchState - Phase 2 714 @if (dwgsStateList.Any()) 715 { 716 foreach (AdvancedSearchState dwgs in dwgsStateList) 717 { 718 @String.Format("{0}", dwgs.Dwgs) 719 } 720 }*@ 721 </div> <!-- m-downloads --> 722 723 724 </div> <!-- container-fluid --> 725 </div> <!-- l-page --> 726 </form> 727 </div> 728 <div class="tab-pane fade in" id="download-certificates"> 729 <form id="search-certificates" method="post" action="@downloadsSearchUrl?Assets=download-certificates"> 730 <div class="l-page"> 731 <div class="container-fluid"> 732 <div class="form-horizontal"> 733 <fieldset id="certificates-criteria" class="m-theme-border-grey"> 734 <input type="hidden" name="SearchType" value="download-certificates" /> 735 <div class="row"> 736 <div class="col-ms-4 col-sm-4"> 737 <div class="form-group"> 738 <label for="inputProductCode" class="col-sm-5 control-label">@Translate("ProductCode", "Product Code")</label> 739 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductCode" name="ProductCode" /></div> 740 </div> 741 </div> 742 <div class="col-ms-4 col-sm-4"> 743 <div class="form-group"> 744 <label for="inputProductName" class="col-sm-5 control-label">@Translate("Name", "Name")</label> 745 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductName" name="ProductName" /></div> 746 </div> 747 </div> 748 @if (ProductDownloadsAnchoringVariants.Count() > 0) 749 { 750 751 <div class="col-ms-4 col-sm-4"> 752 <div class="form-group"> 753 754 <label for="AnchoringType" class="col-sm-5 control-label">@Translate("Anchoring", "Anchoring")</label> 755 <div class="col-sm-7"> 756 <select class="form-control" name="AnchoringType"> 757 <option value="0">@Translate("SelectAnchoring", "Select Anchoring Type")</option> 758 @foreach (var option in ProductDownloadsAnchoringVariants) 759 { 760 <option value='@option.Id'>@option.Name</option> 761 } 762 </select> 763 </div> 764 </div> 765 </div> 766 767 } 768 </div> <!-- row --> 769 </fieldset> 770 </div> <!-- form-horizontal --> 771 </div> <!-- container-fluid --> 772 </div> <!-- l-page --> 773 <div class="m-search-advanced-buttons text-center"> 774 @*<button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("DownloadAll", "Download All")</button>*@ 775 <button class="m-btn-search btn btn-default text-uppercase" type="reset">@Translate("Reset", "Reset")</button> 776 <button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("Search", "Search")</button> 777 778 <div class="adviceMessage"></div> 779 780 </div> 781 <div class="l-page"> 782 <div class="container-fluid"> 783 784 <div id="results-certificates" class="m-downloads m-search-advanced-results-panel"> 785 @*// SearchState - Phase 2 786 @if (certificatesStateList.Any()) 787 { 788 foreach (AdvancedSearchState certs in certificatesStateList) 789 { 790 @String.Format("{0}", certs.Certificates) 791 } 792 }*@ 793 794 </div> <!-- m-downloads --> 795 796 797 </div> <!-- container-fluid --> 798 799 </div> <!-- l-page --> 800 </form> 801 </div> 802 <div class="tab-pane fade in" id="download-installationguides"> 803 <form id="search-installationguides" method="post" action="@downloadsSearchUrl?Assets=download-installationguides"> 804 <div class="l-page"> 805 <div class="container-fluid"> 806 <div class="form-horizontal"> 807 <fieldset id="installationguides-criteria" class="m-theme-border-grey"> 808 <input type="hidden" name="SearchType" value="download-installationguides" /> 809 <div class="row"> 810 <div class="col-ms-4 col-sm-4"> 811 <div class="form-group"> 812 <label for="inputProductCode" class="col-sm-5 control-label">@Translate("ProductCode", "Product Code")</label> 813 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductCode" name="ProductCode" /></div> 814 </div> 815 </div> 816 <div class="col-ms-4 col-sm-4"> 817 <div class="form-group"> 818 <label for="inputProductName" class="col-sm-5 control-label">@Translate("Name", "Name")</label> 819 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductName" name="ProductName" /></div> 820 </div> 821 </div> 822 @if (ProductDownloadsAnchoringVariants.Count() > 0) 823 { 824 825 <div class="col-ms-4 col-sm-4"> 826 <div class="form-group"> 827 828 <label for="AnchoringType" class="col-sm-5 control-label">@Translate("Anchoring", "Anchoring")</label> 829 <div class="col-sm-7"> 830 <select class="form-control" name="AnchoringType"> 831 <option value="0">@Translate("SelectAnchoring", "Select Anchoring Type")</option> 832 @foreach (var option in ProductDownloadsAnchoringVariants) 833 { 834 <option value='@option.Id'>@option.Name</option> 835 } 836 </select> 837 </div> 838 </div> 839 </div> 840 841 } 842 </div> <!-- row --> 843 </fieldset> 844 </div> <!-- form-horizontal --> 845 </div> <!-- container-fluid --> 846 </div> <!-- l-page --> 847 <div class="m-search-advanced-buttons text-center"> 848 @*<button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("DownloadAll", "Download All")</button>*@ 849 <button class="m-btn-search btn btn-default text-uppercase" type="reset">@Translate("Reset", "Reset")</button> 850 <button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("Search", "Search")</button> 851 </div> 852 <div class="l-page"> 853 <div class="container-fluid"> 854 855 <div id="results-guides" class="m-downloads m-search-advanced-results-panel"> 856 @*// SearchState - Phase 2 857 @if (installationGuidesStateList.Any()) 858 { 859 foreach (AdvancedSearchState guide in installationGuidesStateList) 860 { 861 @String.Format("{0}", guide.InstallationGuides) 862 } 863 }*@ 864 865 </div> <!-- m-downloads --> 866 867 868 </div> <!-- container-fluid --> 869 </div> <!-- l-page --> 870 </form> 871 </div> 872 873 </div> 874 </div> <!-- l-page --> 875 </div> <!-- m-search-advanced-product --> 876 <div class="text-center"> 877 <a href="#downloadfinder" class="m-search-advanced-close"><img src="/Files/Templates/Designs/HagsCore/res/img/buttons/search-advanced-close.svg" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/buttons/search-advanced-close.png" width="112" alt="Search Advanced Close"></a> 878 </div> 879 </div> 880 881 </div> 882 <div class="tab-pane fade" id="productcollection"> 883 884 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 885 @using HagsWeb.Library.BusinessObjects.UsersLists; 886 @using HagsWeb.Library.Methods.AssetManager; 887 @using HagsWeb.Library.State; 888 @{ 889 //Dynamicweb.Frontend.PageView thisPage = Dynamicweb.Frontend.PageView.Current() ?? Dynamicweb.Frontend.PageView.Current(); 890 //Dynamicweb.Content.Area area = Dynamicweb.Content.Area.GetAreaById(thisPage.AreaID); 891 List<ProductCollectionItem> productCollectionItems = SessionManager.UsersMyProductCollection !=null? SessionManager.UsersMyProductCollection : new List<ProductCollectionItem>(); 892 bool isQuote = Convert.ToBoolean(Pageview.Area.Item["QuoteAndOrderChk"]); 893 string downloadingText = HagsWeb.Library.Utilities.DWUtilities.GetTranslation("Downloading...", "Downloading...", area.Culture); 894 int currentPage = area.ID; 895 } 896 897 898 <input type="hidden" id="isQuote" value="@isQuote" /> 899 <input type="hidden" id="downloadingText" value="@downloadingText" /> 900 <div class="m-search-advanced" style="display:block;visibility:visible;"> 901 902 <!--<div class="pull-left"><h4 class="clearfix">@Translate("MyProductCollection", "My Product Collection")</h4></div>--> 903 904 <div class="text-center" style="clear:both;padding-top:10px; border-bottom: 2px solid #000; padding-bottom: 20px;"> 905 <div id="btns_MyProductCollection"> 906 @if (productCollectionItems.Any()) 907 { 908 <p>@Translate("ProductCollectionButtonInstructions", "Use the buttons below to either download files, create quotes or create orders based on the products you have added to your collection.")</p> 909 910 <ul class="list-inline print-hide"> 911 @{ 912 List<ProductAsset> imageFileList = new List<ProductAsset>(); 913 List<ProductAsset> dwgFileList = new List<ProductAsset>(); 914 List<ProductAsset> instructionsFileList = new List<ProductAsset>(); 915 string contactUsLink = HagsWeb.Library.Utilities.DWUtilities.GetPageByNavigationTag("ContactUs", currentPage); // /kontakta-oss?mode=quote#contactForms // /kontakta-oss?success=True&mode=quote#contactForms // restful url 916 917 foreach (var item in productCollectionItems) 918 { 919 920 foreach (ProductAsset asset in item.AssetDownloads.Where(n => n.Index == HagsWeb.Library.Methods.AssetManager.AssetTypeEnum.ToFriendlyAssetName(HagsWeb.Library.Methods.AssetManager.AssetType.Images) && n.FileName == item.ProductNumber + ".jpg" || n.FileName == item.ProductNumber + "_Side.jpg" || n.FileName == item.ProductNumber + "_Top.jpg").ToList()) 921 { 922 imageFileList.Add(asset); 923 } 924 925 foreach (ProductAsset asset in item.AssetDownloads.Where(n => n.Index == HagsWeb.Library.Methods.AssetManager.AssetTypeEnum.ToFriendlyAssetName(HagsWeb.Library.Methods.AssetManager.AssetType.Drawings)).ToList()) 926 { 927 dwgFileList.Add(asset); 928 } 929 930 foreach (ProductAsset asset in item.AssetDownloads.Where(n => n.Index == HagsWeb.Library.Methods.AssetManager.AssetTypeEnum.ToFriendlyAssetName(HagsWeb.Library.Methods.AssetManager.AssetType.AssemblyInstructions)).ToList()) 931 { 932 instructionsFileList.Add(asset); 933 } 934 935 936 } 937 938 if (imageFileList.Any()) 939 { 940 <li> 941 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" name="download" role="button" data-parent="Bilder" id="imageDownloadButton">@Translate("DownloadImages", "Download Images")</a> 942 </li> 943 } 944 945 if (dwgFileList.Any()) 946 { 947 <li> 948 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" name="download" role="button" data-parent="Ritningar" id="dwgDownloadButton">@Translate("DownloadDWGFiles", "Download DWG Files")</a> 949 </li> 950 } 951 952 if (instructionsFileList.Any()) 953 { 954 <li> 955 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" name="download" role="button" data-parent="Monteringsanvisningar" id="instructionsDownloadButton">@Translate("DownloadInstallationGuides", "Download Installation Guides")</a> 956 </li> 957 } 958 959 if (isQuote) 960 { 961 if (!string.IsNullOrEmpty(contactUsLink)) 962 { 963 <li> 964 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" href="@contactUsLink?mode=QuickQuote" role="button" data-parent="#quickquote" id="quickQuoteButton">@Translate("CreateQuickQuote", "Create a Quick Quote")</a> 965 </li> 966 <li> 967 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" href="@contactUsLink?mode=QuickOrder" role="button" data-parent="#quickorder" id="quickOrderButton">@Translate("CreateQuickOrder", "Create a Quick Order")</a> 968 </li> 969 } 970 } 971 972 } 973 </ul> 974 975 } 976 977 <span class="error hide"></span> 978 979 </div> 980 981 <div class="m-search-advanced-results-panel" id="frm_MyProductCollection"> 982 <div class="row2"> 983 @if (productCollectionItems.Any()) 984 { 985 986 foreach (ProductCollectionItem item in productCollectionItems) 987 { 988 989 <div class="l-group-5 text-left"> 990 <div class="m-attractor"> 991 <div class="m-attractor-visual"> 992 <a href="@item.ProductUrlReference"><img src="@item.ProductImageUrl" class="img-responsive m-product-thumb"></a> 993 </div> 994 995 <div class="m-attractor-info m-attractor-info-product"> 996 <h3 class="m-theme-after-yellow m-theme-border-yellow"><a href="@item.ProductUrlReference">@item.ProductName</a></h3> 997 @*<p>@item.ProductDescription</p>*@ 998 <p>@Translate("ProductNumber", "Product Number"): @item.ProductNumber</p> 999 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" href="@item.ProductUrlReference" role="button">@Translate("ProductDetails", "Product Details")</a> 1000 </div> <!-- attractor-info --> 1001 <div class="m-attractor-options"> 1002 <ul class="m-icon-links list-unstyled"> 1003 <li><a href="" name='productcollection' class="clearfix productcollection" data-removeProductlist="@item.ProductNumber"><img src="/Files/Templates/Designs/HagsCore/res/img/icons/plus.svg" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/icons/plus.png" class="m-icon pull-left"><span>@Translate("RemoveFromCollection", "Remove from my collection")</span></a></li> 1004 </ul> 1005 </div> <!-- m-attractor-options --> 1006 </div> 1007 1008 </div> 1009 1010 1011 } 1012 1013 } 1014 else 1015 { 1016 <p>@Translate("NoProductsInCollection", "You have no products in your collection.")</p> 1017 } 1018 </div> 1019 1020 </div> 1021 1022 </div> 1023 1024 <div class="text-center clearfix" style="clear:both;padding-top:10px;"> 1025 <a href="#productcollection" class="m-search-advanced-close"><img src="/Files/Templates/Designs/HagsCore/res/img/buttons/search-advanced-close.svg" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/buttons/search-advanced-close.png" width="112" alt="Search Advanced Close"></a> 1026 </div> 1027 </div> 1028 1029 1030 1031 </div> 1032 1033 <div class="tab-pane fade" id="inspirationfinder"> 1034 1035 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 1036 @using Dynamicweb.Content.Items; 1037 @{ 1038 Dynamicweb.Frontend.PageView thePage = Dynamicweb.Frontend.PageView.Current() ?? Dynamicweb.Frontend.PageView.Current(); 1039 int areaId = thePage.Area.ID; 1040 1041 // Get the current area's Paragraphs and find the ItemPublisher Module, returning a link and its paragraph content. Checks if Normalize latin Chars is set in DW 1042 var tuple = HagsWeb.Library.Methods.Items.ItemTypeMethods.GetDefaultCaseStudies(areaId, 3); 1043 string paraContent = tuple.Item1; 1044 int pageId = tuple.Item2; // The Target Case Study Page listin Case study Item Types 1045 string hyperLink = tuple.Item3; 1046 bool latinCharacters = tuple.Item4; 1047 IEnumerable<Item> caseStudies = tuple.Item5; 1048 1049 //http://developer.dynamicweb-cms.com/documentation/for-developers/item-based-structure/querying-items.aspx 1050 1051 //string DataFromItem = RenderItemList(new 1052 //{ 1053 // ItemType = "Case_Study", 1054 // ListSourceType = "Page", 1055 // ListSourcePage = "62", 1056 // //IncludeAllChildItems = true, 1057 // //IncludeParagraphItems = true, 1058 // ItemFieldsList = "*", 1059 // ListTemplate = "ItemPublisher/List/Case Study List.cshtml", 1060 // ListPageSize = "100" 1061 //}).ToString(); 1062 1063 ////int productsPageId = GetPageIdByNavigationTag("Legals"); 1064 } 1065 1066 <div class="m-search-advanced" style="display:block;visibility:visible;"> 1067 <!--<h4>@Translate("InspirationFinder", "Inspiration Finder")</h4>--> 1068 1069 <div class="m-search-advanced-results-panel fade in" id="frm_InspirationFinder"> 1070 1071 @if (caseStudies.Any()) 1072 { 1073 1074 foreach (var study in caseStudies) 1075 { 1076 string studyId = study["Id"].ToString(); 1077 string Name = study["Study_Heading"] == null ? string.Empty : study["Study_Heading"].ToString(); 1078 string hyperlinkId = study["Read_More_Button"] == null ? String.Empty : study["Read_More_Button"].ToString(); 1079 string hyperlinkText = string.Empty; 1080 string Url = "Default.aspx?ID=" + pageId + "&itemId=Case_Study:" + studyId; 1081 1082 1083 // string sb_trim_Original = System.Text.RegularExpressions.Regex.Replace(Name, @"[., ?\/#!$%\^&\*;:{}=\-_`~()]", "-").ToLower(); 1084 //string sb_trim = System.Text.RegularExpressions.Regex.Replace(Name, @"[., ?\/#!$%\^&\*;:{}=\-_`~]", "-").ToLower(); 1085 1086 //string Url = hyperLink + "/" + sb_trim; 1087 1088 //if (latinCharacters) 1089 //{ 1090 // Url = HagsWeb.Library.Utilities.DWUtilities.NormalizeLatinCharacters(Url); 1091 //} 1092 1093 //string Url = hyperLink + "/" + sb_trim; 1094 string DateCreated = study["Study_Created_Date"] == null ? string.Empty : study["Study_Created_Date"].ToString(); 1095 string Description = study["Study_Content"] == null ? string.Empty : study["Study_Content"].ToString(); 1096 string StudyImages = study["Images"] == null ? string.Empty : study["Images"].ToString(); 1097 Item studyImage = null; 1098 1099 if (!string.IsNullOrEmpty(StudyImages)) 1100 { 1101 studyImage = HagsWeb.Library.Methods.Items.ItemTypeMethods.GetItemImages(study["Images"].ToString(), 1).FirstOrDefault(); 1102 } 1103 1104 1105 <div class="l-group-content col-xs-6 col-ms-4 col-sm-3"> 1106 1107 <div class="m-attractor"> 1108 1109 <div class="m-attractor-visual"> 1110 1111 @if (studyImage == null) 1112 { 1113 <a href="@Url"><img src="/Files/Templates/Designs/HagsCore/res/img/image-not-found.png" class="img-responsive" /></a> 1114 } 1115 else 1116 { 1117 <a href="@Url"><img src='@studyImage["Image"].ToString()' class="img-responsive"></a> 1118 } 1119 1120 1121 @*<img src="/Admin/Public/GetImage.ashx?width=1920&Compression=75&image=@image">*@ 1122 </div> 1123 1124 <div class="m-attractor-info m-attractor-info-product"> 1125 @if (!String.IsNullOrEmpty(Name)) 1126 { 1127 <h3 class="m-theme-after-yellow m-theme-border-yellow"><a href="@Url">@Name</a></h3> 1128 } 1129 @if (!String.IsNullOrEmpty(Description)) 1130 { 1131 <p>@Description</p> 1132 } 1133 1134 @if (!String.IsNullOrEmpty(DateCreated)) 1135 { 1136 <p>@DateCreated</p> 1137 } 1138 1139 @if (!String.IsNullOrEmpty(Url)) 1140 { 1141 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" href="@Url" role="button">@Translate("CaseStudyDetails", "Case Study Details")</a> 1142 } 1143 1144 1145 </div> <!-- attractor-info --> 1146 @*<div class="m-attractor-options"> 1147 1148 <ul class="m-icon-links list-unstyled"> 1149 <li><a href="#" class="clearfix"><img src="/Files/Templates/Designs/HagsCore/res/img/icons/plus.svg" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/icons/plus.png" class="m-icon pull-left"><span>Add to my collection</span></a></li> 1150 </ul> 1151 1152 </div>*@ <!-- m-attractor-options --> 1153 1154 </div> <!-- attractor --> 1155 1156 </div> 1157 } 1158 } 1159 1160 </div> 1161 1162 <div class="text-center all-case-studies"> 1163 1164 @if (!String.IsNullOrEmpty(paraContent)) 1165 { 1166 @paraContent 1167 } 1168 1169 @if (!String.IsNullOrEmpty(hyperLink)) 1170 { 1171 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" href="@hyperLink" role="button">@Translate("ViewAllCaseStudies", "View all our case studies")</a> 1172 } 1173 1174 </div> 1175 1176 @*<div class="m-search-advanced-buttons text-center"> 1177 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" href="@hyperLink" role="button">@Translate("ViewAllCaseStudies", "View all our case studies")</a> 1178 </div>*@ 1179 1180 @*</div>*@ 1181 1182 <div class="text-center"> 1183 <a href="#inspirationfinder" class="m-search-advanced-close"><img src="/Files/Templates/Designs/HagsCore/res/img/buttons/search-advanced-close.svg" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/buttons/search-advanced-close.png" width="112" alt="Search Advanced Close"></a> 1184 </div> 1185 </div> 1186 1187 </div> 1188 </div> 1189 1190 <div id="NoResults" style="display:none;">Sorry there are currently no items that match your search criteria. Please refine your search using the options above.</div> 1191 1192 </div> 1193 </div> 1194 1195 <div style="margin-top:50px; display:none;" id="SearchResults">@Translate("YourResults", "YourResults") **Search Results here**</div> 1196 1197 1198 </div> 1199 1200 @Scripts.Render("~/bundle/AssetSearch") 1201 1202 @if (areaLanguage != "en") 1203 { 1204 // non english validation messages 1205 <script src="/Files/Templates/Designs/HagsCore/script/source/libraries/validation/localization/@validationMessages"></script> 1206 } 1207

Balance

  • Age Range 5-12 5-12
  • Age Range 3-5 3-5
  • Assembly Time 0.5 hrs 0.5
  • Fall Height (mm) 600 600
  • Safety Area   16m² 16
Product Details

Tilia

  • Age Range 5-12 5-12
  • Age Range 3-5 3-5
  • Assembly Time 1 hrs 1
  • Fall Height (mm) 600 600
  • Safety Area   12m² 12
Product Details

Engor

  • Age Range 5-12 5-12
  • Age Range 3-5 3-5
  • Assembly Time 2.5 hrs 2.5
  • Fall Height (mm) 600 600
  • Safety Area   15m² 15
Product Details

Wooden posts

  • Age Range 5-12 5-12
  • Age Range 3-5 3-5
  • Assembly Time 1.5 hrs 1.5
  • Fall Height (mm) 600 600
  • Safety Area   15m² 15
Product Details

Engor

  • Assembly Time 2.5 hrs 2.5
  • Fall Height (mm) 600 600
  • Safety Area   13m² 13
Product Details

Hopper

  • Age Range 5-12 5-12
  • Age Range 3-5 3-5
  • Assembly Time 0.5 hrs 0.5
  • Fall Height (mm) 250 250
  • Safety Area   10m² 10
Product Details

Mesus

  • Age Range 5-12 5-12
  • Assembly Time 5 hrs 5
  • Fall Height (mm) 500 500
  • Safety Area   19m² 19
Product Details

Equilibra

  • Age Range 5-12 5-12
  • Assembly Time 4 hrs 4
  • Fall Height (mm) 550 550
  • Safety Area   16m² 16
Product Details

Broor

  • Age Range 5-12 5-12
  • Age Range 3-5 3-5
  • Assembly Time 6 hrs 6
  • Fall Height (mm) 900 900
  • Safety Area   17m² 17
Product Details