1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Display Page Properties

Display Page Properties

2 posts, 0 answered
  1. AirWeb
    AirWeb avatar
    8 posts
    Registered:
    16 Nov 2009
    11 Dec 2009
    Link to this post
    I'm wondering if there is a way to display a pages properties on the published page itself? I would like to programtically displayed the content owner (publisher) and the date that the file was published for reference at the bottom. Is this achieveable in 3.7 SP1?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    13 Dec 2009
    Link to this post
    Hello IM,

    You can create a simple user control that gets the current page and display its date through label or other server control. Sample code:

    CmsManager cmanager = new CmsManager();
    ICmsUrlContext currentPage = (ICmsUrlContext)this.Context.Items[Telerik.Cms.Web.UrlHelper.CmsPageKey];
    Guid pageID = currentPage.PageID;
    IPage page = cmanager.GetPage(pageID);
    Response.Write(page.Staged.Modifier + page.Staged.DateModified.ToString());


    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered