HAGS Connect

    A brief block of introductory copy about HAGS Connect.

    HAGS Connect Login
    My Product Collection

    To add a product simply click on Add to my collection on any product page. Once you have added products to a collection you will be able to print a product catalogue, download installation guides, images and DWG files or request a quote.

      Welcome to HAGS Connect

      A platform that grants you access to digital assets, delivers real-time news updates, facilitates the creation of personalized collections, and offers a host of other exceptional features.

      Error executing template "/Designs/Hags2024/Paragraph/h24-connect-links.cshtml"
      System.IO.DirectoryNotFoundException: Could not find a part of the path 'B:\Hags_Live_A\Files\Templates\Designs\Hags2024\assets\svg-icons\panel-icon-mega-phone.svg'.
         at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
         at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
         at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
         at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
         at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
         at System.IO.File.ReadAllText(String path)
         at CompiledRazorTemplates.Dynamic.RazorEngine_29c91b70c0d549c49892e769b2f06866.Execute() in B:\Projects\Hags_Dw915\Files\Templates\Designs\Hags2024\Paragraph\h24-connect-links.cshtml:line 39
         at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
         at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag)
         at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
         at RazorEngine.Templating.DynamicWrapperService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
         at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
         at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
         at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag)
         at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
         at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
         at Dynamicweb.Rendering.Template.RenderRazorTemplate()
      
      1 @using System.IO; 2 3 @{ 4 var blocks = GetLoop("Item.Block_Items"); 5 string mainHeading = GetString("Item.Heading"); 6 string mainCopy = GetString("Item.Main_Copy"); 7 string userGroups = @GetGlobalValue("Global:Extranet.Groups"); 8 string designBaseUrl = @GetString("Template:DesignBaseUrl"); 9 bool applyVisibleFor = @GetBoolean("Item.Apply_Visible_For"); 10 11 } 12 13 14 <div class="wrapper flow"> 15 16 @if ( mainHeading != "" ) 17 { 18 <h3 class="t-center">@(mainHeading)</h3> 19 20 @mainCopy 21 } 22 23 24 <div class="grid"> 25 26 @foreach (var block in blocks) 27 { 28 string heading = block.GetString("Item.Block_Items.Heading"); 29 string content = block.GetString("Item.Block_Items.Block_Copy"); 30 string ctaLink = block.GetString("Item.Block_Items.Block_CTA_Link"); 31 string ctaCopy = block.GetString("Item.Block_Items.Block_CTA_Copy"); 32 bool openNewWindow = block.GetBoolean("Item.Block_Items.Open_New_Window"); 33 string imageSrc = block.GetString("Item.Block_Items.Block_Image"); 34 string iconSrc = block.GetString("Item.Block_Items.Block_Icon"); 35 string iconSvg = ""; 36 string rootPath = "B:\\Hags_Live_A\\"; 37 if ( iconSrc != "") 38 { 39 iconSvg = File.ReadAllText(rootPath + iconSrc); 40 } 41 42 //access control - check if any of the user's group is in the items visible for groups 43 string visibleFor = block.GetString("Item.Block_Items.Visible_For"); 44 List<string> visibleList = visibleFor.Split(',').Select(s => s.Trim()).ToList(); 45 List<string> userGroupList = userGroups.Split(',').Select(s => s.Trim()).ToList(); 46 bool hasAccess = visibleList.Intersect(userGroupList).Any(); 47 bool canView = !applyVisibleFor ? true : hasAccess; 48 49 // any links? 50 string newWindow = openNewWindow ? " target=\"_blank\" rel=\"noopener\"" : ""; 51 string anchorLinkStart = ctaLink != "" ? "<a href=\"" + ctaLink + "\"" + newWindow + ">" : ""; 52 string anchorLinkFinish = ctaLink != "" ? "</a>" : ""; 53 54 if ( canView ) 55 { 56 <div class="link-box"> 57 <h4 class="ts-2">@heading</h4> 58 @anchorLinkStart 59 @if ( iconSrc == "" ) 60 { 61 62 <img src="@(imageSrc)"> 63 } 64 else 65 { 66 @iconSvg 67 } 68 @anchorLinkFinish 69 70 <div class="link-box__copy"> 71 @content 72 </div> 73 </div> 74 } 75 76 77 } 78 79 </div> 80 81 </div>
      }