开发者

Joomla - Conditional Load of Plugin based on Menu Item

开发者 https://www.devze.com 2023-02-09 04:31 出处:网络
Is it possible to load a System Plugin conditionally, based on menu items? e.g. some pages in my site are 开发者_开发百科conflicting with the Mootools Upgrade plugin, which is required for Kunena.I w

Is it possible to load a System Plugin conditionally, based on menu items?

e.g. some pages in my site are 开发者_开发百科conflicting with the Mootools Upgrade plugin, which is required for Kunena. I want to only include the plugin on the Kunena pages.

Thanks Geoff


There is no native way of doing this.

To keep things the way they are now and not have conflicts in future updates -create a Plug-in that load last. It's job is to check JDocument and see script was loaded and if so Remove it from there if page is non Kunena or vise versa... E.g. Disable the kunena plug-in, and in your plug-in check if page is Kunena... if so load that plug-in programmatically.

0

精彩评论

暂无评论...
验证码 换一张
取 消