True.
Also closing the src attribute helps to load the script.
Also closing the src attribute helps to load the script.
sorry should have given more details ...
trying to load the .js when a user is NOT logged in and placing the following code (changed it) into the header.php.
The page does not load and I think I am missing some closing statement somewhere.
thanks
trying to load the .js when a user is NOT logged in and placing the following code (changed it) into the header.php.
The page does not load and I think I am missing some closing statement somewhere.
thanks
Indeed @noXstyle was correct in their statement. You are missing a closing quote to src
Try this instead
Try this instead
// Note the closing quote after mycode.js echo ('<script src="' . $this->getThemePath() . '/js/mycode.js"></script>');
Mnkly, thank you it worked
also thanks to noXstyle for the help.
also thanks to noXstyle for the help.
Makes me feel like you may not not be in either the Block View(view.php or a block) or a Page Type View(default.php, right_sidebar.php etc).
If you are getting an error like
Call to undefined method...
Then you may be in a the controller or somewhere else.
Beyond that, giving some additional information may help, as that doesn't look incorrect as it stands to me.
EDIT: @noXstyle for the win.