More in this section

Forums / Developing with Sitefinity / Can I continue to use the Telerik.CMS... assemblies?

Can I continue to use the Telerik.CMS... assemblies?

3 posts, 0 answered
  1. Richard
    Richard avatar
    49 posts
    Registered:
    13 Jul 2010
    23 Apr 2012
    Link to this post
    Hello all.

    I'm in the process of migrating from 3.7 to 5 and I am getting a bit confused.

    Is it the case that the Telerik.CMS dll's are now obsolete in 5.0 and I should discontinue using them?

    For example, in my previous site I had the following bit of code that used the CMS.Web dll to form a mega menu:

    if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
          {
              var smn = (CmsSiteMapNode)e.Item.DataItem;
              var mmLevel0Section = (HtmlGenericControl)e.Item.FindControl("mmL0S");
              var mmLevel0Link = (HtmlAnchor)e.Item.FindControl("mmLevel0Link");
              mmLevel0Link.Attributes["href"] = smn.Url;
              mmLevel0Link.InnerHtml = smn.Title.Replace("  ", "<br/>");
              if (smn.ChildNodes.Count == 1)
              {
                  var dashboardList = Dashboards.Split(new Char[] { ';' });
                  if (dashboardList.Contains(smn.Title) || dashboardList.Contains("All"))
                      mmLevel0Link.Attributes["href"] = smn.ChildNodes[0].Url;
              }
     
              if (smn.ChildNodes.Count > 0)
              {
                  var mmLevel1 = ((Repeater)e.Item.FindControl("mmLevel1"));
                  mmLevel1.DataSource = smn.ChildNodes;
                  mmLevel1.DataBind();
              }
              else
                  mmLevel0Section.Attributes["class"] = "section";
     
              if (RadSiteMap1.SelectedNode != null)
              {
                  var selectedPathArray = RadSiteMap1.SelectedNode.NavigateUrl.Replace(".aspx", string.Empty).Split(new Char[] { '/' });
                  var thisPathArray = smn.Url.Replace(".aspx", string.Empty).Split(new Char[] { '/' });
     
                  if (StartDepth > 0)
                  {
                      var i = 0;
                      var match = true;
     
                      while (i <= StartDepth + 1)
                      {
                          if (selectedPathArray[i] != thisPathArray[i])
                          {
                              match = false;
                          }
                          i++;
                      }
     
                      if (match)
                      {
                          mmLevel0Section.Attributes["class"] = mmLevel0Section.Attributes["class"] + "Selected";
                      }
     
                  }
                  else if (selectedPathArray[0] == thisPathArray[0] && selectedPathArray[1] == thisPathArray[1])
                  {
                      mmLevel0Section.Attributes["class"] = mmLevel0Section.Attributes["class"] + "Selected";
                  }
              }
     
          }

    This worked brilliantly, but I don't want to keep on using old assemblies if this are no longer appropriate or supported in the future.

    Any help gratefully received.



  2. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    23 Apr 2012
    Link to this post
    Yeah, you'd have to convert it to the 5.0 API.  Not only do the DLLs not come with SF anymore, but the DB schema has changed significantly where it wouldn't map back (I also think it'd want Nolics too, no?)

    FYI, The Sitemap DS you want in 5 is "SitefinitySitemapDatasource", the others will report incorrect results.
  3. Richard
    Richard avatar
    49 posts
    Registered:
    13 Jul 2010
    23 Apr 2012
    Link to this post
    Hello Steve

    Thanks for the heads up re. the data source! I was wondering why the mega menu was pulling through loads of weird 'hidden' nodes!!!

    Telerik - if you're reading, might be worth while on the Migration page to make a list of redundant controls/classes/assemblies once a user migrates from 3.7 to 5.0 and appropriate work arounds.



3 posts, 0 answered