Loads content and media trees with a custom root

This commit is contained in:
perploug
2013-11-18 22:29:19 +01:00
parent abce483d0e
commit 4fea694c6a
9 changed files with 45 additions and 25 deletions

View File

@@ -8,6 +8,7 @@ using Umbraco.Core.Models.EntityBase;
using Umbraco.Web.Models.Trees;
using umbraco;
using umbraco.BusinessLogic.Actions;
using System.Globalization;
namespace Umbraco.Web.Trees
{
@@ -65,6 +66,13 @@ namespace Umbraco.Web.Trees
{
if (id == Constants.System.Root.ToInvariantString() && UserStartNode == Constants.System.Root)
{
if (queryStrings.HasKey(TreeQueryStringParameters.RootNode) && queryStrings.GetValue<string>(TreeQueryStringParameters.RootNode) != Constants.System.Root.ToString(CultureInfo.InvariantCulture))
id = queryStrings.GetValue<string>(TreeQueryStringParameters.RootNode);
/* if (Security.CurrentUser.HasPathAccess(c))
node = CreateCustomRootNode(queryStrings, c.Id, c.ParentId, c.Name);
*/
//we need to append the recycle bin to the end (if not in dialog mode)
var nodes = PerformGetTreeNodes(id, queryStrings);