简体   繁体   English

Tridion:如何使用业务连接器查明页面是否已发布到特定发布目标?

[英]Tridion : How can I find out if a page has been published to a particular publication target using the business connector?

I am using Tridion release 5.3. 我正在使用Tridion 5.3版。

Using the business connector I want to find out if a page has been published to a specific publication target. 使用业务连接器我想知道页面是否已发布到特定的发布目标。

Using the TOM API I can do 使用TOM API我可以做到

// 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 query Tridion using the business connector the only information I get is if the page has been published, but not to which targets. 如果我使用业务连接器查询Tridion,我得到的唯一信息是页面是否已发布,而不是哪些目标。

I have tried querying the publication target itself but this give no information as to which pages it has published. 我已经尝试查询发布目标本身,但是这不会提供有关它已发布的页面的信息。

Any ideas? 有任何想法吗?

You should set XMLReadPublishInfo and XMLReadPublishInfoDetails ItemFilters: 您应该设置XMLReadPublishInfoXMLReadPublishInfoDetails 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 the publish info and from there on you will have to filter it yourself. 这将返回所有发布信息,从那里你必须自己过滤它。 Here's example reply: 这是回复示例:

<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>

For a quick check here is what I would do. 快速检查这里是我会做的。

  1. Set the CMS into debug mode. 将CMS设置为调试模式。
  2. Open the page in question 打开相关页面
  3. Do show where used in the GUI. 显示GUI中使用的位置。
  4. Switch to the "Published To" tab 5) After step 4 do not click anything, but the debug window icon. 切换到“已发布到”选项卡5)在步骤4之后不要单击任何内容,而是单击调试窗口图标。 Grab the BC XML request you see it there and update the parameters such as the page id etc. and make the request using BC for your pages. 抓住您在那里看到的BC XML请求并更新参数,例如页面ID等,并使用BC为您的页面发出请求。

Above should work. 以上应该工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Tridion 2009 TBB:如何确定页面是否发布到特定的发布目标? - Tridion 2009 TBB: How do I determine if a Page is published to particular publication target? 如何确定某个特定代表是否已分配给某个活动? - How do I find out if a particular delegate has already been assigned to an event? EpiServer-如何确定某个已发布页面上是否正在使用块? - EpiServer - How can I find out if a block is being used on any published page? 如何确定是否已在 SQLite 表上创建索引? - How can I find out if an index has been created on a SQLite table? 我的程序已“发布”,如何更改安装路径? - My program has been “published”, how can I change the installation path? 如何使用特定的托管Web / WCF服务查找应用程序列表? - How can I find out the list of applications using a particular hosted web/wcf service? 如何找出到 NavMeshAgent 目标的路线 - How can I find out the route to the NavMeshAgent target 项目发布后或bin目录用完后,项目引用路径将如何起作用? - How does project reference pathing function once a project has been published or is running out of a bin directory? 访问数据时,如何解决“调用目标抛出了异常”? - How can I fix “exception has been thrown by the target of an invocation” while accessing data? 使用Sql Management Objects(SMO)连接到SQL,如何查看视图是否有任何行? - Using Sql Management Objects (SMO) to connect to SQL, how can I find out if a view has any rows?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM