public ActionResult SitesNavigation()
        {
            Item contentNode         = SiteConfiguration.GetHomeItem().Parent;
            List <GenericLink> sites = new List <GenericLink>();

            foreach (Item site in contentNode.Children.ToArray().Where(item => SiteConfiguration.DoesItemExistInCurrentLanguage(item)))
            {
                if (site["Show in Sites Menu"] == "1")
                {
                    sites.Add(new GenericLink(site["Site Name"], LinkManager.GetItemUrl(site), false));
                }
            }

            if (SiteConfiguration.GetExternalSitesItem() != null)
            {
                foreach (Item externalsite in SiteConfiguration.GetExternalSitesItem().Children)
                {
                    if (SiteConfiguration.DoesItemExistInCurrentLanguage(externalsite))
                    {
                        Sitecore.Data.Fields.LinkField lf = externalsite.Fields["Site Link"];
                        sites.Add(new GenericLink(lf.Text, lf.Url, true));
                    }
                }
            }

            // Don't show the drop down unless there are multiple sites
            return((sites.Count > 1) ? View("TertiaryNavigationPartialSites", sites as IEnumerable <GenericLink>) : null);
        }
        private void LoadSitesList()
        {
            Item        contentNode   = SiteConfiguration.GetHomeItem().Parent;
            List <Item> sites         = new List <Item>();
            List <Item> externalsites = new List <Item>();

            foreach (Item site in contentNode.Children.ToArray().Where(item => SiteConfiguration.DoesItemExistInCurrentLanguage(item)))
            {
                if (site["Show in Sites Menu"] == "1")
                {
                    sites.Add(site);
                }
            }

            if (SiteConfiguration.GetExternalSitesItem() != null)
            {
                foreach (Item externalsite in SiteConfiguration.GetExternalSitesItem().Children)
                {
                    if (SiteConfiguration.DoesItemExistInCurrentLanguage(externalsite))
                    {
                        externalsites.Add(externalsite);
                    }
                }
            }

            if (sites.Count + externalsites.Count > 1) // Don't show the drop down unless there are multiple sites
            {
                SitesLink.Text = GetDictionaryText("Sites");
                if (sites.Count > 0)
                {
                    rptList.DataSource = sites;
                    rptList.DataBind();
                }

                if (sites.Count > 0 && externalsites.Count > 0)
                {
                    divider.Visible = true;
                }

                if (externalsites.Count > 0)
                {
                    rptExternal.DataSource = externalsites;
                    rptExternal.DataBind();
                }
            }
            else
            {
                SitesLink.Visible = false;
            }
        }