Keyword

How to change the k2 modules title from h3 to h2?

  • Litho-Verlag e.K.
  • Litho-Verlag e.K.'s Avatar Topic Author
  • Offline
  • Senior Member
More
2 weeks 19 hours ago #178537 by Litho-Verlag e.K.
How to change the k2 modules title from h3 to h2? was created by Litho-Verlag e.K.
where can I change the title  of a k2 Content modules from h3 to h2 permanently, or can create a override?
Thanks
Litho

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

  • Goble002
  • Goble002's Avatar
  • Away
  • Premium Member
More
2 weeks 19 hours ago #178538 by Goble002
Open K2 Module > Advanced > Header Tag

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

  • Litho-Verlag e.K.
  • Litho-Verlag e.K.'s Avatar Topic Author
  • Offline
  • Senior Member
More
2 weeks 18 hours ago #178539 by Litho-Verlag e.K.
Replied by Litho-Verlag e.K. on topic How to change the k2 modules title from h3 to h2?
Hi thanks for the quick reply, but that was too simple...
In the source text the headline is still in h3, after clearing the cache.
litho

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

  • Goble002
  • Goble002's Avatar
  • Away
  • Premium Member
More
2 weeks 18 hours ago #178540 by Goble002
Check if you have template overrides in

template/your-template/html/mod_k2_content/Default/default.php

If the file exists, check about line 15. It might include h3 there.

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

  • Litho-Verlag e.K.
  • Litho-Verlag e.K.'s Avatar Topic Author
  • Offline
  • Senior Member
More
1 week 6 days ago - 1 week 6 days ago #178544 by Litho-Verlag e.K.
Replied by Litho-Verlag e.K. on topic How to change the k2 modules title from h3 to h2?
Hi Goble002

sorry to nerv you.
In the meantime I've installed a second modules template, which works fine. I've just changed the place for the date informations.
so my line 15

looks so: <div id="k2ModuleBox<?php echo $module->id; ?>" class="k2ItemsBlock<?php if($params->get('moduleclass_sfx')) echo ' '.$params->get('moduleclass_sfx'); ?>">

If tried to change it to: <h2><div id="k2ModuleBox<?php echo $module->id; ?>" class="k2ItemsBlock<?php if($params->get('moduleclass_sfx')) echo ' '.$params->get('moduleclass_sfx'); ?>"> </h2>

but that doesn't work.
Template overrides existed, but I deleted them in the meantime. It doesn't matter if I changed the lines in the template orverrides or in the second template...

ok I've tried something and after setting the modules header-class to h2 it sems to work

here the source text:

<div class="module-title">
<h3 class="module"><span class="h2" >Aktuelle Informationen zur GST</span></h3>
</div>
Last edit: 1 week 6 days ago by Litho-Verlag e.K..

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

  • Goble002
  • Goble002's Avatar
  • Away
  • Premium Member
More
1 week 6 days ago #178545 by Goble002
Hi,

I was wrong. the output of module header does not come from the k2 content module override.

A cleaner HTML would be :
<h2 class="module-title">Aktuelle Informationen zur GST</h2>

There is a better solution since you are hard coding the name of your module here. And all your K2 content modules will be named "Aktuelle Informationen zur GST"

 

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

  • Litho-Verlag e.K.
  • Litho-Verlag e.K.'s Avatar Topic Author
  • Offline
  • Senior Member
More
1 week 6 days ago #178546 by Litho-Verlag e.K.
Replied by Litho-Verlag e.K. on topic How to change the k2 modules title from h3 to h2?
what will be the better solution?
I didn't hard coding. The lines above are the result when I look at the source text.
I just filled out the line in the joomla backend - Modules - k2content expanded
see picture. But I'm not sure if this was the rigth way.
Attachments:

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

  • Goble002
  • Goble002's Avatar
  • Away
  • Premium Member
More
1 week 6 days ago #178554 by Goble002
What happens if you remove the module style "joomspirit" ?

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
1 week 6 days ago #178568 by Fotis
Module titles are controlled by Joomla module "chromes".

Read these:
docs.joomla.org/Module_chrome
docs.joomla.org/Customising_the_way_modules_are_displayed

Pinpoint which module chrome that module is using (it may be defined in the template's settings or hardcoded in the template code) and change it to another one or create a custom one. Your template should list its own module chromes in html/modules.php.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Litho-Verlag e.K.
  • Litho-Verlag e.K.'s Avatar Topic Author
  • Offline
  • Senior Member
More
1 week 5 days ago #178575 by Litho-Verlag e.K.
Replied by Litho-Verlag e.K. on topic How to change the k2 modules title from h3 to h2?
joomspirit is my template.

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


Powered by Kunena Forum