Joomla places the bulk of article (com_content) elements in a dl tag. Pretty much everything from dates, authors, custom fields, category etc. From a core development point of view, it is an easy solution where everything can be dumped into the same list. Outside of Joomla however, it is not common at all.
My issue isn't actually with the dl, but with how they are placed in a separate layout. Consider an 'integrator' (our target audience) wishing to override a single article content. The resulting override is a relatively large chunk of code however at a glance appears to be missing a number of the key elements (author, date, category etc.)... https://github.com/joomla/joomla-cms/blob/staging/components/com_content/views/article/tmpl/default.php
For the sake of encouraging the use of Joomla overrides to 'integrators' who will have little or no PHP knowledge, I believe these layouts can be improved. Firstly by including some of these key elements directly into the article layout. Secondly by moving some of the more complicating blocks of code into a template (eg. https://github.com/joomla/joomla-cms/blob/staging/components/com_content/views/article/tmpl/default.php#L138-L164).
Basically, have a more readable and usable integrator-friendly parent view.
Labels |
Added:
?
|
Certainly, in the case of the 'info_block' (author, date, category etc.), JLayouts does offer an easy yet very opinionated solution to template devs. From a design perspective, it is rather restrictive outside of bunching all elements into a list. Considering it is there in core, I would say it has had a negative effect on Joomla template design in general. I mean it is easy to spot a Joomla website simply by the overuse of the dl in articles. Wordpress theme developers tend to be a lot more creative in how articles are displayed simply because that option does not exist.
More importantly using JLayouts here is benifiting mid level devs at the cost of more readable and usable code for integrators and indeed new users to Joomla. Certainly migrating from Wordpress I can understand frustration when a users goes from 'great i can override content in Joomla' to 'now where the is my article date, category, author amid all this... '
Title |
|
Status | New | ⇒ | Discussion |
Category | ⇒ | Layout UI/UX |
Labels |
Added:
J4 Issue
|
Status | Discussion | ⇒ | New |
Build | staging | ⇒ | 4.0-dev |
Category | Layout UI/UX | ⇒ | Feature Request Layout UI/UX |
I would be in favor of seperating the views even more so that someone who just wants to adjust the order of elements can do an override for that and not a whole override for just a small wish.
But I also think that this is probably to late now for the 4.x series - if not I would be happy to add a PR and divide the views a bit more and make it more "enduser" friendly.
It's definitely too late for 4.0. Depending on exactly what your suggesting and how b/c breaking it is we could get it into 4.1 though
should be moved to ´discussions´
Labels |
Added:
?
No Code Attached Yet
Removed: ? |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-04-20 12:51:25 |
Closed_By | ⇒ | rdeutz | |
Labels |
Added:
Feature
Removed: ? |
So the original reason for JLayouts was it meant less things to override for template devs. I'm happy if from the template dev side of view you'd rather override per extension to go with that if you think it's better (your the one doing this as a job not me? ). I'm definitely down for trying to make template overrides as simple as possible.
Yes that readmore thing is way complex and can be simplified for sure. Definitely agree on that.