gpt4 book ai didi

c# - 如何在 EPiServer 7 中实现 dijit

转载 作者:太空宇宙 更新时间:2023-11-03 13:52:23 25 4
gpt4 key购买 nike

我一直在尝试在 EPiServer 7 中使用 Dojos Dijit 实现小部件。我知道 dojo/dijit 是如何工作的,但我如何在 EPiServer CMS 7 中实现它?我的项目是一个 MVC 项目。我试过查看本指南 ( http://world.episerver.com/Blogs/Linus-Ekstrom/Dates/2012/10/Creating-a-Dojo-based-component/ ),但我找不到他在 C# 类中使用的 namespace 。我试图找到其他教程,但运气不佳。

有谁知道如何执行此操作或可以将我链接到教程吗?

最佳答案

我在 EPiServers 论坛上发布了同样的问题并弄明白了。

WidgetType 属性中的数据出了问题。

[Component(
PlugInAreas = "/episerver/cms/assets",
Categories = "cms",
WidgetType = "mycomponents.testModule", //was wrong, I had to define "mycomponents".
Title = "test component",
Description = "A componenet")]
public class testModuleComponent
{
}

我必须定义一个 dojo 可以识别的命名空间。我在 module.config 中做了这个。这是我的模块配置:

<?xml version="1.0" encoding="utf-8"?>
<module>
<dojoModules>
<add name="mycomponents" path="~/ClientResources/Scripts" />
</dojoModules>
</module>

Scripts 是包含 dojo 脚本的文件夹。我将 ~/ClientResources/Scripts 定义为名为 mycomponents 的命名空间的根。

EPiServer 自动为您包含 dojo,因此您不必自己做。

查看此线程: http://world.episerver.com/Modules/Forum/Pages/thread.aspx?id=63255&pageIndex=1#reply .

关于c# - 如何在 EPiServer 7 中实现 dijit,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13345233/

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