FOG 1.6 own plugin
-
Hello,
How can I add JavaScript and CSS files to my own custom plugin in FOG 1.6?
My plugin has several submenus, and I would like all of them to use the same JavaScript and CSS files. I want to avoid creating duplicate files for each submenu or copying the same files multiple times under different names.
For example:
index.php?node=myplugin&sub=listshould load:
myjs.js mycss.cssand
index.php?node=myplugin&sub=somethingshould also load:
myjs.js mycss.cssWhat is the recommended way to include shared JS and CSS files across all pages/submenus of a custom FOG 1.6 plugin?
-
@Valer I think we need to understand what this plugin is doing.
CSS isn’t something we’ve allowed to be injectable though it could be.
You can still use your own CSS but that’s more at the FOG Configuration -> FOG Setting -> FOG_THEME, but you would need to put it on your server in a location you type the path too here.
https://docs.fogproject.org/en/latest/development/plugin-development
This is a good toolkit for understanding how to build your own plugin.