Custom Forms: easier management with "content types"? #38639
Replies: 4 comments 8 replies
-
Re searching custom fields please see (and test) #38650 |
Beta Was this translation helpful? Give feedback.
-
This seams like it's over complicating content types. Why does it need to extend to other components? I suggest just extending the content component and focusing it there. Fields and field groups can already be assigned to categories. Simply extend them to also be assigned to content types as well. So you'd have a content type of Photos and it'd have a subform with an image field in it assigned to that type. Now you can upload a bunch of photos for that content type. I don't think management of all this is complicated. It's mainly the rendering. Joomla would need to have different layouts per content type and those would need to be easily edited so you can make a new layout per content type to customize how all this looks. Joomla should also come with a couple content types default out of the box. Just your standard stuff like Article, Photos, etc.. Extensions can then extend all this by just making new Joomla fieldtype plugins to add new fields to those content types easily. I suppose you could also extend this to content categories so you can have categories specific to content types as well, but probably not entirely necessary. As for menus/SEO there isn't anything to worry about here. They'll just be content served by the content component after all so that's already taken care of by core. |
Beta Was this translation helpful? Give feedback.
-
Can you give an example please of where you would have different content types in the same category. Every example I think of would only have 1 content type per category. Perhaps this is because I always build with bultiple content views (blog, list etc) and never single pages? |
Beta Was this translation helpful? Give feedback.
-
Maybe we could add a setting to the field group and define the field group to be a content type, then the field only has to be assigned to the content type and not anymore to a category. The content type could control then all settings like which category it's assigned to? Just thinking loud how we could integrate it into the existing structure. |
Beta Was this translation helpful? Give feedback.
-
The problems
In an ongoing RFC (#36710) it's come up that currently, custom fields have a lot of potential, but are time-consuming to set up and hard to manage.
Subforms help ease that a little bit, but even so, making sure they are assigned to the correct pages depends heavily on categories.
Currently, custom field assignments are solely dependent on the category of items. This makes an assumption that all sites are organized into categories based on information type, when that's not necessarily the case or even the best solution for all sites. (For example, it makes sense when you have a recipe site, or a blog, but might make less sense for an association with different chapters that needs to organize the content by chapter.)
This problem is compounded by the way menu routing works, so even if you create sub categories for different types of information, you will have additional categories in the URL unless you create menu items that would otherwise be unnecessary. It gets complicated really fast.
Additionally, if you are using custom layout overrides on an item level (like an article) instead of on a custom-field level, it creates a situation where you have to ensure that every item selects the correct layout override AND is in the correct (and possibly unnecessary) category.
A possible solution
I think it makes sense to decouple categories from field display. Categories should be to organize the content in a way that makes sense for the content of each site; as it is now, we are forcing site builders into using categories for 'types' of content.
So, perhaps a missing link: content types?
A step between custom fields and items (articles, contacts, etc, whatever components use custom fields) that allows you to assign custom fields (still optionally organized into field groups) to content types instead of categories.
It would be nice to also optionally select the default layout for a specific content type, so that in cases where the layout is tightly dependent on certain custom fields, you could ensure they are present.
This may help people understand better the relationship between custom fields, field groups, and content items, because right now we are making assumptions about how people think about information in their specific use case.
How would it work?
In my mind, content types would be opt in (like how workflows are), not required by default. (At least in the beginning?)
It would still make sense to be able to select a default content type in the menu item settings for a category, but critically, you would be able to override it on an item level and have the appropriate custom fields show up.
Content types would be per component, like how fields are per component.
If not enabled, fields etc would work like they do now.
However, if enabled, when adding a field you would be able to assign it only to a field group.
Then, when managing the content types, you would be able to add which fields belong to the content type. (This is easier to do all at once per type instead of on a field-by-field basis.)
Open questions
This isn't the first time the idea of content types have come up:
I am opening a new discussion because of the age of previous discussions/issues, and because of the significant changes to custom fields/Joomla since then.
Thanks @coolcat-creations for bringing it up again. :)
Beta Was this translation helpful? Give feedback.
All reactions