From 5360bcff5268cbc960803836cc62c2e39b2de0b6 Mon Sep 17 00:00:00 2001 From: Claus Date: Thu, 7 Jan 2016 13:42:17 +0100 Subject: [PATCH] context menu for creating child doctype. --- src/Umbraco.Web/Trees/ContentTypeTreeController.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Umbraco.Web/Trees/ContentTypeTreeController.cs b/src/Umbraco.Web/Trees/ContentTypeTreeController.cs index e29f9d6be9..94753afd16 100644 --- a/src/Umbraco.Web/Trees/ContentTypeTreeController.cs +++ b/src/Umbraco.Web/Trees/ContentTypeTreeController.cs @@ -4,6 +4,7 @@ using System.Net.Http.Formatting; using umbraco; using umbraco.BusinessLogic.Actions; using Umbraco.Core; +using Umbraco.Core.Configuration; using Umbraco.Core.Models; using Umbraco.Web.Models.Trees; using Umbraco.Web.WebApi.Filters; @@ -62,6 +63,9 @@ namespace Umbraco.Web.Trees { var menu = new MenuItemCollection(); + var enableInheritedDocumentTypes = UmbracoConfig.For.UmbracoSettings().Content.EnableInheritedDocumentTypes; + + if (id == Constants.System.Root.ToInvariantString()) { //set the default to create @@ -97,6 +101,10 @@ namespace Umbraco.Web.Trees } else { + if (enableInheritedDocumentTypes) + { + menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionNew.Instance.Alias))); + } menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionMove.Instance.Alias))); menu.Items.Add(Services.TextService.Localize(string.Format("actions/{0}", ActionExport.Instance.Alias)), true).ConvertLegacyMenuItem(new UmbracoEntity {