Search code examples
tridiontridion-2011

Get Publication "Title" from IdentifiableObject in tridion2011 events


I have an Tridion.ContentManager.IdentifiableObject which may be a Page/Component etc and I wish to get the title of the publication it belongs to.

I am current able to get the publicationId like so:

IdentifiableObject.Id.PublicationId

but I wish to get the Publication title without doing a round trip to tridion. Is this possible?


Solution

  • It is possible. First of all cast your object to RepositoryLocalObject instead of IdentifiableObject and then you can do:

    var item = (RepositoryLocalObject) subject;
    item.OwningRepository.Title;