4.x API versus 3.7's API - Upgrading Sitefinity - Upgrading Sitefinity - Progress Community
 Upgrading Sitefinity

4.x API versus 3.7's API

  • 4.x API versus 3.7's API
  • Your best bet is to reference the new Sitefinity 4 documentation, which shows specific examples on working with Pages and Content Module items.

    For example, the Querying Pages documentation shows how to retrieve pages using both the native PageManager API (similar to how you did things in 3.x) and the new Fluent API.

    If you are trying to get the current page from the control, you can use this code:

    var currentNode = Telerik.Sitefinity.Web.SiteMapBase.GetActualCurrentNode();

    i hope this is helpful!
  • I see where 4.x has a new Fluent API, but has this completely replaced the 3.7 API?

    In the process of trying to migrate a site I noticed that several bits of my code were broken. For example:

    Telerik.Cms.CmsManager cmsManager = new Telerik.Cms.CmsManager();
    CmsSiteMapNode sfNode = (CmsSiteMapNode)node;
    StringBuilder markup = new StringBuilder();
    if (sfNode == null)
        return markup;
    var children = cmsManager.GetPages(sfNode.PageID);
    foreach (CmsPage child in children)

    That example from a 3.7 custom control is not function in 4.3. I can see where the Telerik.Cms namespace has been replaced with the Telerik.Sitefinity namespace, but even taking that into account that is not enough to resolve this issue. It appears that the CmsPage class no longer exists and that the CmsManager class is gone as well.

    Is there any guidance for migrating custom controls to 4.3?