mod_hikashop title always as h2, ignored Header Tag

  • Posts: 22
  • Thank you received: 5
  • Hikashop Business
4 months 3 weeks ago #357370

-- HikaShop version -- : 5.0.2
-- Joomla version -- : 4.4.1

Hi,
to avoid unwanted duplicated h2 tags, I'm trying to set mod_hikashop Title (related products) as

<div>My own title</div>
instead of
<h2>My own title</h2>
but it seems that the module ignores Header Tag module's setting.

Would you help me, please?
Thank you very much
Kind regards

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

  • Posts: 81597
  • Thank you received: 13081
  • MODERATOR
4 months 3 weeks ago #357372

Hi,

The title of modules is displayed by the template module chrome, not by the module itself.
And I don't think Joomla allows you to add HTML tags in module titles.
You can read more about modules chrome here:
docs.joomla.org/applying_custom_module_chrome
You might want to check with your template provider what they recommend as templates can potentially display modules in different ways.

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

  • Posts: 22
  • Thank you received: 5
  • Hikashop Business
4 months 3 weeks ago #357383

nicolas wrote: Hi,

The title of modules is displayed by the template module chrome, not by the module itself.
And I don't think Joomla allows you to add HTML tags in module titles.
You can read more about modules chrome here:
docs.joomla.org/applying_custom_module_chrome
You might want to check with your template provider what they recommend as templates can potentially display modules in different ways.


Hi Nicolas, thank you for your reply.
I'm sorry, I cannot understand. What is the option "Header Tag" in mod_hikashop for?

Thanks!

Attachments:
Last edit: 4 months 3 weeks ago by bellaidea.

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

  • Posts: 81597
  • Thank you received: 13081
  • MODERATOR
4 months 3 weeks ago #357384

Hi,

That's a setting of Joomla for all the modules. It's not a setting we added to the modules included in HikaShop.
As per the Joomla documentation on that :

Header Tag. The HTML tag to use for the modules header or title. This can be an h1, h2, h3, h4, h5, h6 or a p tag. Note that you must use a module style (chrome) of html5 or add your custom module styles in <mytemplate>/html/modules.php.

docs.joomla.org/Help4.x:Admin_Modules:_Title
So you're right that this setting should define what tag is used around the title of the module.
But as explained there, that setting is taken into account in the chrome of the module.
And so, if this setting is ignored, it's probably because of the code in the chrome of the modules in your template.
And that's why I recommended checking with your template provider.

The following user(s) said Thank You: bellaidea

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

  • Posts: 22
  • Thank you received: 5
  • Hikashop Business
4 months 3 weeks ago #357418

nicolas wrote: So you're right that this setting should define what tag is used around the title of the module.
But as explained there, that setting is taken into account in the chrome of the module.
And so, if this setting is ignored, it's probably because of the code in the chrome of the modules in your template.
And that's why I recommended checking with your template provider.


Ok, I see but this option works properly for the same module mod_hikashop in every position except when used as "Modules under the product page" in HikaShop. In this case <h2> is always choosen as title tag, whatever "Header Tag" option is set.

That makes me think that template (Helix Ultimate) is ok but for some reason, when HikaShop uses that module "under the product page", overrides "Header Tag" option settings.

Thank you again.

Last edit: 4 months 3 weeks ago by bellaidea.

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

  • Posts: 81597
  • Thank you received: 13081
  • MODERATOR
4 months 3 weeks ago #357421

Hi,

On that same options page, you have the setting "Module style" which defines which chrome to use.
For modules loaded under the product page, the style is forced to "none".

So that means the template's chrome for the "none" style doesn't take into account the header tag setting.
I suppose your template uses other styles by default for its module positions.

So again, I think it would make sense that the "none" chrome of your template takes into account the header tag setting.

Now, since the module area there is displayed by HikaShop, you can also do a view override of product / show via the menu Display>Views and change the line:
echo JModuleHelper::renderModule($module);
to:
echo JModuleHelper::renderModule($module, array('style'=>'xxx'));
where xxx is a style of your template and that should do it too.

The following user(s) said Thank You: bellaidea

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

Time to create page: 0.062 seconds
Powered by Kunena Forum