Sitecore无法解析页面渲染中的富文本编辑器URL [英] Sitecore not resolving rich text editor URLS in page renders

查看:132
本文介绍了Sitecore无法解析页面渲染中的富文本编辑器URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在Sitecore 6.1.0中将链接插入富文本时遇到问题。当插入指向sitecore项目的链接时,它将输出为:

We're having issues inserting links into rich text in Sitecore 6.1.0. When a link to a sitecore item is inserted, it is outputted as:

http://domain/~/link.aspx?_id = 8A035DC067A64E2CBBE2662F6DB53BC5& _z = z

而不是实际解析的网址:

Rather than the actual resolved url:

http://domain/path/to/page.aspx

本文确认应该在渲染管道中解决这个问题:

This article confirms that this should be resolved in the render pipeline:


在Sitecore 6中它会插入一个特殊的
格式的链接,其中包含您想要链接到的项目的Guid
,然后是
当项目呈现时,特殊
链接被替换为实际链接
到项目

in Sitecore 6 it inserts a specially formatted link that contains the Guid of the item you want to link to, then when the item is rendered the special link is replaced with the actual link to the item

管道在web.config中添加了 ShortenLinks 方法

The pipeline has the method ShortenLinks added in web.config

<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 urls。有人有任何线索吗?

So I really can't see why links are still rendering in ID format rather than as full SEO-tastic urls. Anyone got any clues?

谢谢,Adam

推荐答案

这将是如果您使用sc:fld呈现字段值,则为默认行为。这是Sitecore 5留下的遗留行为,它没有替换项目链接中的guid。

This will be the default behaviour if you are using sc:fld to render field values. This is legacy behaviour left from Sitecore 5 which did not replace the guids in item links.

如果您想使用Sitecore 6的新功能,则必须使用sc:field代替

If you want to use Sitecore 6's new functionality, you must use sc:field instead

这篇关于Sitecore无法解析页面渲染中的富文本编辑器URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