Skip to content

[5.4] - mod_articles add h6 option for article title heading level#46037

Merged
muhme merged 1 commit intojoomla:5.4-devfrom
travisrisner:5.4-mod-articles-heading-size
Sep 9, 2025
Merged

[5.4] - mod_articles add h6 option for article title heading level#46037
muhme merged 1 commit intojoomla:5.4-devfrom
travisrisner:5.4-mod-articles-heading-size

Conversation

@travisrisner
Copy link
Copy Markdown
Contributor

Summary of Changes

Heading level selection for Article titles in mod_articles previously just went h1-h5. This adds h6 as an option.

Testing Instructions

  • Create a module using mod_articles
  • Select parameters that will list the modules
  • Go to the Display Options tab and select h6 as your value for Header Level.
  • View module on the frontend and ensure the article title is using the h6 tag

Actual result BEFORE applying this Pull Request

No h6 was available in the list of options

Expected result AFTER applying this Pull Request

h6 is now an available option.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@chmst
Copy link
Copy Markdown
Contributor

chmst commented Sep 6, 2025

Or use the form field type="headertag" instead of all the Options?

@brianteeman
Copy link
Copy Markdown
Contributor

@chmst headertag is for the module title. This pr is for the article title

@chmst
Copy link
Copy Markdown
Contributor

chmst commented Sep 6, 2025

I know, but we could use the form field everywhere - it simply generates the options for headings.
https://github.com/joomla/joomla-cms/blob/5.3-dev/libraries/src/Form/Field/HeadertagField.php

@brianteeman
Copy link
Copy Markdown
Contributor

I have tested this item ✅ successfully on c327cdd

Makes sense


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46037.

@brianteeman
Copy link
Copy Markdown
Contributor

@chmst I don't see how that's helpful in this use case. If we let you select h5 what's wrong with being able to select h6


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46037.

@richard67
Copy link
Copy Markdown
Member

Our global administrator language file has language strings JH1 to JH6: https://github.com/joomla/joomla-cms/blob/5.4-dev/administrator/language/en-GB/joomla.ini#L35-L40

I see no reason why not to use all 6.

Only question is why not do the other modules, too?

The latter is legacy so maybe that should not be changed.

But the former still seems to be state of the art (not legacy) so that could be changed, too.

@brianteeman What do you think? Change these 2, too? Or only the former?

@brianteeman
Copy link
Copy Markdown
Contributor

For consistency you are correct they should be changed. I leave it to the maintainers to decide if the legacy module should be updated or not.

@mothershedc
Copy link
Copy Markdown

I have tested this item ✅ successfully on c327cdd


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46037.

@richard67
Copy link
Copy Markdown
Member

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46037.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Sep 8, 2025
@muhme
Copy link
Copy Markdown
Contributor

muhme commented Sep 9, 2025

Final test before merge with JBT graft nightly build and full package from PR
✅ Seen h1 - h5 before, seen h6 after, checked HTML source code

Notes:

  • The 'Display Options > Header Level' is used for the article links, not for the module header (which is 'Advanced > Header Tag')
  • In 'Advanced > Header Tag' you already can choose h6.
  • In 'Advanced > Header Tag' you can also choose 'p' and 'div'.
    • For individual styling in 'Display Options > Header Level' you can choose the div's with class name.
  • But could uniform usage of header selection still be useful?

@muhme muhme merged commit 6cc7670 into joomla:5.4-dev Sep 9, 2025
41 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Sep 9, 2025
@muhme muhme added this to the Joomla! 5.4.0 milestone Sep 9, 2025
@muhme
Copy link
Copy Markdown
Contributor

muhme commented Sep 9, 2025

Thank you @travisrisner for your contribution. Thank you @brianteeman, @richard67 and @chmst for your comments. Thank you @brianteeman and @mothershedc for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants