End of Support for Joomla 3 - Forum closed
Which file to add custom javascript to head tag?
- sedonagate
- Offline Topic Author
- Junior Boarder
- Posts: 22
- Thank you received: 1
Which file to add custom javascript to head tag? was created by sedonagate
Posted 8 years 9 months ago #11926
Hello, I want to add some custom javascript to the head tag of my template (my template was made copying the Pasta Template and renaming it in the admin).
The usual index.php file is not it. What is the right file to add javascript to my head tag so that it is on every page of my site? The javascript I want to add is Google Analytics outbound link tracking code. Thank you for your help.
The usual index.php file is not it. What is the right file to add javascript to my head tag so that it is on every page of my site? The javascript I want to add is Google Analytics outbound link tracking code. Thank you for your help.
by sedonagate
Please Log in or Create an account to join the conversation.
- joomlaplates
- Offline
- Moderator
- Posts: 8807
- Thank you received: 1732
Replied by joomlaplates on topic Which file to add custom javascript to head tag?
Posted 8 years 9 months ago #11930
PLease use the file:
..layouts/template.php
yootheme.com/themes/documentation/developers/file-structure
..layouts/template.php
yootheme.com/themes/documentation/developers/file-structure
Dokumentation:
www.joomlaplates.de/dokumentation.html
www.joomlaplates.de/dokumentation.html
by joomlaplates
Please Log in or Create an account to join the conversation.
- sedonagate
- Offline Topic Author
- Junior Boarder
- Posts: 22
- Thank you received: 1
Replied by sedonagate on topic Which file to add custom javascript to head tag?
Posted 8 years 9 months ago #11936
Question: Is this the same as:
layouts/theme.php
Thanks for your help!
layouts/theme.php
Thanks for your help!
by sedonagate
Please Log in or Create an account to join the conversation.
- joomlaplates
- Offline
- Moderator
- Posts: 8807
- Thank you received: 1732
Replied by joomlaplates on topic Which file to add custom javascript to head tag?
Posted 8 years 9 months ago #11940
Yes, sorry I was wrong.
In the Pasta theme you have to use this file:
../jp-pasta/layouts/theme.php
In the Pasta theme you have to use this file:
../jp-pasta/layouts/theme.php
Dokumentation:
www.joomlaplates.de/dokumentation.html
www.joomlaplates.de/dokumentation.html
by joomlaplates
Please Log in or Create an account to join the conversation.
Moderators: joomlaplates