private void DisplayReturnToList(Article article) { //lnkReturnToList if (article.DisplayReturnToList()) { //check if there's a "list" in session, if so go back to that URL if (Session["PublishListLink"] != null && Utility.HasValue(Session["PublishListLink"].ToString())) { lnkReturnToList.NavigateUrl = Session["PublishListLink"].ToString().Trim(); lnkReturnToList.Text = String.Format(CultureInfo.CurrentCulture, Localization.GetString("lnkReturnToList", LocalResourceFile), string.Empty); } else { pnlReturnToList.Visible = true; int parentItemId = article.GetParentCategoryId(); if (parentItemId > 0) { lnkReturnToList.NavigateUrl = GetItemLinkUrl(parentItemId); //check of the parent category is set to not display on current page, if it isn't, we need to force it to be so here. Category cparent = Category.GetCategory(parentItemId, PortalId); lnkReturnToList.Text = String.Format(CultureInfo.CurrentCulture, Localization.GetString("lnkReturnToList", LocalResourceFile), cparent.Name); } else { pnlReturnToList.Visible = false; } } } }
private void DisplayArticlePaging(Article article) { //check if we're using paging if (AllowArticlePaging && (PageId > 0)) { lblArticleText.Text = article.GetPage(PageId).Replace("[PAGE]", string.Empty); //lblArticleText.Text = article.GetPage(PageId).Replace("[PAGE]", ""); //lnkPreviousPage if (PageId > 1) { lnkPreviousPage.Text = Localization.GetString("lnkPreviousPage", LocalResourceFile); lnkPreviousPage.NavigateUrl = Utility.GetItemLinkUrl(article.ItemId, PortalId, TabId, ModuleId, PageId - 1, GetCultureName()); lnkNextPage.Attributes.Add("rel", "prev"); } if (PageId < article.GetNumberOfPages) { lnkNextPage.Text = Localization.GetString("lnkNextPage", LocalResourceFile); lnkNextPage.NavigateUrl = Utility.GetItemLinkUrl(article.ItemId, PortalId, TabId, ModuleId, PageId + 1, GetCultureName()); lnkNextPage.Attributes.Add("rel", "next"); } } else { lblArticleText.Text = article.ArticleText.Replace("[PAGE]", string.Empty); lnkPreviousPage.Visible = false; lnkNextPage.Visible = false; } }