Skip to content

Commit

Permalink
Use display_text helper to generate TitlePattern (#14124)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored Aug 14, 2023
1 parent 639e72e commit ca451b3
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>();

public string[] DisplayedStereotypes { get; set; } = Array.Empty<string>();

/// <summary>
/// The pattern used to build custom title
/// The Liquid pattern used to build the title.
/// </summary>
[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 }}";
}
}

0 comments on commit ca451b3

Please sign in to comment.