Try Now
More in this section

Forums / Developing with Sitefinity / Create sitefinity admin page

Create sitefinity admin page

2 posts, 0 answered
  1. developer
    developer avatar
    13 posts
    11 Feb 2013
    02 May 2013
    Link to this post
    Hi all,

    I'd want to add a sitefinity admin page to end of this : 
    Dashboard Pages Content Design Administration XXXX

    Also want to add an user control in this page. Can somebody show me how to do this in C#?


  2. Boyko Nistorov
    Boyko Nistorov avatar
    16 posts
    17 Oct 2016
    03 May 2013
    Link to this post
    Hi Ozkan,

    Sitefinity gives the possibility to manage your backend pages the same way you manage your frontend pages. This is done through the Sitefinity backend:
    Administration->Backend Pages

    Also you can install and take a look at our Sitefinity SDK.

    Here is a code snippet which you can adapt to fit your needs:

    PageManager pageManager = PageManager.GetManager();
    var pageName = "Test page";
    var pageId = Guid.NewGuid();
    var pagaDataId = Guid.NewGuid();
    // Get the parent node Id
    var parentPageNodeId = SiteInitializer.SitefinityNodeId;
    var pageGroupName = "Test Page Group";
    var pageGroupGuid = Guid.NewGuid();
    // Create the page
    App.WorkWith().Page().GetManager().Provider.SuppressSecurityChecks = true;
    .CreateNewPageGroup(parentPageNodeId, pageGroupGuid).Do(p =>
            p.Title = pageGroupName;
            p.UrlName = Regex.Replace(pageGroupName.ToLower(), @"[^\w\-\!\$\'\(\)\=\@\d_]+", "-");
    .CreateNewStandardPage(pageGroupGuid, pageId, pagaDataId)
    .Do(p =>
        p.Title = pageName;
        p.Name = pageName;
        p.Description = pageName;
        p.UrlName = Regex.Replace(pageName.ToLower(), @"[^\w\-\!\$\'\(\)\=\@\d_]+", "-");
        p.ShowInNavigation = true;
        p.DateCreated = DateTime.UtcNow;
        p.LastModified = DateTime.UtcNow;
        p.Page.UIStatus = ContentUIStatus.Published;
        p.Page.HtmlTitle = pageName;
        p.Page.Title = pageName;
        p.Page.Description = pageName;
    var createdPage = App.WorkWith().Page(pageId).Get();
    if (createdPage != null)
        createdPage.ApprovalWorkflowState = "Published";
    var master = pageManager.EditPage(pagaDataId);
    if (master != null)
        // Replace with the desired controll to add on the page
        var control = new Control();
        var pageControl = pageManager.CreateControl<PageDraftControl>(control, "Content");
        pageControl.Caption = "Caption";
        master = pageManager.PagesLifecycle.CheckIn(master);
        master.ApprovalWorkflowState.Value = "Published";

    Hope this helps. Greetings,
    Boyko Nistorov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered