- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
在使用 TOM.NET API 的 TBB 中,我想获取已发布页面的列表 - 基本上我正在构建站点地图。我正在尝试确定 Tridion.ContentManager.CommunicationManagement.Page 是否已发布。
似乎没有 IsPublished
属性或 IsPublishedTo
方法。
我可以添加过滤条件吗?例如。
pageFilter.Conditions["Published"] = "true";
回应评论:
我正在使用 TOM.NET API,我想获取已发布页面的列表 - 基本上我正在构建站点地图。
如果页面发布到 BluePrint 层次结构中任何位置的给定目标,PublicationEngine.IsPublished 方法似乎返回“true”。这似乎不是预期的行为。
最佳答案
在这种情况下,您在 BluePrint 中有多个 Publications,您可以对您所在的页面使用 PublishEngine.GetPublishInfo() 方法,并检查您要发布的 Publication 是否存在于从该方法返回的 Publications 中:
IList<RepositoryLocalObject> rlos = structuregroup.GetItems(pageFilter);
List<Page> pages = new List<Page>(rlos.Count);
foreach (RepositoryLocalObject o in rlos)
{
Page p = (Page) o;
bool isPublished = false;
ICollection<PublishInfo> publishInfo = PublishEngine.GetPublishInfo(p);
foreach (PublishInfo info in publishInfo)
{
if (info.Publication.Id.ItemId == p.Id.PublicationId)
{
isPublished = true;
}
}
if(p != null && isPublished)
{
pages.Add(p);
}
}
你必须知道这个方法中有一个错误,它总是返回你发布的当前发布。这已在修补程序 CM_2009.1.74835 中修复。您需要应用它,否则上面的代码将无法正常工作。
关于c# - Tridion 2009 待定 : How do I determine if a Page is published to particular publication target?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9772321/
Tridion 的用户界面允许您扩展特定命令,这是修改某些现有命令的行为的好方法。在编辑器的配置文件中,这是通过如下部分完成的: 我正在研究一个通用命令扩展类,可用于修改许多命令的行为:
是否可以在事件系统中将项目放置在工作流中?我面临的问题是,我们想根据组件所在的文件夹(而不是使用的架构)将组件定向到两个不同的工作流,而Tridion UI似乎不支持。我希望编写一个在 checkin
是否可以在 Tridion 2011 TOM.NET 中获取字段类型? ItemField 类有名称和定义,但我没有看到旧的受信任 ItemType 属性。 我感觉我需要使用 Definition 属
我正在使用核心服务创建组件以连接到 Tridion 2011 SP1。我在服务器机器上编写了代码,通过核心服务创建一个组件,并且运行良好。代码是从服务器计算机执行的。 现在我想从客户端机器上执行相同的
我正在 SDL Tridion 2011 SP1 中创建架构。我突然发现了一件事。 我必须向用户显示三个下拉列表。 列表:国家 列表:州 列表:位置 如果用户在下拉列表中选择一个国家/地区,则需要根据
是否可以从 CMS 卸载 Tridion SP1 HR#1 修补程序并保留数据库更新?自应用修补程序以来,我们的 GUI 行为非常缓慢(可能与 TMS 服务失败有关?)并且需要返回到 SP1 - 但是
我正在通过在 TRIDION 2011 SP1 版本中添加按钮来自定义功能区工具栏。当我单击该按钮时,它将打开一个 aspx 页面。在该 aspx 页面内,我需要在创建组件本身之前访问用于创建该组件的
将现有的 Tridion 2009 事件 DLL(在 2011 服务器上编译)添加到 bin 目录并在 Content Manager 配置文件中注册 DLL 后,GUI 现在返回以下错误。我检查了事
将内容从 Tridion 5.2 导入到 Tridion 2011 SP1 的最佳方式是什么?内容搬运工?或卡波 最佳答案 要升级数据库,您必须遵循以下路径:5.2 => 5.2 SP1 => 5.3
我在 Tridion 2011 SP1 的功能区工具栏中添加了一个按钮。当我单击按钮时,它将打开一个 aspx 页面。在该 aspx 页面内,我需要访问光标当前所在的当前字段名称。请提供我要使用的对象
如何获取所选项目的版本号(组件/页面) 我正在使用下面的代码 VersionedItemData verinfo=csClient.Read(, new ReadOptions())
作为对功能区工具栏实现按钮的一部分。我需要按钮 java 脚本文件中的模式名称。所以我试图使用以下命令来获取架构对象。 $display.getView().getItem().getSchema()
我是 Tridion 的新手,并且面临分类问题。 作为存储,我们使用文件系统,对于分类,我们使用 sql db。 现在,我们创建了 状态 作为其中包含少量关键字的类别。我已经创建了模式和组件,并选择了
我正在尝试使用以下代码在 Tridion 模板类中创建一个多媒体组件。 MemoryStream stringInMemoryStream = new MemoryStream(ASCIIEncodi
当我们从 tridion 发布一些页面/动态组件时,是否可以在发布时将一些外部多媒体文件/内容(例如:jpg 图像)添加到当前执行/渲染包中。因此,最终的传输包具有此二进制文件以及原始发布的内容? 这
我想知道是否有人为脚注提出了一个好的解决方案。 我希望在具有多个组件的页面上在 Tridion 中实现脚注,并且我希望所有脚注都显示在页面底部,并在内容部分生成正确的脚注编号。 http://i.st
事件系统处理程序代码: [TcmExtension("My Handler")] public sealed class EventSystem : TcmExtension { public
确定哪些 Tridion 修补程序已应用于系统的最可靠方法是什么(除了正确的先前版本文档)? 具体来说,我想了解 SDL Tridion 2009,但也有兴趣了解 SDL Tridion 2011 是
如何水平放置多个自定义按钮 - 在 tridion 功能区中一个在另一个下方。 就像我们有 checkin 、 checkout 、撤消 checkout 按钮一样。 我尝试通过将它们放在一组中来创建
我们有一个应用程序,它具有通过动态组件演示文稿的发布动态生成的菜单。 menu.xml 是由基于结构组的组件模板写出的,并且该组件模板通过事件系统触发以在结构组时发布已发布。 在从 Tridion 2
我是一名优秀的程序员,十分优秀!