V14: Segments configuration (#15812)

* Adding configuration options for segment settings

* Add "useSegments" to the document type configuration endpoint

* Adding additional configuration for creation of non-existing segments
This commit is contained in:
Elitsa Marinovska
2024-03-01 13:06:03 +01:00
committed by GitHub
parent 9cb1d66b10
commit 6010565fab
6 changed files with 52 additions and 3 deletions

View File

@@ -0,0 +1,23 @@
using System.ComponentModel;
namespace Umbraco.Cms.Core.Configuration.Models;
/// <summary>
/// Typed configuration options for segment settings.
/// </summary>
public class SegmentSettings
{
private const bool StaticEnabled = false;
private const bool StaticAllowCreation = true;
/// <summary>
/// Gets or sets a value indicating whether the usage of segments is enabled.
/// </summary>
[DefaultValue(StaticEnabled)]
public bool Enabled { get; set; } = StaticEnabled;
/// <summary>
/// Gets or sets a value indicating whether the creation of non-existing segments is allowed.
/// </summary>
public bool AllowCreation { get; set; } = StaticAllowCreation;
}