Exemplo n.º 1
0
        private void BindControls()
        {
            var headerFolder = HeaderFolderItem.GetHeader();

            if (headerFolder == null)
            {
                return;
            }

            var parentToolkitFolder = headerFolder.GetParentToolkitFolder();

            if (parentToolkitFolder == null)
            {
                return;
            }

            var links = parentToolkitFolder.GetNavigationLinkItems();

            if (links.Any())
            {
                // TODO: add extension to filter out logged in links?
                if (!IsUserLoggedIn)
                {
                    links = links.Where(x => !x.DisplayOnlyForLoggedInUsers.Checked);
                }

                lvParentToolkit.DataSource = links;
                lvParentToolkit.DataBind();
            }
        }
Exemplo n.º 2
0
        private void BindControls()
        {
            HeaderFolderItem folder = HeaderFolderItem.GetHeader();
            var languageLinks       = folder.GetLanguageLinks();

            if (languageLinks.Any())
            {
                rptLanguage.DataSource = languageLinks;
                rptLanguage.DataBind();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            _levelOne = Sitecore.Context.Item.Axes.SelectSingleItem(String.Format("ancestor-or-self::*[@@templateid='{0}']", SectionLandingPageItem.TemplateId));

            HeaderFolder = HeaderFolderItem.GetHeader();
            GetMainNavigationItems();

            var parentToolkitFolder = HeaderFolder.GetParentToolkitFolder();

            if (parentToolkitFolder != null)
            {
                frParentToolKitHeading.Item = parentToolkitFolder;
            }
        }
        private void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                // initialize text boxes
                tbxSubscriberEmail1.Text = "*****@*****.**";
                tbxSubscriberKey1.Text   = "*****@*****.**";
                tbxSubscriberFN1.Text    = "Joe";
                lblMessage.Text          = "Email Test has not started ...";
                txtHtmlContent.Text      = "<p><b>This is a test!</b></p>";
                txtWebinarCode.Text      = "<p><b>This is a test!</b></p>";

                var header = HeaderFolderItem.GetHeader();
                ddlLanguages.DataSource     = header.GetLanguageLinks();
                ddlLanguages.DataValueField = "ID";
                ddlLanguages.DataTextField  = "Name";
                ddlLanguages.DataBind();
            }
        }
Exemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            HeaderFolder = HeaderFolderItem.GetHeader();

            if (IsUserLoggedIn)
            {
                phLoggedIn.Visible = true;
                MyAccountPageItem  = MyAccountItem.GetMyAccountPage();

                UserDisplayName = !string.IsNullOrWhiteSpace(CurrentMember.FirstName) ?
                                  CurrentMember.FirstName.Trim() :
                                  "Guest";


                //sets up the global hero image along with the notifications
                var user = TelligentService.GetUser(CurrentMember.ScreenName);
                if (user != null)
                {
                    imgUserAvatar.ImageUrl = user.AvatarUrl;
                }
                else
                {
                    imgUserAvatar.ImageUrl = Constants.Settings.AnonymousAvatar;
                }

                // TODO: review this code if necessary

                int totalNotifications = (Notifications != null) ? Notifications.Count() : 0;
                int totalConversations = (Conversations != null) ? Conversations.Count() : 0;
                lblNotificationNumber.Text = (totalConversations + totalConversations).ToString();
            }
            else
            {
                phNotLoggedIn.Visible = true;
            }

            GetCompanyLogoDetail();
            SetLanguageItemsRepeater();
            GetUtilityNavigationItems();
        }