You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When attaching ContentPickerField to a content part, the user must explicitly set DisplayedContentTypes with an array of content-types to be include in the ContentPickerField. This is good for most case, however, it would be great to allow for setting the contained content-types using Stereotype. Stereotype would be in addition to not in place of DisplayedContentTypes.
For example, I want to group all todo items (appointment, meeting) by a stereotype type called ToDoTask. All of these content types share similar functionally which is a todo task. Now I want to use ContentPickerField in a different content type to allow the user to select a todo-task of any kind. In this case, I have to explicitly specific each content types that in the DisplayedContentTypes. But if a new content-type was added later "from other feature/module", the user would have manually to edit the ContentPickerField settings every time/every where todo task are used to add the new content-type which it isn't efficient.
Describe the solution you'd like
Add a way to specific a stereotypes in the ContentPickerFieldSettings in addition to DisplayedContentTypes so the user is able to explicitly able to set displayed-content-types or explicitly set the stereotype.
We can achieve this by changing the ContentPickerFieldSettings to something like this
public class BagPartSettings
{
public string Hint { get; set; }
public bool Required { get; set; }
public bool Multiple { get; set; }
public bool DisplayAllContentTypes { get; set; } = Array.Empty<string>();
public string[] DisplayedContentTypes { get; set; } = Array.Empty<string>();
public string[] DisplayedStereotypes { get; set; } = Array.Empty<string>();
}
The text was updated successfully, but these errors were encountered:
MikeAlhayek
changed the title
Add ContainedStereotypes ContentPickerFieldSettings to allow a user to include content-types by steryotype
Add ContainedStereotypes property to ContentPickerFieldSettings to allow a user to include content-types by steryotype
Jul 26, 2022
MikeAlhayek
added a commit
to MikeAlhayek/OrchardCore
that referenced
this issue
Jul 27, 2022
Is your feature request related to a problem? Please describe.
When attaching
ContentPickerField
to a content part, the user must explicitly set DisplayedContentTypes with an array of content-types to be include in theContentPickerField
. This is good for most case, however, it would be great to allow for setting the contained content-types using Stereotype. Stereotype would be in addition to not in place ofDisplayedContentTypes
.For example, I want to group all todo items (appointment, meeting) by a stereotype type called
ToDoTask
. All of these content types share similar functionally which is a todo task. Now I want to useContentPickerField
in a different content type to allow the user to select a todo-task of any kind. In this case, I have to explicitly specific each content types that in theDisplayedContentTypes
. But if a new content-type was added later "from other feature/module", the user would have manually to edit theContentPickerField
settings every time/every where todo task are used to add the new content-type which it isn't efficient.Describe the solution you'd like
Add a way to specific a stereotypes in the
ContentPickerFieldSettings
in addition toDisplayedContentTypes
so the user is able to explicitly able to set displayed-content-types or explicitly set the stereotype.We can achieve this by changing the
ContentPickerFieldSettings
to something like thisThe text was updated successfully, but these errors were encountered: