nodename to nodealias

mojtaba kavand asked on May 25, 2014 19:57

Hi there, How can I convert nodename string to nodealias string Through API?

Correct Answer

mojtaba kavand answered on June 17, 2014 02:23

TreePathUtils.GetSafeNodeAlias("string","SiteName")

It is worked better for me ,because I did not know about [NodeID] when running the script. But still should care about "`".

0 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on May 27, 2014 07:07

If you're creating a new document then it will be done automatically based on other values you set.

0 votesVote for this answer Mark as a Correct answer

mojtaba kavand answered on May 27, 2014 18:43

before I create the document/node , I need to find out if the document exist or not ? and I have dataset of all [nodename]s from another system to compare ,but the only compare method that I find in API is based on [Nodealias]s so I need to convert nodename to nodealias to compare them all one by one.

0 votesVote for this answer Mark as a Correct answer

mojtaba kavand answered on May 27, 2014 18:45

I`m looking for method to convert actual text to nodealiase , like ValidationHelper.GetCodeName(String name)

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on May 28, 2014 07:18

Try using TreeProvider.GetUniqueNodeAlias(string, string, int, int)

1 votesVote for this answer Mark as a Correct answer

mojtaba kavand answered on May 28, 2014 18:19

Thank you Brenden , This is what exactly I want :)

0 votesVote for this answer Mark as a Correct answer

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