Tridion: How do I know if a page has been published for a specific publication using a business connector?

I am using Tridion release 5.3.

Using the business connector, I want to find out if the page has been published for a specific publication purpose.

Using the TOM API, I can do

// using types from Tridion.ContentManager.Interop.TDS // and Tridion.ContentManager.Interop.TDSDefines TDSE tdse = new TDSE(); Page page = (Page)tdse.GetObject(itemUri, EnumOpenMode.OpenModeView, "tcm:0-0-0", XMLReadFilter.XMLReadAll); page.IsPublishedTo(tcm); 

If I request Tridion using a business connector, the only information I get is if the page was published, but not for what purpose.

I tried to request the publication object itself, but this does not provide information on which pages it published.

Any ideas?

+8
c # tridion
source share
2 answers

You must set XMLReadPublishInfo and XMLReadPublishInfoDetails ItemFilters:

 <tcmapi:Message xmlns:tcmapi="http://www.tridion.com/ContentManager/5.0/TCMAPI" version="5.0" from="[MDVC.js][CmdsExecute]" failOnError="false"> <tcmapi:Request ID="tcm:1010-8314-64" preserve="true"> <tcmapi:GetItem itemURI="tcm:1010-8314-64" openMode="OpenModeView"> <tcmapi:ItemFilter type="XMLReadPublishInfo" /> <tcmapi:ItemFilter type="XMLReadPublishInfoDetails" /> </tcmapi:GetItem> </tcmapi:Request> 

This will return all information about the publication, and from there you will have to filter it yourself. Here's an example response:

 <tcmapi:Message xmlns:tcmapi="http://www.tridion.com/ContentManager/5.0/TCMAPI" version="5.0" from="[MDVC.js][CmdsExecute]" failOnError="false"> <tcmapi:Response ID="tcm:1010-8314-64" success="true" actionWF="false"> <tcmapi:Request ID="tcm:1010-8314-64" preserve="true"> <tcmapi:GetItem itemURI="tcm:1010-8314-64" openMode="OpenModeView"> <tcmapi:ItemFilter type="XMLReadPublishInfo" /> <tcmapi:ItemFilter type="XMLReadPublishInfoDetails" /> </tcmapi:GetItem> </tcmapi:Request> <tcmapi:Result> <tcm:Page ID="tcm:1010-8314-64" IsEditable="false" xmlns:tcm="http://www.tridion.com/ContentManager/5.0" xmlns:xlink="http://www.w3.org/1999/xlink"> <tcm:Info> <tcm:PublishInfo> <tcm:IsPublished>true</tcm:IsPublished> <tcm:PublishState> <tcm:Publication xlink:type="simple" xlink:title="Web: " xlink:href="tcm:0-1010-1" /> <tcm:PublicationTarget xlink:type="simple" xlink:title="A" xlink:href="tcm:0-143-65537" /> <tcm:Date>2006-01-30T11:22:58</tcm:Date> <tcm:Publisher xlink:type="simple" xlink:title="NA\A085159" xlink:href="tcm:0-220-65552" /> </tcm:PublishState> </tcm:PublishInfo> </tcm:Info> </tcm:Page> </tcmapi:Result> </tcmapi:Response> 

+6
source share

For a quick check here I will do.

  • Set the CMS to debug mode.
  • Open the page in question
  • Show where the GUI is used.
  • Click the Published tab. 5) After step 4, do not click anything except the debug window icon. Take the BC XML request that you see there, and update the parameters like page id etc., and make a request using BC for your pages.

Above should work.

+3
source share

All Articles