Custom code at <body>

Custom code at <body> was created by ClaudioRomeo

Posted 6 years 4 months ago #46308
In the Custom code window I can write code that will be inserted before the </body> tag.
How can I insert the code just after the <body> tag? In other words, at the beginning of the <body></body> section?

Counselor for better people in a better company

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Custom code at <body>

Posted 6 years 4 months ago #46309
Hi
you can use a "custom code" block at the beginning of your template :)
CEd

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Replied by ClaudioRomeo on topic Custom code at <body>

Posted 6 years 4 months ago #46310
OK, this works, but...
I need to insert the Google Tag Manager snippet, that has to be inserted just after the <body> tag without any code before it.
If I use a custom code block, Template Creator insert its code inside a wrapper and a block.
If so, the Google check fails, telling that the snippet is in a wrong position.
Maybe I'm getting confused?
Is there a workaround for this impasse?

Counselor for better people in a better company

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Custom code at <body>

Posted 6 years 4 months ago #46311
that's right. Actually I don't have any solution for this ...the only remaining solution would be to use a plugin and inject the code with onAfterRender event

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Replied by ClaudioRomeo on topic Custom code at <body>

Posted 6 years 4 months ago #46312
Oops!
This sounds bad...
So, we all are waiting for the onAfterRender CK plugin.
;)

Counselor for better people in a better company

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Custom code at <body>

Posted 6 years 4 months ago #46313
I'm not telling that I will do a such plugin ... this was just an idea for you ;)

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Time to create page: 0.713 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 252 guests and no members online