1

I want to get a specific publication details including metadata using TOM.NET API by just passing the Title of the publication? Could you help me with the best way (which method to use etc.)?

We are using Tridion 2013 SP1. Thanks, Kevin

2
  • 1
    Use a WebDAV url. "/WebDAV/publication%20name" - escape spaces and dots.
    – Nuno Linhares
    Aug 31 '16 at 8:33
  • Sounds like an Answer, Nuno. Aug 31 '16 at 17:19
2

As Nuno mentioned in the comment, but I'll steal his points by making it an answer ;o). In Template code you can use the GetObject method directly from the Engine object available in a Template:

Publication pub = (Publication)engine.GetObject("/WebDAV/Publication%20Name");

If your code is used in an Event Handler, you can use the GetObject method from the Session object, which you get from the subject (item the event is triggered on):

Publication pub = (Publication)subject.Session.GetObject("/WebDAV/Publication%20Name");

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.