I see a notification in the control panel for a changed bit of code in /components/com_content/tmpl/article/default.php on line 37 from this:
<div class="com-content-article item-page <?php echo $this->pageclass_sfx; ?>" itemscope itemtype="https://schema.org/Article">
to this:
<div class="com-content-article item-page<?php echo $this->pageclass_sfx; ?>" itemscope itemtype="https://schema.org/Article">
When adding a class in a Category Blog menu item, in the 'Page Display' tab under 'Page Class' this is now flush with item-page
e.g.
class="com-content-article item-pagemy-class
instead of
class="com-content-article item-page my-class
This seems to have reverted to how it was in J3 when you had to add a space before the custom class.
Put the space back in
None
Labels |
Added:
No Code Attached Yet
|
There should be a space. If you add a class to a single article menu item in 'Page Display > Page Class' it is displayed with a preceding space.
If you add a class to a category blog menu item it is displayed with a preceding space.
Ditto menu item type 'Smart Search' and so on.
Originally in J3 any page class added in the control page had to have a preceding space.
AFAIK, it was intended that in J4 this would no longer be necessary as the space would be included in the core code.
Perhaps this one just got missed?
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-07-07 09:52:07 |
Closed_By | ⇒ | chmst |
Status | Closed | ⇒ | New |
Closed_Date | 2022-07-07 09:52:07 | ⇒ | |
Closed_By | chmst | ⇒ |
Just my 5 cent: if it is appended without a space by the PHP code it should be called “… class suffix” in the admin ui, and if it is added with a separating space it should be called “class” in the admin ui, so that it’s clear what it is. The misleading variable names “…_sfx” are something else, they might be kept as they are.
So here in this case the label “Page Class” is wrong, it should be “Page Class.Suffix” as long as the code works like now.
Labels |
Added:
?
|
Labelled this as a new feature, as we cannot make changes here without b/c breaks.
The last time that line was changed was 4 years ago. There wasnt a space then either.