Viewing 1 post (of 1 total)
  • Author
    Posts
  • stutteringp0et Friend
    #178613

    Javascript files, Javascript declarations, CSS files, or CSS declarations added to the document object by plugins are lost. Joomla included templates operate normally, but templates using JAT3 lose the extra scripts unless they’re added in the onAfterInitialise or onBeforeCompileHead. Any script or style added in onAfterRoute, onAfterDispatch or onBeforeRender is lost when using JAT3, but appears normally when using Joomla templates (or Artisteer, or Gantry, or many others).

    Example:
    JFactory::getDocument()->addScript(‘/path/to/script.js’);
    JFactory::getDocument()->addScriptDeclaration(‘alert(“hello”);’);
    JFactory::getDocument()->addStyleSheet(‘/path/to/stylesheet.css’);
    JFactory::getDocument()->addStyleDeclaration(‘body { background-color:#fff; }’);

    Again, it’s possible to get them to show up, but only if they’re added in the onAfterInitialise or onBeforeCompileHead methods of the plugin.

    Is there any particular reason the JAT3 framework loses these scripts and styles during any event that occurs up to onBeforeRender?

Viewing 1 post (of 1 total)

This topic contains 1 reply, has 1 voice, and was last updated by  stutteringp0et 12 years, 5 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum