我有一个包含一些CSS和JS的子文件夹的小部件。我想通过小部件而不是外部注册这些文件。如何使用JS.RegisterJSInclude()与Ektron v9?
首先,我把它们放在哪里。 page_load,pre render,init ???
这是我的注册脚本函数,我尝试从页面加载调用并预渲染没有成功。
private void RegisterScripts()
{
var api = new CommonApi();
var sitepath = api.SitePath;
Css.RegisterCss(this, sitepath + "widgets/mywidget/mything.css", "MyCSS");
JS.RegisterJSInclude(this, sitepath + "widgets/mywidget/thing.min.js", "MyJS1");
JS.RegisterJSInclude(this, sitepath + "widgets/mywidget/otherthing.js", "MyJS2");
JS.RegisterJSInclude(this, sitepath + "widgets/mywidget/morethings.js", "MyJS3");
}
即时通讯相当确信我所做的一切设置在这里: http://documentation.ektron.com/cms400/v8.50/mobile_help/Advanced/Content/Widget%20Chapter/Customizing%20Widgets/Customizing_Widgets.htm
谢谢,看起来不错 – JAG