There have been several issues recently about joomla needing custom post types. My view is that we can already do something similar to that without any backwards compatibility issues or the need to introduce UCM etc. and my view is that in many cases it is just a matter of perception and semantics.
But to make it easier for people to realise that we need to use the new custom admin feature of joomla to make the editor experience clearer. So I was playing around with the custom admin menu feature to see if I could create something similar to the custom post type feature being requested
In this example Types === Categories
And cars, events, blog === articles
And as we all know we can assign fields to categories and have different layouts for each category
Therefore we can already create custom post types it's just about the UI.
There is just one thing missing. When you create an admin menu item to display a list of all articles there is no option to select a filter so the article list displays all the articles.
If however it was the same as when you create a site menu item to display a list of all articles in a category then you have achieved the custom post types people are asking for.
I suspect in the admin it will not be quite the same as just displaying the articles in a single category but we can certainly use the activeFilters variable so that the list opens with the category preselected.
Labels |
Added:
?
|
This is a great start ~!
My only issues is that Categories are hierarchical, and Types are not (?), buuuttt.... I am thinking that through and cannot see why this would not be a great step forwards and cover most of the issues in previous chats !
Adding Tags filtering in the menu and making sure that sub categories inherit the Custom Fields would be important in my view..
Status | New | ⇒ | Discussion |
Category | ⇒ | Administration com_categories com_menus Feature Request |
My only issues is that Categories are hierarchical, and Types are not
Look at it as a feature. You can have nested types. Eg a type "car" and then a subtype "Opel" and another one "Ford".
@brianteeman The easiest way would be a batch command to assign multiple fields to a category. From my point of view there is no issue doing that.
No issue with that as well.
maybe its my memory failing but I seem to recall there was a discussion about putting field groups in caategories when you did the original PR
At that time field groups have been categories. I guess you mix things up.
that explains that
Wouldnt it also make sense that a field group can be assigned to a category
This may become interesting as soon as the assigned field category and field group category aren't matching. Which one should then have precedence?
It is only about assignment, it will be then assigned to both.
Yes, indeed, this is a simple (?cleaner?) solution
it bonds well with the existing assignment of custom fields by category
and it is usable by any component
just some UI work is needed, to expose what is already possible
To make this more automatic i would say to do this
Specially for com_content (J4) rename "articles" term to "items" , no need to change DB table name or context name (com_content.article), just change all language strings and documentation everywhere
[EDIT] this last one is probably bad idea, see comment below #20233 (comment)
Optionally "Flag" categories as types (add a new column to categories table: is_type)
Might as well do the content/post types thing in the other issue if you're doing that. Because that's what you're leading up to.
Specially for com_content (J4) rename "articles" term to "items" , no need to change DB table name or context name (com_content.article), just change all language strings and documentation everywhere
Bad idea. That's changing labels for the sake of changing labels (inherently breaking all documentation ever written) and leaving the code and the UI massively inconsistent.
Thinking out loud, with the lack of experience in how new installable demodata actually works, but could this approach be provided with installable "demo packages"?
Core provided installable packages of setups similar to demo data but being useful starter type kits.
You can do almost anything with a sampledata plugin.
Might as well do the content/post types thing in the other issue if you're doing that. Because that's what you're leading up to.
hhmm i am continueing discussion already done in this topic,
which is about using something that is already implemented
Bad idea. That's changing labels for the sake of changing labels (inherently breaking all documentation ever written) and leaving the code and the UI massively inconsistent.
Well, ok, you could keep as articles, just the term will feel wrong
plus once you add the "types" terminology you have this already:
"and leaving the code and the UI massively inconsistent"
Article is already a generic term. There's nothing gained from changing the term and breaking 12 years of history for the sake of replacing a generic UI term for another more generic UI term.
Article is already a generic term. There's nothing gained from changing the term and breaking 12 years of history for the sake of replacing a generic UI term for another more generic UI term.
Good argument, indeed, probably not worth the troubles changing this term
Funny enough this is something myself and @GeraintEdwards have talked about in the past. We were originally looking at handling it with a plugin, but if the core natively adopts it then awesome!
Would make it much better when using com_content for more than just site pages..
There are no needs for any dB changes and nor should there be any to achieve this
If the admin menu item passed an extra parameter e.g. &type=catid then it would be easy for the edit page to use slightly different language strings??
@GeraintEdwards you're the dev not me. so i can't answer that but it sounds feasible
Labels |
Added:
J3 Issue
|
I have started working on this. I have been able to add category selection to the admin menu link.
But the url is generated as index.php?option=com_content&view=articles&category_id=8
and it needs to be filter.category_id
Any hints
OK that part done thanks to @tonypartridge
Just downloaded and tested this feature in Joomla 3.9.
Great work Brian et al ! Thanks for doing this - it makes a content admins life much easier.
To see this, and workflows being incorporated into Joomla 3.9/4.0 is frankly extremely satisfying.
Especially for government opportunities where document workflow (and accessibility) are key factors in the platform.
Now we just need standard template overrides for category list pages, and to also be able to actually 'delete my article' from the front end and I think Joomla will have made significant strides interface wise.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-11-08 13:17:42 |
Closed_By | ⇒ | brianteeman |
The one thing we dont have right now is an easy way to assign a collection of fields to categories. I remember there was a discussion about this when fields were added to Joomla but I completely forget the reasoning that this was not done. maybe @laoneo can enlighten us on that aspect