uri - Using Joomla's baseurl to import javascript -


I'm trying to use Joomla's besurle to link my javascript files like this:

  & lt; Script type = "text / javascript" src = "& lt ;? php echo $ this- & gt; basal? & Gt; /templates/js/music.js" & gt; & Lt; / Script & gt;  

Highlights my code, though it seems weird and I'm wondering if someone knows how I should write it?

If I use everything in the CSS link it looks okay:

    

Many thanks!

In your CSS and JS code it appears that your template is music It is called

Therefore, you should have the name of your template as part of the path. Use / templates / js / for / template / music / js /

  & lt; Script type = "text / javascript" src = "& lt ;? php echo $ this-> basal ;? & gt; /templates/music/js/music.js" & gt; & Lt; / Script & gt;  

Comments