Is it possible to add scripts into a widget template
-
I have a widget template called "carousel-3d.tpl", and because carousel-3d depends on jquery, modenizr and other front-end components, I guess is there any way to add scripts into this widget? I tried, but never able to render
extends->widgets
page, it freezes. I know I am a newbie, does anyone could help me solve this problem? -
You could try adding those scripts in the Custom Header section from an external CDN
-
You say
extends->widgets
freezes, if you are trying to render the widget in the ACP, you may need to add the dependent scripts to theacpScripts
section of yourplugin.json
I don't think the Custom Header is executed in the ACP.
-
@psychobunny Custom header is a way, but not good enough, in fact I am writing a plugin which act somewhat like
nodebb-plugin-widgets-essential
, that is to add one of our custom widget.