First, I have tried for several hours to weed through the various search results of the keywords above. I've found several things that seem to answer this but they're for Drupal 7; one of those was posted on 2012 and I am pretty sure things are gosh darn different now.
I am not a programmer, nor a web dev professional; I am just someone trying to update a very old site that worked fine but that needs to be re-freshen. I have some experience as a content manager with Drupal 6, but I have never got into coding, building modules, or editing template files. I am not afraid to copy a file, open it in an editor, change this or that, cut or paste, but I don't see myself being able to build a module to do this.
Maybe there's no way to do this "easily."
I want to replicate a Google map with a custom search feature and some other tweaks. It works nicely in the existing site and it is basically 3 parts: a <script>code here</script>
in <head>
, some HTML and script in the body, and the following markup for <body>
.
<body onload="load(); curvycurvy()" onunload="GUnload()">
All I am hoping to do is properly add this code on my new Drupal 8 front page. I've used the Asset Injector module to add the bulk of the script to <head>
and used <front>
to restrict it to the front page. I have chosen PHP for the content and it seems to retain the script.
Is there a way to add this code above into the body? Failing that, is there a way to provide similar functionality?
I was hoping that the Asset Injector has some tools like, "Add to the Body Tag" or such, that would have been exactly what I need.
www.mysite.com/admin/appearance
to check. If you are using a custom theme, it can be done fairly easily with a little bit of code.