Add Module Position In Section - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

Add Module Position In Section

BB

Bumble Bee

Template 4 weeks ago

Hi there, I am on J5, Helix Ultimate 2.1.3, and SP Page Builder Pro.

I would like to add a module position in the < head > section of my pages. I have created the modules, now I just need to assign the position.

I have been trying to determine where I should add codes but unable to find where the head codes are located. e.g. Where is this: <jdoc:include type="head" /> Where to add this: <jdoc:include type="modules" name="head-code" style="none" />

Can you please advice how I can go about doing this? Thank you very much.

0
4 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 4 weeks ago #207987

Hi.

Joomla Modules in <head> - never heard. Are 100% sure that is good idea? In my opinion is not recommended, it may and it will damage HTML5 layout structure.

Tip! If you need custom HTML code in <head> HERE </head> just use Template Options > Custom Code (in Helix Ultimate). Or install PhocaSite plugin.


Sorry, but I cannot help more with php code customization! Support Policy.

Ask also 2nd J!Expert from your city/country who will help you with code or convince you that it's a bad idea.

0
BB
Bumble Bee
Accepted Answer
3 weeks ago #208003

Hi Paul, thanks so much for your input. My aim is to add page specific code in the head section.

Using Template Options > Custom Code and PhocaSite plugin applies changes globally across the site. I've explored these 2 options already...

I have created modules for each page, and I would like to assign them to the head section. Does the template allow assigning a module to the head section? This is the reason for my question about how to add a new position within the head section.

Alternatively, are there any other available methods to achieve this? For example, something similar to how meta settings work, allowing custom code to be added to the head section for each article (in SP Page Builder Pro)?

Awaiting your advice. Thank you very much.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 3 weeks ago #208013

Does the template allow assigning a module to the head section?

No, also Casiopea template do not allows that. It request index.php file customization from template, and it's on your hands only.


Even if in Custom Module you use style "none" that module code will be that

<div id="mod-custom122" class="mod-custom custom">
    AD CODE</div>

and using <div> </div> in <head> is against W3C Validation and treated a syntax error.

0
BB
Bumble Bee
Accepted Answer
3 weeks ago #208312

Ok noted. Thank you very much for all your help. I will figure this out.

0