Get document by URI

Beau Cowan asked on February 18, 2014 17:01

I have a site where we get related documents based off of the uri of the related documents. We do not use the DocumentID in case someone is coming in from an ad and we are unable to generate the id.

Anyway, we send the document uri to an AJAX call in order to find the documents, and I have been unable to find a way to search for a document based on the uri. Can someone help give me some direction on how I can go about doing this?

Recent Answers


Pavel Janečka answered on February 19, 2014 01:43

Hi, after ajax call on the server side, have you tried TreeProvider object and its method SelectNodes? It accepts a node alias path as one of its parameters. You can also use wildcards there.

0 votesVote for this answer Mark as a Correct answer

Richard Sustek answered on February 19, 2014 02:16

Hi,

You can also use DocumentHelper class and GetDocument method to get the Document object which also takes alias path. You would however most probably need to alter your URI (you havent provided its format) to fit the Alias path format so some work with the string wil be required.

Kind regards, Richard Sustek

0 votesVote for this answer Mark as a Correct answer

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