- Posts: 32
- Thank you received: 3
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Load custom javascripts to bottom of body tag from config.xml?
- jackrabbithanna
-
Topic Author
- Offline
- Junior Member
-
Less
More
2 years 2 months ago #210343
by jackrabbithanna
I'm wanting to add some additional javascript to the bottom of the body tag instead of the head.
Is there a standard way to do this from the config.xml with <add> tags .. ?
Maybe a "best" way to do this?
Thanks in advanced!
Is there a standard way to do this from the config.xml with <add> tags .. ?
Maybe a "best" way to do this?
Thanks in advanced!
The topic has been locked.
2 years 2 months ago #210345
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Load custom javascripts to bottom of body tag from config.xml?
At the end of the "layout_global.twig" before </body>?
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- jackrabbithanna
-
Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 32
- Thank you received: 3
2 years 2 months ago #210347
by jackrabbithanna
Replied by jackrabbithanna on topic Load custom javascripts to bottom of body tag from config.xml?
correct .. I know I could hardcode something, just wondering if there's a way to specify from config.xml of theme or if there are existing best practices.
The topic has been locked.
2 years 2 months ago #210356
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Load custom javascripts to bottom of body tag from config.xml?
What is the difference between writing it into the twig file or into the config file of a theme? Both is "hard coded" in a way, isn't it.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
2 years 2 months ago #210357
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Load custom javascripts to bottom of body tag from config.xml?
As far as I know, it cannot be done via config.xml.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- jackrabbithanna
-
Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 32
- Thank you received: 3
2 years 2 months ago #210362
by jackrabbithanna
Replied by jackrabbithanna on topic Load custom javascripts to bottom of body tag from config.xml?
IDK what all differences may be, that's why I ask. When I develop something, I aim for "best practices", and understanding the infrastructure best I can.
I know in 3.x we can add js via config.xml and not having to put in head manually .. Another difference maybe inheritance with the <replace> tag.
It is becoming more standard to load JS in bottom of body tag for quicker first paint times.
No big deal I'll pop it in there manually.
Thanks everybody!
I know in 3.x we can add js via config.xml and not having to put in head manually .. Another difference maybe inheritance with the <replace> tag.
It is becoming more standard to load JS in bottom of body tag for quicker first paint times.
No big deal I'll pop it in there manually.
Thanks everybody!
The topic has been locked.