Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 801
JBB Avatar asked Dec 20 '12 10:12

JBB


1 Answers

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;
like image 197
Andrey Marchuk Avatar answered Oct 26 '22 18:10

Andrey Marchuk