The head_scripts.post.tpl file should work for you. Just make sure you clear the cache so it will be seen.
Note that you may want to add a data-no-defer attribute to the 'script' tag like:
This will prevent the site JS from pushing the script to the end of the page load. If your script doesn't need to be loaded before html (but before document.ready) then don't use the data-no-defer for better page ranking.
You are right, head_scripts.post.tpl does work well. Thanks
The head_scripts.post.tpl file should work for you. Just make sure you clear the cache so it will be seen.
Note that you may want to add a data-no-defer attribute to the 'script' tag like:
This will prevent the site JS from pushing the script to the end of the page load. If your script doesn't need to be loaded before html (but before document.ready) then don't use the data-no-defer for better page ranking.
Thanks for the info, I had only been doing &ctpl after editing the tpl file as &cc&ctpl take quite a bit longer to reload. As you say, manually deleting the //cache folder is the ultimate.
Thanks for the info, I had only been doing &ctpl after editing the tpl file as &cc&ctpl take quite a bit longer to reload. As you say, manually deleting the //cache folder is the ultimate.
Yes, manually deleting the /var/cache folder is often needed to make the changes show. But most of the time, &cc&ctpl rather than just &ctpl works also.
&cc - clears the registry cache. If you "add" a new hook file or template, you need to &cc to get that page into the registry cache so it will be seen by the system and correlated to the appropriate template.
&ctpl - clears the template cache and will remove the smarty compiled cached pages. This should be done if you change the "content" of an existing template and do NOT have the "Rebuild cache automatically" turned on.
Note that updates to dynamic pages (I.e. layout manager and template editor) will remove the template cache entries for those modified pages (or blocks) only and then only those will be rebuilt when referenced.