标签: tridion-2011

在Tridion代理查询上应用多种排序

我有一个代理查询,我需要按2个不同的字段排序(使用JSP和2011 SP1)

API具有我正在应用的方法"addSorting".

但是,似乎第二个addSorting调用正在覆盖第一个addSorting调用 - 而不是添加第二个类:

// Sort by Date
CustomMetaKeyColumn customMetaKeyColumnDate = new CustomMetaKeyColumn("date", MetadataType.DATE);
query.addSorting(new SortParameter(customMetaKeyColumnDate, SortParameter.DESCENDING));

// Sort by Owner
CustomMetaKeyColumn customMetaKeyColumnOwner = new CustomMetaKeyColumn("owner", MetadataType.STRING);
query.addSorting(new SortParameter(customMetaKeyColumnOwner, SortParameter.ASCENDING));                 
Run Code Online (Sandbox Code Playgroud)

他们的工作分别很好.

这是预期的吗?addSorting真的是一个setSorting - 只能指定一种排序,或者我错过了一种方法来组合2种排序?

tridion tridion-content-delivery tridion-2011

14
推荐指数
1
解决办法
567
查看次数

预编译核心服务客户端与生成您自己的代理

自2011sp1 Tridion自带预编译核心服务客户端以来.是否仍有理由通过添加服务引用来生成您自己的代理?或者这个旧方法现在正式弃用了吗?

tridion tridion-2011

12
推荐指数
2
解决办法
176
查看次数

Tridion 2011 with DD4T - Component实体上没有可用的MetaData字段

我正在使用Tridion 2011(使用DD4T,提供MVC webapp).

似乎多媒体组件的MetaData字段(在Tridion中的图像模式的元数据选项卡上指定)没有填充DD4T"组件"对象上的相应属性.例如LinkedComponentFields[0].MetadataFields是空的并且Multimedia.AltText为空.

特别是我追求的字段是AltText.但由于整个MetadataFields集合在Component上是空的,因此显然不会通过任何元数据属性.我已经尝试使用TemplateBuilder在组件模板中设置参数(我将"解析宽度和高度"设置为yes,将MergeAction设置为Merge) - 这没有帮助.

有任何想法吗?

tridion dd4t tridion-2011

12
推荐指数
1
解决办法
525
查看次数

在Content Delivery中创建关键字列表

想象一下,我有一个内容类型,它有两个类型类别的字段:一个是分类法作者,另一个是分类法主题,这两个分类法是无关的,它们可能有的唯一共同点是组件本身.

现在我们以访问者的身份访问网站,然后当访问者点击给定的作者时,我想创建一个列表,其中包含组件中存在的所有主题,这些主题也包含特定的作者.

我知道我可以创建一个查询对象,其中包含来自不同分类的两个关键字的标准,以检查它是否检索到任何值,问题是我需要为每个主题执行此操作,即作者和主题1,作者和主题2,作者和主题3等,最后它可能意味着数十个查询,我显然不想这样做.

正如我所看到的那样,分类法API无济于事,因为分类法和它们的关键词完全不相关.任何替代品?

tridion tridion-content-delivery tridion-2011

11
推荐指数
1
解决办法
648
查看次数

上传图片时超时

我目前正在测试Tridion 2011,并且在创建带有上传内容的多媒体组件时遇到了问题(而不是外部).

我填写标题,架构,多媒体类型,从我的系统中选择一个文件,然后单击保存.我收到一条Saving item...信息消息,大约30秒后我会收到一条The wait operation timed out消息.

目录中似乎没有任何错误消息C:\Program Files (x86)\Tridion\log.查看事件查看器,我看到以下有关保存操作的信息

Unable to save Component (tcm:4-738361).
The wait operation timed out

Error Code:
0x8004033F (-2147220673)

