2

We upgraded to 3.8.1 and since the upgrade the article titles and categories are not bolding as they did in the past. We have an article-category module and I checked the tabs to see if there was anything there regarding the bolding of titles and I didn't find anything. Does anyone know where I can fix this problem? Thanks!

  • This only happens on the homepage. When I go into the article the title is bolded. – M. Mason Dec 7 '17 at 15:29
  • The homepage has modules. I checked the module and the header tag is set to h3. – M. Mason Dec 7 '17 at 15:36
  • Please share link to page. – YellowWebMonkey Dec 7 '17 at 18:04
  • iarpa.gov – M. Mason Dec 7 '17 at 18:17
1

Header tags were removed from article titles displayed by the articles category module back in 2013, by me.

Previously, the article titles had header tags, and the option of which header tag to use, now they do not. This would explain why they no longer appear in bold.

As well as improved semantics, this change also brought the way this module displays entry titles into line with mod_articles_mostread and mod_articles_latest.

If you want the titles to display in a heavier weight then just set that in your site css by targeting the .mod-articles-category-title and .mod-articles-category-group classes, e.g.:

.mod-articles-category-title,
.mod-articles-category-group {
  font-weight: 700;
}
  • I've been working this off and on. What so you mean by set the site css by targeting .mod-articles-category-title and .mod-articles-category-group classes. I looked in templates/css/styles.css. Am I in the right place? This is a little new to me. – M. Mason Jan 12 '18 at 19:33
  • Yes, that sounds like the right file. I've added example code to my answer. – Seth Warburton Jan 15 '18 at 9:20
  • Thank you. I thought that's where it should be; however, it's not in the styles.css file. Would it be located someplace else? – M. Mason Jan 16 '18 at 13:31
  • You would need to add these styles to your styles.css if you want the titles and groups to show a heavier font-weight. – Seth Warburton Jan 16 '18 at 14:34
  • @M.Mason Can you kindly mark my answer as correct then? TIA. – Seth Warburton Jan 17 '18 at 16:43
2

I suspect that you had overridden some core code to add header tags to that module, and that the update has patched that core files, as it should.

If you copy modules/mod_articles_category/tmpl/default.php to templates/YOURTEMPLATE/html/mod_articles_category/default.php then you can override this file properly.

From Wayback Machine, it looks like

<div class="mod-articles-category-group"><?php echo $group_name; ?></div>

had been changed to

<h4><?php echo $group_name; ?></h4>

and a <h4> had been wrapped around the article title link.

That said, it is probably going to be simplest/best to just do this with styles - I don't see why it needed an override in the first place as both items can be referenced without needing any new html.

.mod-articles-category-group will reference the category title, and .mod-articles-category-title the link title.

  • Thank you for your response. I've never worked with overrides before so I'm trying to see where the core files are in order to do what you suggested. – M. Mason Dec 8 '17 at 22:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.