javascript - Calling Script.Require in Shape view returned from IResultFilter not working in Orchard CMS? -


i'm writing own module needs scripts loaded on pages, both on front-end , dashboard, user authorized edit content. i've written implementation of iresultfilter adds shape 'tail' zone in site's theme.

the shape added page correctly , ok except 1 thing. in same shape i'm trying call script.require on few scripts i've added resourcemanifest, they're not being loaded in page.

@{     script.require("orchardtinymce");     script.require("jquerycolorbox"); } 

if place same code in view that's not rendered using iresultsfilter implementation added page. i'd rather keep bit of code in it's current view though 2 alternates further down line require same scripts , don't want duplicate it.

does have ideas how scripts register? in advance help.

i'm not sure why isn't working in view, use resource manager add scripts filter:

_resourcemanager.require("script", "orchardtinymce").atfoot(); 

inject resource manager per usual:

private readonly iresourcemanager _resourcemanager; public myfilter(iresourcemanager resourcemanager) {   _resourcemanager = resourcemanager; } 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -