-
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
Feature : Define placement in admin #6503
Comments
@deanmarcussen made a demo yesterday during the meeting to show some improvements to admin placement to use cards and tabs. It reminded me that, in O1, there is a feature that allows you to edit the placement of each field/part editor by drag and drop. That would be the kind of UI that I would like to use. |
@agriffard thank you for your answer. I watched the demo and it's nice but still relies on placement file. We need to be able to define different placements for editor and for each display type, and maybe to define alternates, wrappers or shape substitutions. I'm much more to add placement rules to ContentDefinition. |
+1 for something that allows working with "placement" directly in the Admin UI. Maybe something that can open up a text-editor specific to the content type with a preview of how things would look, and then the ability to fiddle around with it and save it. For example, Lombiq created a Something like that for placement would probably be better as a community module, but would still work to allow for generating proper placement code. So here's to hoping someone can cook something up. :) |
@TFleury It's technically possible. Currently I am using |
@ns8482e I did not find the |
@TFleury OrchardCore/src/OrchardCore/OrchardCore.DisplayManagement/Descriptors/ShapeAlterationBuilder.cs Line 185 in acee23e
|
@TFleury All I was doing is defining
|
@ns8482e Thank you. So, it also relies on |
@TFleury Yes, this is why I wondered on your pr if having something Did you look at the way the templates feature is working with the |
Yes, that's what I was searching for before creating |
@deanmarcussen @TFleury But what stops you using |
@ns8482e Using |
@TFleury @deanmarcussen May be I am not following you a bit, But I guess this feature is for placement for shapes that are already harvested and available in |
@ns8482e Assume that we are on a running tenant and the ShapeTable was already built. How do you add this rule without rebuilding the ShapeTable ? It's not possible unless you have already registered a ShapeAlteration on the "TitlePart" (or I missed something). |
Correct, I guess you don't need to rebuild the ShapeTable for every dynamic shape added in admin. All we need to do is to register a Function to handle |
Another option is have some kind of event hook when |
@ns8482e Yes i think this is the right place to start, then i would say, as @deanmarcussen suggested, by using maybe Then a custom resolver using a placement manager service returning placement infos built from a db document, the db document would be cached and invalidated by a signal token as done for the templates manager, when placement infos are built they would be also cached and invalidated by the same token, and so on, as we do for other services. Note: Then we will have to adapt this service in the Note: Yes a shape table is per theme and per tenant but the shape descriptors are shared across tenants, when a tenant has more features we only build the missing descriptors. |
We can do quite everything without creating any module or theme, but it's not possible to override default placement.
It could be helpfull to have an UI where you can easily define placement rules.
Either we can add this to Part/Field settings or add a distinct UI (like "Templates" one) where we can define a list of placement rules.
The text was updated successfully, but these errors were encountered: