Files
Umbraco-CMS/src/Umbraco.Web/Trees/UrlHelperExtensions.cs
Shannon Deminick 160811e190 added new tests for model mapping and serialization of the content display models. Started integrating trees. Committed the compiled
angular controllers, directives, services, resources since I'll be modifying them to work with the real data services. Then we'll have
to merge back to the belle repo with the changes.
2013-05-30 21:21:52 -10:00

21 lines
672 B
C#

using System;
using System.Net.Http.Formatting;
using System.Web.Http.Routing;
using Umbraco.Core;
namespace Umbraco.Web.Trees
{
public static class UrlHelperExtensions
{
public static string GetTreeUrl(this UrlHelper urlHelper, Type treeType, string nodeId, FormDataCollection queryStrings)
{
var actionUrl = urlHelper.GetUmbracoApiService("GetNodes", treeType)
.EnsureEndsWith('?');
//now we need to append the query strings
actionUrl += "id=" + nodeId.EnsureEndsWith('&') + queryStrings.ToQueryString("id");
return actionUrl;
}
}
}