-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a way to automatically add a part to a content type #16547
Comments
Parts can be attached to content items (not types) on the fly based on arbitrary logic from handlers. Isn't that suitable? |
I understand that. One can use ContentHandler to inject a part automatically to content item. But, that would give the user no control on where to place the content part. But, if we have a way to always add the part to the content definition, then the user can change the part position "drag/drop", then creating new content item will create a UI from the content definition "which includes" the forced part at the position that admin wants. |
There's also We could add an |
Lol. I did not know we already have event handler for the content definition manager. I did a quick peek before opening the issue but did not see it. We should be able to use that handler to achieve this. I'll give it a try when time permits |
Other suggestion that was discussed, to have some new properties on the Type to make it behave like an "abstract" type, or base type only, this way it could appear in the Create Content Type UI as an option instead of a blank new one. The new type would copy the stereotype, parts, settings, ... and just have a new name. Then its parts/fields would not be removable (custom setting or property). This way the editor behaves the same, there is no dynamically added part (that could conflict with when it is attached vs. when we need to use it). If there is a new flag on the "abstract" content types, then this could also be displayed in the Content Type editor to create such new content types. And reuse recipes to create them too. |
We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues). This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here. |
Is your feature request related to a problem? Please describe.
If we look at the implementation of the Admin Dashboard, we'll notice that the user has to specify a
DashboardWidget
Sterotype in addition to attachingDashboardPart
part. I think there should be a way to allow us to inject a driver automatically based on conditions (for example stereotype).Describe the solution you'd like
I think we should add a way "maybe options" that would allow us to specify which part to attach and when. So we can say attach X part to Y content type everytime "no optional". User's can't remove it, but user can change it's position as needed. This will simplify the steps on user need to do for this kind of scenario.
Maybe we can add event handling to the content definition manager where we can auto inject a part directly when loading/updating a content type of X stereotype (or any other custom logic). The add a new option to the content part definition "IsRemovable" for the UI.
The text was updated successfully, but these errors were encountered: