Ektron의 JS.RegisterJSInclude를 사용하여 자바 스크립트 파일을로드하고 싶지만 JavaScript의로드 순서를 설정하고 싶습니다.Ektron v8.6에서 JS.RegisterJSInclude()를 사용하여로드 순서를 설정할 수 있습니까?
Ektron.Cms.CommonApi _api = new Ektron.Cms.CommonApi();
// I'd like this to be called first every time
JS.RegisterJSInclude(this, _api.SitePath + "/js/first.js", "FirstJS");
JS.RegisterJSInclude(this, _api.SitePath + "/js/atk.js", "AdobeTypeKitJS");
JS.RegisterJSInclude(this, _api.SitePath + "/js/file2.js", "File2JS");
// I'd like this to be called last every time
JS.RegisterJSInclude(this, _api.SitePath + "/js/last.js", "LastJS");
이러한 파일은 호출 순서대로로드됩니다. 마스터 페이지, 웹 폼 또는 위젯에서 호출되는지 여부에 관계없이 호출 순서를 제어하고 싶습니다. 예를 들어
Ektron.Cms.CommonApi _api = new Ektron.Cms.CommonApi();
JS.RegisterJSInclude(this, _api.SitePath + "/js/widget.js", "WidgetJS");
으로 전화를 걸면 나는 항상 'LastJS'앞에 오기를 원합니다.
Ektron v8.6에서도 가능합니까? 우선 순위를 지정하는 방법이없는 -
답변 해 주셔서 감사합니다. 이것은 이상적은 아니지만 우리가하는 일에 효과적입니다. – whoacowboy