Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

I am trying to get the publish state of a page/component. But not able to find a method which will tell me if an item is UNPUBLISHED from a particular target. I am using CoreService.

client.GetListPublishInfo(pageUri) does not give me the information if the page/component is unpublished. Or I am looking at a wrong method?

share|improve this question
1  
if it resolve your questions, please accept an answer –  Raj Kumar Aug 7 at 10:46

2 Answers 2

up vote 7 down vote accepted

You can use following if your requirement is just to check the status

public bool IsPublished(string itemId, string publicationTargetId, 
bool isPublishedInContext)
share|improve this answer

To check if an item is published to a known PublicationTarget use the method as described by @Raj

public bool IsPublished(string itemId, string publicationTargetId, bool isPublishedInContext)

To see which PublicationTargets a known item is published to use

public PublishInfoData[] GetListPublishInfo(string itemId);

You can then see information about the items publish status like

foreach(PublishInfoData info in PublishInfoDataArray)
{
    Console.WriteLine(string.Format("Target: {0} Time: {1}", info.PublicationTarget.Title, info.PublishedAt.ToString()));
}
share|improve this answer
    
Thank you guys.. –  Pari Aug 7 at 10:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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