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?
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;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With