How to add onload="init();" inside the <body> of a page

Hi! I’m new to grav and am trying to figure out how to add onload=“init();” inside the of a page.

thanks for your help!

@cameronl, You should do that inside the Twig template used for the page.

I don’t see any twig files in my gantry5 helium template. how do I add to tag in gantry5 template? thanks!

look like I figured it out. Body Attributes in page settings. allows users to customize the attributes for the <body> tag as well as inject content right after <body> opens or right before </body> closes.

@cameronl, Always a good idea to add to the question that you’re using Gantry… :wink:
Less then a handful users on this forum use Gantry (and I’m not one of them). It’s quite different from how sites are being build with Grav itself.

Gantry has its own forums by the way.

yes thanks I am learning for sure. cheers.