Setting for enabling inherited documenttypes.

This commit is contained in:
Claus
2016-01-07 13:40:37 +01:00
parent 81395169ba
commit e509099cdb
4 changed files with 33 additions and 0 deletions

View File

@@ -280,6 +280,18 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
}
}
[ConfigurationProperty("EnableInheritedDocumentTypes")]
internal InnerTextConfigurationElement<bool> EnableInheritedDocumentTypes
{
get
{
return new OptionalInnerTextConfigurationElement<bool>(
(InnerTextConfigurationElement<bool>)this["EnableInheritedDocumentTypes"],
//set the default
true);
}
}
string IContentSection.NotificationEmailAddress
{
get { return Notifications.NotificationEmailAddress; }
@@ -414,5 +426,10 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
{
get { return DefaultDocumentTypeProperty; }
}
bool IContentSection.EnableInheritedDocumentTypes
{
get { return ContinouslyUpdateXmlDiskCache; }
}
}
}

View File

@@ -59,5 +59,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
bool GlobalPreviewStorageEnabled { get; }
string DefaultDocumentTypeProperty { get; }
bool EnableInheritedDocumentTypes { get; }
}
}

View File

@@ -102,6 +102,9 @@
<!-- Defines the default document type property used when adding properties in the back-office (if missing or empty, defaults to Textstring -->
<defaultDocumentTypeProperty>Textstring</defaultDocumentTypeProperty>
<!-- Enable inherited document types. This feature will be deprecated in v8 -->
<EnableInheritedDocumentTypes>true</EnableInheritedDocumentTypes>
</content>
<security>

View File

@@ -609,6 +609,17 @@ namespace umbraco
get { return UmbracoConfig.For.UmbracoSettings().Content.DefaultDocumentTypeProperty; }
}
/// <summary>
/// Enables inherited document types.
/// This feature is not recommended and therefore is not enabled by default in new installations.
/// Inherited document types will not be supported in v8.
/// </summary>
//[Obsolete("This will not be supported in v8")]
public static bool EnableInheritedDocumentTypes
{
get { return UmbracoConfig.For.UmbracoSettings().Content.EnableInheritedDocumentTypes; }
}
private static string _path;
/// <summary>