public override void Render(DotLiquid.Context context, TextWriter result)
        {
            var pageContext       = (PageContext.Current as PageContext);
            var contentController = pageContext.GetType().GetProperty("Controller", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).GetValue(pageContext) as Controller;


            ViewContext viewContext = new ViewContext(contentController.ControllerContext,
                                                      (IView) new FakeView(), contentController.ViewData, contentController.TempData, TextWriter.Null);
            ViewRenderer   viewRenderer     = new ViewRenderer((ControllerContext)viewContext);
            HtmlHelper     htmlHelper       = new HtmlHelper(viewContext, (IViewDataContainer) new ViewPage());
            IContentHelper contentHelper    = DependencyLocator.Current.GetInstance <IContentHelper>();
            int            parentVariantKey = contentHelper.GetPage("Home", false).Page.VariantKey.Value;

            BrasselerCatalogNavigationPage catalogNavItem = (BrasselerCatalogNavigationPage)contentHelper.GetChildPages <AbstractPage>(contentHelper.GetPage <HomePage>()
                                                                                                                                       .Page.ContentKey)
                                                            .Where(o => !o.ExcludeFromNavigation && o.ContentKey.Equals(contentHelper.GetPage <BrasselerCatalogNavigationPage>().Page.ContentKey))
                                                            .FirstOrDefault();


            MyAccountPage myAccountNavItem = (MyAccountPage)contentHelper.GetChildPages <AbstractPage>(contentHelper.GetPage <HomePage>().Page.ContentKey).Where(o => !o.ExcludeFromNavigation && o.ContentKey.Equals(contentHelper.GetPage <MyAccountPage>().Page.ContentKey)).FirstOrDefault();

            result.Write("<ul>");

            if (catalogNavItem != null)
            {
                string catalogThemedPartialPath = htmlHelper.GetThemedPartialPath(string.Format("{0}{1}.cshtml", (object)catalogNavItem.NavigationViewDirectory, (object)this.ViewName));
                result.Write(viewRenderer.RenderPartialView(catalogThemedPartialPath, (object)catalogNavItem));
            }

            if (myAccountNavItem != null)
            {
                if (!((SiteContext.Current.UserProfileDto != null) && (SiteContext.Current.BillTo.CustomerNumber.Length >= 1 && (SiteContext.Current.BillTo.CustomerNumber.Substring(1) == customSetting.Brasseler_GuestCustomerNumber))))
                {
                    string myAccountThemedPartialPath = htmlHelper.GetThemedPartialPath(string.Format("{0}{1}.cshtml", (object)myAccountNavItem.NavigationViewDirectory, (object)this.ViewName));
                    result.Write(viewRenderer.RenderPartialView(myAccountThemedPartialPath, (object)myAccountNavItem));
                }
            }

            if (SiteContext.Current.UserProfileDto != null)
            {
                result.Write("<li style='float:right'> <a class='cms-linklist-linkitem' href='/QuickOrder'>[% translate 'Quick Order' %]</a></li>");
            }

            result.Write("</ul>");
        }