Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //will map rendering properties
            SublayoutParamHelper paramHelper = new SublayoutParamHelper(this, true);

            Page.Title = CurrentEntry.Title.Text + " | " + CurrentBlog.Title.Text;

            var maxEntryImage = CurrentBlog.MaximumEntryImageSizeDimension;
            if(maxEntryImage != Size.Empty)
            {
                EntryImage.MaxWidth = maxEntryImage.Width;
                EntryImage.MaxHeight = maxEntryImage.Height;
            }
        }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     SuccessCssClass = "wb-successtext";
     ErrorCssClass = "wb-errortext";
     SublayoutParamHelper helper = new SublayoutParamHelper(this, true);
     LoadEntry();
 }
Пример #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Helper = new SublayoutParamHelper(this, false);
 }
Пример #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //will populate the custom PostTemplate value if present
            SublayoutParamHelper helper = new SublayoutParamHelper(this, true);
            if (string.IsNullOrEmpty(PostTemplate))
            {
                PostTemplate = DEFAULT_POST_TEMPLATE;
            }
            EntryList.ItemTemplate = Page.LoadTemplate(PostTemplate);

            m_imageMaxSize = CurrentBlog.MaximumThumbnailImageSizeDimension;

            string requestedToShowStr = Request.QueryString["count"] ?? "0";
            int requestedToShow = 0;
            int.TryParse(requestedToShowStr, out requestedToShow);
            TotalToShow = requestedToShow > 0 ? requestedToShow : CurrentBlog.DisplayItemCountNumeric;

            string startIndexStr = Request.QueryString["startIndex"] ?? "0";
            int startIndex = 0;
            int.TryParse(startIndexStr, out startIndex);
            StartIndex = startIndex;

            string tag = Request.QueryString["tag"];
            BindEntries(tag);
            string blogUrl = Sitecore.Links.LinkManager.GetItemUrl(Sitecore.Context.Item);

            if (ancViewMore != null)
            {
                ancViewMore.HRef = blogUrl + "?count=" + (TotalToShow + CurrentBlog.DisplayCommentSidebarCountNumeric);

                if (tag != null)
                {
                    ancViewMore.HRef += "&tag=" + Server.UrlEncode(tag);
                }
            }
        }
Пример #5
0
        protected virtual void SetProperties()
        {
            var helper = new SublayoutParamHelper(this, true);

            if (!string.IsNullOrEmpty(Mode))
            {
                try
                {
                    Algorithm = (InterestingEntriesAlgorithm)Enum.Parse(typeof(InterestingEntriesAlgorithm), Mode);
                }
                catch (ArgumentException ex)
                {
                    Log.Warn("Failed to parse Mode as InterestingEntriesAlgorithm: " + Mode, this);
                }
            }
        }
Пример #6
0
        protected virtual void Page_Load(object sender, EventArgs e)
        {
            ExpandMonthsOnLoad = true;
            SublayoutParamHelper helper = new SublayoutParamHelper(this, true);

            m_entriesByMonthAndYear = new Dictionary<int, List<EntryItem>>();

            if(CurrentBlog != null)
                m_startedDate = CurrentBlog.InnerItem.Statistics.Created;

            LoadEntries();
            if (Years != null)
            {
                Years.DataSource = GetYears();
                Years.DataBind();
            }
        }