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

ECO Station

Product Number: H8033069

  • Age Range 1-3 1-3
  • Age Range 3-5 3-5
  • Assembly Time 2.5 hrs 2.5
  • Safety Area   14m² 14
Product Details

Asterix

Product Number: PD7100-50

  • Age Range 1-3 1-3
  • Age Range 5-12 5-12
  • Age Range 3-5 3-5
  • Assembly Time 5 hrs 5
  • Safety Area   24m² 24
Product Details

Funhouse Grimmie

Product Number: H8049459

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

Funhouse Zapp

Product Number: H8049449

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

Play Tree

Product Number: LIT-200088461

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

Asterix

Product Number: PD7100-50C

  • Assembly Time 5 hrs 5
  • Safety Area   24m² 24
Product Details

Funhouse Circus

Product Number: H8049443

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

Sim

Product Number: PD7100-28

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

Altebo

Product Number: H8064256

  • Assembly Time 5 hrs 5
  • Safety Area   23m² 23
Product Details

Altebo

Product Number: H8066009

  • Assembly Time 5 hrs 5
  • Safety Area   23m² 23
Product Details

Sileth

Product Number: PD7100-27

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

Sileth

Product Number: PD7100-27C

  • Assembly Time 4.5 hrs 4.5
  • Fall Height (mm) 550 550
  • Safety Area   28m² 28
Product Details

Tillbo

Product Number: H8066008

  • Assembly Time 5 hrs 5
  • Fall Height (mm) 1400 1400
  • Safety Area   23m² 23
Product Details

Imperia

Product Number: PD7100-29

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

Imperia

Product Number: PD7100-29C

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