? ? Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
15 Feb 2022

Pull Request for Issue #37047 .

The option to set a page class on a menu item sets a class on the body tag. But in some places it is also used on the container div of the component. As it is a class and not a suffix now (despite the name which wasnt changed for bc) this PR ensures that it is used as a class and not a suffix. ie there is a space before the page class.

PS not sure if this page class should even be used here so an alternative would be to remove it from these files

b25db8a 15 Feb 2022 avatar brianteeman check
avatar brianteeman brianteeman - open - 15 Feb 2022
avatar brianteeman brianteeman - change - 15 Feb 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 Feb 2022
Category Front End com_contact com_content Layout
avatar brianteeman brianteeman - change - 15 Feb 2022
The description was changed
avatar brianteeman brianteeman - edited - 15 Feb 2022
avatar brianteeman brianteeman - change - 15 Feb 2022
Labels Added: ?
avatar RickR2H
RickR2H - comment - 16 Feb 2022

IMHO This will add empty spaces in the class names which is better to avoid. Some HTML validator might get picky about it.
Why not use:

<?php echo $this->pageclass_sfx ? ' ' . $this->pageclass_sfx : ''; ?>
avatar brianteeman
brianteeman - comment - 16 Feb 2022

Quite correct. I guess I was being lazy and copying the existing code from com_wrapper. I will update this pr shortly. Hopefully someone can then decide if the classes are even needed/desired

avatar RickR2H RickR2H - test_item - 16 Feb 2022 - Tested successfully
avatar RickR2H
RickR2H - comment - 16 Feb 2022

I have tested this item successfully on 6b547a5

Patch works. Nice catch!


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

avatar simbus82 simbus82 - test_item - 17 Feb 2022 - Tested successfully
avatar simbus82
simbus82 - comment - 17 Feb 2022

I have tested this item successfully on 6b547a5


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37055.
avatar Quy Quy - change - 17 Feb 2022
Status Pending Ready to Commit
avatar Quy
Quy - comment - 17 Feb 2022

RTC


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

avatar bembelimen
bembelimen - comment - 21 Feb 2022

So we will break all templates which relies on the fact, that the page class suffix is attached to the existing classes (beside that it was a brackish decision in the past to put this class anywhere else than the body tag).

I see the point in this PR, but for b/c reasons I can't merge it (and probably for 5.0 we should remove it from inside the extensions as suggested by Brian).

avatar brianteeman
brianteeman - comment - 21 Feb 2022

I fully agree and understand

avatar brianteeman brianteeman - change - 21 Feb 2022
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2022-02-21 19:09:38
Closed_By brianteeman
Labels Added: ?
avatar brianteeman brianteeman - close - 21 Feb 2022

Add a Comment

Login with GitHub to post a comment