我们在向Sitecore 6.1.0的富文本中插入链接时遇到了问题。当被插入到Sitecore的项目的链接时,其输出为:Sitecore未在页面呈现中解析富文本编辑器的URL
http://domain/~/link.aspx?_id=8A035DC067A64E2CBBE2662F6DB53BC5&_z=z
而不是实际的解决网址:
http://domain/path/to/page.aspx
This article证实,这应该在渲染解决管道:
在Sitecore的6它插入一个特殊格式 链接包含GUID要在该项目提供的特殊 链接链接到,然后 项目的 被替换为实际的链接 该项目
管道在网页中添加的方法ShortenLinks
。配置
<convertToRuntimeHtml>
<processor type="Sitecore.Pipelines.ConvertToRuntimeHtml.PrepareHtml, Sitecore.Kernel"/>
<processor type="Sitecore.Pipelines.ConvertToRuntimeHtml.ShortenLinks, Sitecore.Kernel"/>
<processor type="Sitecore.Pipelines.ConvertToRuntimeHtml.SetImageSizes, Sitecore.Kernel"/>
<processor type="Sitecore.Pipelines.ConvertToRuntimeHtml.ConvertWebControls, Sitecore.Kernel"/>
<processor type="Sitecore.Pipelines.ConvertToRuntimeHtml.FixBullets, Sitecore.Kernel"/>
<processor type="Sitecore.Pipelines.ConvertToRuntimeHtml.FinalizeHtml, Sitecore.Kernel"/>
</convertToRuntimeHtml>
所以,我真的不明白为什么链接仍在ID的格式呈现,而不是作为全SEO-tastic的URL。任何人有任何线索?
谢谢,亚当
要在这个答案了一下, 管道是在这两个地方从提及到一个完整的URL的ID格式为“扩大”扩大。如果使用XSL,sc:field扩展方法将调用renderField管道。如果您使用代码隐藏呈现链接,则可以使用FieldRenderer类。您还可以在布局/子布局(或从FieldRenderer控件派生的任何其他控件)中使用FieldRenderer控件。 这份文件给你的FieldRenderer控制的一些背景: http://sdn.sitecore.net/Reference/Sitecore%206/Presentation%20Component%20Reference.aspx –
2010-02-10 03:33:21
谢谢,我会有 – 2010-02-11 09:04:39