CMSContext.ResolveCurrentPath does not exist in the current context (Kentico V8)

Kimsan MRP asked on December 18, 2015 03:42

This is my function. private TreeNode GetParentNode() { TreeProvider tree = new TreeProvider(MembershipContext.AuthenticatedUser); return tree.SelectSingleNode(SiteName, CMSContext.ResolveCurrentPath(NewDocumentPath), TreeProvider.ALL_CULTURES); }

After upgrading from Kentico version7 to Kentico v8, "CMSContext.ResolveCurrentPath(NewDocumentPath)" does not exist in the current text. So What Coding can I instead of it. Please help me to Provider API changed from v7 to v8 to replace "CMSContext.ResolveCurrentPath(NewDocumentPath)", but I still can get the same result as what I get from previous(V7). Thank you beforehand :)

Correct Answer

David te Kloese answered on December 18, 2015 09:22

Hi,

If you run into any more trouble, you can look up API chages and suggested alternative on the API-changes page:

http://devnet.kentico.com/documentation/api-changes/kentico-8?signature=CMSContext.ResolveCurrentPath&page=1

Greets,

David

1 votesVote for this answer Unmark Correct answer

Recent Answers


Kimsan MRP answered on December 18, 2015 04:01

Oh I see, we can use CMS.MacroEngine.MacroResolver.ResolveCurrentPath(Path) in Kentico 8

1 votesVote for this answer Mark as a Correct answer

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