Adding JS Code On Specific Pages - Question | JoomShaper

Adding JS Code On Specific Pages

pulsar informatique

pulsar informatique

Helix Framework 3 years 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
7 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 3 years ago #13428

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 3 years ago #13429

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
3 years ago #13432

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
3 years ago #13434

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 3 years ago #13466

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
3 years ago #13533

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

0
B
blue_Shift
Accepted Answer
2 weeks ago #153844

If only advanced module manager didn't make a complete dog's breakfast of selecting a menu item - my client cannot make heads or tails of it.

1