We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Installing a javascript on all pages

Installing a javascript on all pages: Whats the best method to add a javascript <script src="..."></script> call to all my pages/ page loads?

Make it part of your base template. Presumably you've got something like a base.phtml that all you other pages extend. Just throw the script tag in there.



326

Thank you!



26.3k
Accepted
answer

Information how to include css & js in phalcon https://docs.phalcon.io/3.4/en/assets.html

Glad to help. If one of the answers solved your problem, please [ Accept Answer ] so the title gets updated with "[ SOLVED ]"