Call stack:
System.Data.SqlClient.SqlConnection.OnError(SqlException,Boolean,Action`1)
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException,Boolean,Action`1)
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject,Boolean,Boolean)
System.Data.SqlClient.TdsParser.TryRun(RunBehavior,SqlCommand,SqlDataReader,BulkCopySimpleResultSet,TdsParserStateObject,Boolean&)
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader,RunBehavior,String)
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior,RunBehavior,Boolean,Boolean,Int32,Task&,Boolean)
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior,RunBehavior,Boolean,String,TaskCompletionSource`1,Int32,Task&,Boolean)
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1,String,Boolean,Int32,Boolean)
System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
Tridion.ContentManager.Data.AdoNet.Sql.SqlDatabaseUtilities.SetBinaryContent(Int32,Stream)
Tridion.ContentManager.Data.AdoNet.ContentManagement.ItemDataMapper.Tridion.ContentManager.Data.ContentManagement.IItemDataMapper.SetBinaryContent(Stream,TcmUri)
Tridion.ContentManager.ContentManagement.RepositoryLocalObject.SetBinaryContent(BinaryContent)
Tridion.ContentManager.ContentManagement.Component.OnSaved(SaveEventArgs)
Tridion.ContentManager.IdentifiableObject.Save(SaveEventArgs)
Tridion.ContentManager.ContentManagement.VersionedItem.Save(Boolean)
Tridion.ContentManager.ContentManagement.VersionedItem.Save()
Tridion.ContentManager.BLFacade.ContentManagement.VersionedItemFacade.UpdateAndCheckIn(UserContext,String,Boolean,Boolean)
XMLState.Save
Component.Save
Run Code Online (Sandbox Code Playgroud)

由于另一个问题,我已将Content Manager Snap-In中的超时设置设置为高值(超过10分钟).

BINARIES如果有帮助,内容管理数据库中的表为25GB.

有任何想法吗?谢谢.

编辑1

根据Bart Koopman的建议,我的DBA重建了索引,但并未认为事务日志对性能有任何影响.问题依然存在.

编辑2

我刚刚发现了错误的更多细节

Unable to save Component (tcm:0-0-0).
Timeout expired.
The timeout period elapsed prior to completion of …
Run Code Online (Sandbox Code Playgroud)

tridion tridion-2011

11
推荐指数
1
解决办法
2080
查看次数

取消选中ComponentView中的复选框

我试图通过jquery使用GUI扩展中的文档就绪事件取消选中Tridion的ComponentView中的复选框:

$j(document).ready(function(){
    alert("is loaded");
    var field = $j('[type=checkbox][value=Aceptar]')
    field.attr("checked",false);
    console.log("field = " + field.is(':checked'));
    alert("is checked field = " + field.is(':checked'));
}); 
Run Code Online (Sandbox Code Playgroud)

问题是在"$ j(document).ready"上,字段值似乎没有在ComponentView中加载.我的警报返回该字段未选中,但是当视图完成加载时,复选框被选中.似乎"$ j(document).ready"在加载值之前触发.有谁知道我应该使用哪个事件?

jquery events tridion tridion-2011

11
推荐指数
1
解决办法
152
查看次数

Tridion用户界面2012 - 在创建页面/插入内容时找不到Razor助手

我正在使用Tridion 2011 SP1和Razor模板,但是在创建页面和通过用户界面2012插入内容时遇到了问题.当我尝试使用Tridion.ContentManager.config文件中列出的Razor助手,命名空间和程序集时出现这个问题.不包括在内.

我尝试直接在剃刀模板中添加对助手的引用,一切正常,但我宁愿不必在每个Razor模板中都这样做.

当我尝试通过UI创建页面时,我收到以下Razor错误:

TemplateCompileException: CS0103: The name 'GetBreadcrumbStatus' does not exist 
in the current context Line 64 Column 21: if(GetBreadcrumbStatus())
Run Code Online (Sandbox Code Playgroud)

我的Tridion.ContentManager.config文件包含Razor Mediator的以下内容:

<razor.mediator cacheTime="600" extractBinaries="true">
 <namespaces>
  <add namespace="Tridion.Extensions.Mediators.Razor.Models" /> 
  <add namespace="System.Linq" />
 </namespaces>
 <imports>
  <add import="C:\Program Files (x86)\Tridion\Razor Mediator\Helpers\GeneralHelper.cshtml" />
 </imports>
</razor.mediator>
Run Code Online (Sandbox Code Playgroud)

除非在Razor模板中直接引用,否则有关UI为何不包含帮助程序和名称空间的任何想法?

提前致谢.

razor tridion tridion-2011 razor-mediator

10
推荐指数
1
解决办法
280
查看次数

Tridion 2011:更改页面的文件名,因为它正在发布

美好的一天!

我允许我的内容编辑器将CSS存储为非常基本的组件(通常包含一个称为"代码"的单个多行字段,然后将它们粘贴到其中),然后将这些字段作为组件演示文件添加到具有.css文件扩展名的页面中.创建页面时,用户可以设置一些配置值:minify output(bool),文件名前缀和文件名后缀.最后两个的意图是,如果用户选择在出门的时候缩小CSS,则文件名可以在演示服务器上不同.

除了修改文件名外,我已经完成了所有工作.我不想更改CM中的文件名; 只有它驻留在演示服务器上.我假设这可以在放入CSS页面模板的TBB中完成.我对它采取了一个裂缝,但我想确保没有我遗漏的东西.以下示例只是简写,其中一些可配置值为了简洁而进行了硬编码.

// Create a reference to the Page object in the package.
Page page = this.GetPage();

// Retrieve a reference to the page's file name.
string currentFileName = Utilities.GetFilename(page.FileName);

// Set the published file name on its way out the door.
page.FileName = currentFileName + "_min";

// ???
// Profit.
Run Code Online (Sandbox Code Playgroud)

c# tridion tridion-2011

10
推荐指数
2
解决办法
540
查看次数

SessionAwareCoreServiceClient与CoreServiceClient之间的主要区别是什么?

SessionAwareCoreServiceClient与CoreServiceClient之间的主要区别是什么?

wsHttp是未在服务器上运行的远程应用程序的首选绑定吗?是否可以使用远程Core Service应用程序中的netTcp绑定?为什么不?

Tridion Core Service为我们提供了3个用于XML内容的主要绑定:

  • netTcp - 最快
  • wsHttp - 使用ws*标准并且比basicHttp更好
  • basicHttp - 向后兼容.NET 2.0

我发现这篇文章是关于wsHttp和basicHttp之间区别.另外一个很好的解释为什么netTcp在另一篇文章中更快

tridion tridion-2011

10
推荐指数
1
解决办法
589
查看次数

在GUI扩展中访问"自定义配置"

我正在通过覆盖其中一个javascript文件的行为来进行用户界面的GUI扩展(SiteEdit),以添加一些功能.javascript文件是"/Scripts/Components/ExtComponentField.js",目标是" SiteEdit "扩展:

Tridion.Web.UI.Editors.SiteEdit.Views.Content

一切都适用于扩展,我有我想要的,但现在我正在尝试使用

设置/ customconfiguration/clientconfiguration

扩展配置的节点,使用一些初始化参数,但是没有办法在javascript中访问$ config元素,而Tridion.Core.Configuration.Editors ["myExt"].配置为null.

我已经看到在各种javascripts中使用这种自定义配置,如"Dashboard"或"Footprints",但它是否可以在"内容"上使用它?我在扩展配置上遗漏了什么吗?

tridion tridion-2011

10
推荐指数
1
解决办法
183
查看次数