Add Plugin into Action dynamically

  • Hi, I'm trying to create a dynamically loading plugin via action, BUT something doesn't work. Where is the error? Any help will be gratefully accepted. Regards, Gumir J

    something like this:

    Code
    	<action name="myction" scope="local">
        addplugin(myplugin); 
    	set(plugin[myplugin].url,'%FIRSTXML%/myplugin.js');
    	set(plugin[myplugin].keep,true);
        plugin[myplugin].load();
    	</action>
  • Hi,

    it might need some time until the plugin is loaded, so better call your plugin actions after the plugin is loaded, e.g.:

    Code
    <action name="myction" scope="local">
        addplugin(myplugin); 
    	set(plugin[myplugin].url,'%FIRSTXML%/myplugin.js');
    	set(plugin[myplugin].keep,true);
    	set(plugin[myplugin].onloaded,
           plugin[myplugin].load();
        );
    </action>


    Best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!