Adding Js Code On Specific Pages - Question | JoomShaper

Adding Js Code On Specific Pages

pulsar informatique

pulsar informatique

Helix Framework 2 weeks ago

Hi With helix Ultimate with or without SP Page Builder how can I add csutom JS code in the head or body sections for some specific pages only please ?

thanks

Cyril

0
6 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 weeks ago

Hi,

  1. using SPPB - not possible - Raw HTML addon - support only HTML code (!)
  2. Using Helix Ultimate - possible but you have to create template copies (Template Style) add your code and assign to selected menu items.

Alternative way would be to find a custom code plugin or custom code module (not Joomla core one!) and use them.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 weeks ago

If we talk about custom code module -- I recommend for example: HD-AnyCode

I mentioned about this also inside SPPB documenation.


You can use also Phoca Site plugin and hire developer to make a small customization inside it that allows you to use custom code on selected menu items only.

0
pulsar informatique
pulsar informatique
Accepted Answer
2 weeks ago

HI

thanks Paul

With HD Anycode I'm not sure we can tell a JS code should be in the HEAD or BODY section

Cyril

0
pulsar informatique
pulsar informatique
Accepted Answer
2 weeks ago

Ok Paul, making a new style and assign it to specific pages was the easiest way at the end of the day. In the new copied style I could add the custom code in the head and body sections with the built in template features

thanks a lot

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 weeks ago

yes, 2nd method is very common (and good) - if you need this code on specific subpages only and you don't make template layout (or other) changes too often to forget about them in both theme styles.

You're welcome. Have a nice day.

0
Pavel
Pavel
Accepted Answer
1 week ago

To add JS to before </ body>, the standard HTML module + JCE editor can be used, in the Debug position on the required pages.

0