Search code examples
joomlajoomla1.7jumi

Joomla include js using jumi


I can't manage to include a javascript in an article(directly in the wysiwyg editor) using jumi.

What I've tried:

{jumi /path/to/file.js}
{jumi [/path/to/file.js]}
{jumi /path/to/file.js}{/jumi}
{jumi [/path/to/file.js]}{/jumi}

"file.js" is located in a folder in the same directory as Joomla.

I'm using joomla v. 1.7.3 and Jumi 2.0.6.

Is there something I'm missing?


Solution

  • I've found a workaround, it's not elegant, but it works:

    create two files, 1 php which will echo a script element and a javascript file that you wish to include

    in the article put:

    {jumi [path/to/a/php/file.php]}
    

    the php file should be

    <?php
      echo "<script type=\"text/javascript\" language=\"javascript\" src=\"path/to/js/file.js\"></script>"
    ?>
    

    Enjoy!