0

when using addScriptDeclaration, the script is added in the first tag that is found inside the HEAD tag.

Is it possible to add it just before </HEAD>?

1
0

Yes you can put in the head, but its most common to put it before the tag

2
  • The script must be in the template index.php, or you can use Sourcerer from Regular Labs Sep 17 '20 at 21:35
  • The system has flagged this post as being low-quality (because of its length/content). I think perhaps the OP is asking about how to ensure that the new declaration is appended to the <head></head> as the last child inside of it. In other words, the OP is trying to ensure that the declaration comes after all other declarations in the head tag. Please do not extend your answer's advice by adding comments. When you have additional relevant details to add, please edit your post so that the whole story is in one cohesive place (then delete your comment).
    – mickmackusa
    Sep 17 '20 at 22:30
0

There is a "dirty" way to do this. Use regular labs rereplacer and simply replace in the head and replace

with something before it

https://www.regularlabs.com/extensions/rereplacer

The swiss army penknife of the joomla world

1
  • Due to a DNS issue, the regularlabs site is currently not loading (for me). Please demonstrate how to replace the head using rereplacer for those who may have no experience with the extension.
    – mickmackusa
    Sep 23 '20 at 22:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.