Updated Web.UI project to support MVC and VS MVC dialogs.

Updated RenderViewPage to include UmbracoContext and DocumentRequest.
This commit is contained in:
shannon@ShandemVaio
2012-08-08 23:37:54 +06:00
parent 4111298b00
commit 626b9ceefa
11 changed files with 87 additions and 23 deletions

View File

@@ -62,10 +62,19 @@ namespace Umbraco.Web
return uri.Rewrite(path);
}
/// <summary>
/// Converts a Uri to a path based URI that is lower cased
/// </summary>
/// <param name="uri"></param>
/// <returns></returns>
public static Uri UriToUmbraco(Uri uri)
{
var path = uri.GetSafeAbsolutePath();
//we need to check if the path is /default.aspx because this will occur when using a
//web server pre IIS 7 when requesting the root document
//if this is the case we need to change it to '/'
path = path.ToLower();
if (path != "/")
path = path.TrimEnd('/');