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
3 years 7 months 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.

More
3 years 7 months 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
3 years 7 months 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.

More
3 years 7 months 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
3 years 7 months ago - 3 years 7 months 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: 3 years 7 months ago by Litho-Verlag e.K..

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

More
3 years 7 months 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
3 years 7 months 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.

More
3 years 7 months ago #178554 by Goble002
What happens if you remove the module style "joomspirit" ?

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

More
3 years 7 months ago #178568 by JoomlaWorks
Replied by JoomlaWorks on topic How to change the k2 modules title from h3 to h2?
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.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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
3 years 7 months 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