Transformation help - upgraded from 7 to 8.1

Ipswitch Web asked on September 26, 2014 20:07

Hi there,

I just upgraded my dev instance of Kentico 7 to Kentico 8 (and then 8.1) using the KIM. Everything went perfectly, except for a few custom (ascx) Translations that were not converted.

Here's an example - <li class="<%# CMSContext.CurrentAliasPath.ToLower().StartsWith(Eval("NodeAliasPath").ToString().ToLower())? "Highlighted" : ""%> <%# Eval("NodeChildNodesCount").ToString() == "0" ? " noChildren" : "" %>">

Can someone show how this should be written for Kentico 8 ?

Many thanks!

pete

Correct Answer

Brenden Kehren answered on September 27, 2014 20:43

Did you follow the upgrade procedures? There were instructions stating that you should check out virtual objects like transformations and templates and such to the file system. This will allow you to fix any errors easier in Visual Studio.

v8 does not have CMSContext namespace any longer. You can simply remove that and it will resolve your problem. The context namespaces are more specific now like DocumentContext or SiteContext or MembershipContext.

1 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.