I do not understand your expression, published in a separate publication. The page is inside the publication and can be published in one or more target values โโfor the publication (and this can be done for each publication on which the page is located, if it is printed in blue).
So, to find out if a particular page is published, you need to check if it is published for at least one purpose. This can be done directly in the list using OrganizationalItemItemsFilter. The returned list will show you for each item, regardless of whether it is published or not:
<tcm:Item ID="tcm:2-46-64" Title="p" Type="64" Modified="2012-03-19T16:21:10" IsNew="false" Icon="T64L0P0" IsPublished="false" Lock="0" IsShared="false" IsLocalized="false" Trustee="tcm:0-0-0" />
Here you see that the tcm: 2-46-64 Page is not being published. if we examine the unique identifier of this page, we see that it is in the publication tcm: 0-2-1 (the publication identifier is the first number in the TCM element URI).
Now, if the IsPublished attribute is set to "true", this will mean that this page (in its publication) is published for at least one purpose.
To find out what purpose this page is published for, you can use the PublishEngine.IsPublished method. An identifiable object that must be specified as the first parameter will have the identifier of your page. It doesnโt matter if we are talking about a generic (BluePrinted), localized or local element. The publication identifier in the TCM URI of your page will tell you from which publication the publication of the page is in this case.
Note that you need to use the 3rd overload: IsPublished (IdentifiableObject item, PublicationTarget publishTarget, bool isPublishedInContext) and set the last parameter to true. This will give you publication status only for the specified item, and not for any of its (BluePrint) parents or children.
source share