From dac63cfe3bdbc0d36d58b8d201fd50a833e9ccb1 Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Fri, 11 Aug 2023 15:08:25 -0700 Subject: [PATCH 1/2] Use display_text helper to generate TitlePattern --- .../Settings/ContentPickerFieldSettings.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/OrchardCore.Modules/OrchardCore.ContentFields/Settings/ContentPickerFieldSettings.cs b/src/OrchardCore.Modules/OrchardCore.ContentFields/Settings/ContentPickerFieldSettings.cs index 5b14650e073..5289b502103 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentFields/Settings/ContentPickerFieldSettings.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentFields/Settings/ContentPickerFieldSettings.cs @@ -6,16 +6,21 @@ namespace OrchardCore.ContentFields.Settings public class ContentPickerFieldSettings { public string Hint { get; set; } + public bool Required { get; set; } + public bool Multiple { get; set; } + public bool DisplayAllContentTypes { get; set; } + public string[] DisplayedContentTypes { get; set; } = Array.Empty(); + public string[] DisplayedStereotypes { get; set; } = Array.Empty(); /// - /// The pattern used to build custom title + /// The pattern used to build title. /// - [DefaultValue("{{ Model.ContentItem.DisplayText }}")] - public string TitlePattern { get; set; } = "{{ Model.ContentItem.DisplayText }}"; + [DefaultValue("{{ Model.ContentItem | display_text }}")] + public string TitlePattern { get; set; } = "{{ Model.ContentItem | display_text }}"; } } From 0366db3b4db4e64e65725fd8d6f6b4a9ff386400 Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Fri, 11 Aug 2023 16:19:57 -0700 Subject: [PATCH 2/2] fix description --- .../Settings/ContentPickerFieldSettings.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OrchardCore.Modules/OrchardCore.ContentFields/Settings/ContentPickerFieldSettings.cs b/src/OrchardCore.Modules/OrchardCore.ContentFields/Settings/ContentPickerFieldSettings.cs index 5289b502103..54e8f517654 100644 --- a/src/OrchardCore.Modules/OrchardCore.ContentFields/Settings/ContentPickerFieldSettings.cs +++ b/src/OrchardCore.Modules/OrchardCore.ContentFields/Settings/ContentPickerFieldSettings.cs @@ -18,7 +18,7 @@ public class ContentPickerFieldSettings public string[] DisplayedStereotypes { get; set; } = Array.Empty(); /// - /// The pattern used to build title. + /// The Liquid pattern used to build the title. /// [DefaultValue("{{ Model.ContentItem | display_text }}")] public string TitlePattern { get; set; } = "{{ Model.ContentItem | display_text }}";