gpt4 book ai didi

sitecore - 在 Sitecore 6 中,如何从自定义 Sitecore 应用程序的内容编辑器中打开内容项?

转载 作者:行者123 更新时间:2023-12-02 05:04:13 26 4
gpt4 key购买 nike

我有一个基本上是搜索屏幕的 Sitecore 自定义应用程序。我希望用户能够单击搜索结果中的链接并在内容编辑器中打开该内容项。有谁知道如何做到这一点?

最佳答案

你需要做的是使用fo参数和项目的id作为内容编辑器路径末尾的参数值,例如:

http://localhost/sitecore/shell/Applications/Content%20Editor.aspx?fo={4142d44b-2237-4795-b219-85e70420fced}

在评论后编辑:如果你想在 Sitecore 中使用内容编辑器启动一个新的应用程序,你可以使用方法:

Sitecore.Text.UrlString parameters = new Sitecore.Text.UrlString();
parameters.Add("id", item.ID.ToString());
parameters.Add("fo", item.ID.ToString());
Sitecore.Shell.Framework.Windows.RunApplication("Content Editor", parameters.ToString());

这在帖子 Launch Content Editor from code 中有描述

这是 Mark Ursino 的另一个解决方案,它使用 javascript onclick 事件做同样的事情:http://firebreaksice.com/link-directly-to-a-sitecore-item-in-a-custom-editor/

关于sitecore - 在 Sitecore 6 中,如何从自定义 Sitecore 应用程序的内容编辑器中打开内容项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16528561/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com