diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
index fb25f7ef2e..69a3baf612 100644
--- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
+++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
@@ -389,9 +389,6 @@
-
- Code
-
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Breadcrumb.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Breadcrumb.cshtml
index 7be87c07bb..263d4ae66e 100755
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Breadcrumb.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Breadcrumb.cshtml
@@ -1,5 +1,6 @@
@using Umbraco.Web
@inherits Umbraco.Web.Macros.PartialViewMacroPage
+
@*
This snippet makes a breadcrumb of parents using an unordered HTML list.
@@ -22,4 +23,4 @@
@* Display the current page as the last item in the list *@
@Model.Content.Name
-}
\ No newline at end of file
+}
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/EditProfile.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/EditProfile.cshtml
index dd17f9d6f5..d74b090c07 100644
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/EditProfile.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/EditProfile.cshtml
@@ -1,9 +1,8 @@
-@inherits Umbraco.Web.Macros.PartialViewMacroPage
-
-@using System.Web.Mvc.Html
+@using System.Web.Mvc.Html
@using ClientDependency.Core.Mvc
@using Umbraco.Web
@using Umbraco.Web.Controllers
+@inherits Umbraco.Web.Macros.PartialViewMacroPage
@{
var profileModel = Members.GetCurrentMemberProfileModel();
@@ -11,8 +10,8 @@
Html.EnableClientValidation();
Html.EnableUnobtrusiveJavaScript();
Html.RequiresJs("/umbraco/lib/jquery/jquery.min.js");
- Html.RequiresJs("/Umbraco/lib/jquery-validate/jquery.validate.min.js");
- Html.RequiresJs("/Umbraco/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js");
+ Html.RequiresJs("/umbraco/lib/jquery-validate/jquery.validate.min.js");
+ Html.RequiresJs("/umbraco/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js");
var success = TempData["ProfileUpdateSuccess"] != null;
}
@@ -21,18 +20,18 @@
@Html.RenderJsHere()
@if (Members.IsLoggedIn() && profileModel != null)
-{
+{
if (success)
{
@* This message will show if RedirectOnSucces is set to false (default) *@
Profile updated
}
-
+
using (Html.BeginUmbracoForm("HandleUpdateProfile"))
{
- }
+ }
}
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Empty (ForUseWithCustomViews).cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Empty (ForUseWithCustomViews).cshtml
deleted file mode 100644
index 8d10a3a9c7..0000000000
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Empty (ForUseWithCustomViews).cshtml
+++ /dev/null
@@ -1 +0,0 @@
-@inherits Umbraco.Web.Mvc.UmbracoViewPage
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Empty.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Empty.cshtml
index dda3a17f51..711e8c0b52 100644
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Empty.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Empty.cshtml
@@ -1 +1 @@
-@inherits Umbraco.Web.Macros.PartialViewMacroPage
\ No newline at end of file
+@inherits Umbraco.Web.Macros.PartialViewMacroPage
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Gallery.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Gallery.cshtml
index a34eab0eaa..8e3222cd93 100755
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Gallery.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Gallery.cshtml
@@ -1,4 +1,7 @@
+@using Umbraco.Core.Models.PublishedContent
+@using Umbraco.Web
@inherits Umbraco.Web.Macros.PartialViewMacroPage
+
@*
Macro to display a gallery of images from the Media section.
Works with either a 'Single Media Picker' or a 'Multiple Media Picker' macro parameter (see below).
@@ -20,16 +23,16 @@
@foreach (var mediaId in mediaIds.Split(','))
{
- var media = Umbraco.TypedMedia(mediaId);
+ var media = Umbraco.Media(mediaId);
@* a single image *@
- if (media.DocumentTypeAlias == "Image")
+ if (media.IsDocumentType("Image"))
{
- @Render(media as Image);
+ @Render(media);
}
@* a folder with images under it *@
- foreach (var image in media.Children())
+ foreach (var image in media.Children())
{
@Render(image);
}
@@ -37,11 +40,11 @@
-}
\ No newline at end of file
+}
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListAncestorsFromCurrentPage.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListAncestorsFromCurrentPage.cshtml
index f022aa5d1e..b654935558 100755
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListAncestorsFromCurrentPage.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListAncestorsFromCurrentPage.cshtml
@@ -1,5 +1,6 @@
@using Umbraco.Web
@inherits Umbraco.Web.Macros.PartialViewMacroPage
+
@*
This snippet makes a list of links to the of parents of the current page using an unordered HTML list.
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesFromChangeableSource.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesFromChangeableSource.cshtml
index 6fbe125de5..46c8de695c 100755
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesFromChangeableSource.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesFromChangeableSource.cshtml
@@ -18,7 +18,7 @@
@if (startNodeId != null)
{
@* Get the starting page *@
- var startNode = Umbraco.TypedContent(startNodeId);
+ var startNode = Umbraco.Content(startNodeId);
var selection = startNode.Children.Where(x => x.IsVisible()).ToArray();
if (selection.Length > 0)
@@ -30,4 +30,4 @@
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByName.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByName.cshtml
index dd5e00cc88..d0398e7272 100755
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByName.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByName.cshtml
@@ -1,5 +1,5 @@
@using Umbraco.Web
-@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
+@inherits Umbraco.Web.Macros.PartialViewMacroPage
@*
This snippet makes a list of links to the of children of the current page using an unordered HTML list.
@@ -20,4 +20,4 @@
}
-}
\ No newline at end of file
+}
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByProperty.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByProperty.cshtml
index db0f91c4d4..f9619e4e6f 100755
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByProperty.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesOrderedByProperty.cshtml
@@ -14,6 +14,7 @@
*@
@{ var propertyAlias = Model.MacroParameters["propertyAlias"]; }
+
@if (propertyAlias != null)
{
var selection = Model.Content.Children.Where(x => x.IsVisible()).OrderBy(x => x.GetPropertyValue(propertyAlias.ToString())).ToArray();
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesWithDoctype.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesWithDoctype.cshtml
index 100d502206..625d6565b2 100755
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesWithDoctype.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListChildPagesWithDoctype.cshtml
@@ -1,4 +1,4 @@
-@using Umbraco.Core.Models
+@using Umbraco.Core.Models.PublishedContent
@using Umbraco.Web
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@@ -20,4 +20,3 @@
}
}
-
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListDescendantsFromCurrentPage.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListDescendantsFromCurrentPage.cshtml
index 1e7528274f..7ae917b41d 100755
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListDescendantsFromCurrentPage.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListDescendantsFromCurrentPage.cshtml
@@ -1,6 +1,6 @@
-@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
-@using Umbraco.Core.Models
+@using Umbraco.Core.Models.PublishedContent
@using Umbraco.Web
+@inherits Umbraco.Web.Macros.PartialViewMacroPage
@*
This snippet creates links for every single page (no matter how deep) below
@@ -37,16 +37,15 @@
}
-
@helper ChildPages(IPublishedContent[] selection)
{
@* Ensure that we have a collection of pages *@
if (selection.Length > 0)
{
- @* Get the first page in pages and get the level *@
+ @* Get the first page in pages and get the level *@
var naviLevel = selection[0].Level;
- @* Add in level for a CSS hook *@
+ @* Add in level for a CSS hook *@
@foreach (var item in selection)
{
@@ -58,7 +57,7 @@
var children = item.Children.Where(x => x.IsVisible()).ToArray();
if (children.Length > 0)
{
- @* Recurse and call our helper to display the children *@
+ @* Recurse and call our helper to display the children *@
@ChildPages(children)
}
}
@@ -66,4 +65,4 @@
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListImagesFromMediaFolder.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListImagesFromMediaFolder.cshtml
index 3303418ae4..51fdbadb00 100755
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListImagesFromMediaFolder.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/ListImagesFromMediaFolder.cshtml
@@ -13,11 +13,12 @@
*@
@{ var mediaId = Model.MacroParameters["mediaId"]; }
+
@if (mediaId != null)
{
@* Get the media item associated with the id passed in *@
- var media = Umbraco.TypedMedia(mediaId);
- var selection = media.Children().ToArray();
+ var media = Umbraco.Media(mediaId);
+ var selection = media.Children.ToArray();
if (selection.Length > 0)
{
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Login.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Login.cshtml
index c3fcf04ba3..7c5ed032f7 100644
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Login.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Login.cshtml
@@ -1,10 +1,9 @@
-@inherits Umbraco.Web.Macros.PartialViewMacroPage
-
-@using System.Web.Mvc.Html
+@using System.Web.Mvc.Html
@using ClientDependency.Core.Mvc
@using Umbraco.Web
@using Umbraco.Web.Models
@using Umbraco.Web.Controllers
+@inherits Umbraco.Web.Macros.PartialViewMacroPage
@{
var loginModel = new LoginModel();
@@ -12,8 +11,8 @@
Html.EnableClientValidation();
Html.EnableUnobtrusiveJavaScript();
Html.RequiresJs("/umbraco/lib/jquery/jquery.min.js");
- Html.RequiresJs("/Umbraco/lib/jquery-validate/jquery.validate.min.js");
- Html.RequiresJs("/Umbraco/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js");
+ Html.RequiresJs("/umbraco/lib/jquery-validate/jquery.validate.min.js");
+ Html.RequiresJs("/umbraco/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js");
}
@* NOTE: This RenderJsHere code should be put on your main template page where the rest of your script tags are placed *@
@@ -23,7 +22,7 @@
{
+
}
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/LoginStatus.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/LoginStatus.cshtml
index 7caf13ae39..4fa4bff173 100644
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/LoginStatus.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/LoginStatus.cshtml
@@ -1,9 +1,9 @@
-@inherits Umbraco.Web.Macros.PartialViewMacroPage
-@using System.Web.Mvc.Html
+@using System.Web.Mvc.Html
@using ClientDependency.Core.Mvc
@using Umbraco.Web
@using Umbraco.Web.Models
@using Umbraco.Web.Controllers
+@inherits Umbraco.Web.Macros.PartialViewMacroPage
@{
var loginStatusModel = Members.GetCurrentLoginStatus();
@@ -19,8 +19,8 @@
@*
Here you can specify a redirect URL for after logging out, by default umbraco will simply
redirect to the current page. Example to redirect to the home page:
-
- logoutModel.RedirectUrl = "/";
+
+ logoutModel.RedirectUrl = "/";
*@
}
@@ -33,11 +33,11 @@
using (Html.BeginUmbracoForm("HandleLogout"))
{
-
-
+
+
@Html.HiddenFor(m => logoutModel.RedirectUrl)
}
}
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/MultinodeTree-picker.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/MultinodeTree-picker.cshtml
index a8df4b9a4e..d845e699e0 100755
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/MultinodeTree-picker.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/MultinodeTree-picker.cshtml
@@ -1,4 +1,4 @@
-@using Umbraco.Core.Models
+@using Umbraco.Core.Models.PublishedContent
@using Umbraco.Web
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@@ -10,7 +10,7 @@
multinode treepicker (so: replace "PropertyWithPicker" with the alias of your property).
*@
-@{ var selection = Model.Content.GetPropertyValue>("PropertyWithPicker").ToArray(); }
+@{ var selection = Model.Content.Value>("PropertyWithPicker").ToArray(); }
@if (selection.Length > 0)
{
@@ -22,4 +22,4 @@
}
-}
\ No newline at end of file
+}
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Navigation.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Navigation.cshtml
index 9775c81a59..1c01eeb855 100755
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Navigation.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Navigation.cshtml
@@ -7,7 +7,7 @@
It also highlights the current active page/section in the navigation with the CSS class "current".
*@
-@{ var selection = Model.Content.Site().Children.Where(x => x.IsVisible()).ToArray(); }
+@{ var selection = Model.Content.Root().Children.Where(x => x.IsVisible()).ToArray(); }
@if (selection.Length > 0)
{
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/RegisterMember.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/RegisterMember.cshtml
index 51c0cc0443..b448a992d9 100644
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/RegisterMember.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/RegisterMember.cshtml
@@ -1,51 +1,50 @@
-@inherits Umbraco.Web.Macros.PartialViewMacroPage
-
-@using System.Web.Mvc.Html
+@using System.Web.Mvc.Html
@using ClientDependency.Core.Mvc
@using Umbraco.Web
@using Umbraco.Web.Controllers
+@inherits Umbraco.Web.Macros.PartialViewMacroPage
@{
@*
- You can specify a custom member type alias in the constructor, the default is 'Member'
+ You can specify a custom member type alias in the constructor, the default is 'Member'
for example, to use 'Custom Member' you'd use this syntax:
-
+
var registerModel = Members.CreateRegistrationModel("Custom Member");
*@
-
+
var registerModel = Members.CreateRegistrationModel();
-
+
@*
- Configurable here:
-
- registerModel.RedirectUrl - Optional. What path to redirect to if registration is successful.
- By default the member will be redirected to the current umbraco page
+ Configurable here:
+
+ registerModel.RedirectUrl - Optional. What path to redirect to if registration is successful.
+ By default the member will be redirected to the current umbraco page
unless this is specified.
-
+
registerModel.UsernameIsEmail - the default is true
if you want the username to be different from the email
address, set this to true and add a new Username field in
the form below
-
+
@Html.LabelFor(m => registerModel.Username)
@Html.TextBoxFor(m => registerModel.Username)
@Html.ValidationMessageFor(m => registerModel.Username)
*@
-
+
Html.EnableClientValidation();
Html.EnableUnobtrusiveJavaScript();
Html.RequiresJs("/umbraco/lib/jquery/jquery.min.js");
- Html.RequiresJs("/Umbraco/lib/jquery-validate/jquery.validate.min.js");
- Html.RequiresJs("/Umbraco/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js");
-
+ Html.RequiresJs("/umbraco/lib/jquery-validate/jquery.validate.min.js");
+ Html.RequiresJs("/umbraco/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js");
+
var success = TempData["FormSuccess"] != null;
}
@*NOTE: This RenderJsHere code should be put on your main template page where the rest of your script tags are placed*@
@Html.RenderJsHere()
-@if (success)
-{
+@if (success)
+{
@* This message will show if RedirectOnSucces is set to false (default) *@
Registration succeeded.
}
diff --git a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/SiteMap.cshtml b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/SiteMap.cshtml
index 46ead8a2db..567ed5d07d 100755
--- a/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/SiteMap.cshtml
+++ b/src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/SiteMap.cshtml
@@ -1,4 +1,4 @@
-@using Umbraco.Core.Models
+@using Umbraco.Core.Models.PublishedContent
@using Umbraco.Web
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@@ -9,14 +9,13 @@
- It uses a custom Razor helper called Traverse() to select and display the markup and links.
*@
-@{ var selection = Model.Content.Site(); }
+@{ var selection = Model.Content.Root(); }
@* Render the sitemap by passing the root node to the traverse helper, below *@
@Traverse(selection)
-
@* Helper method to traverse through all descendants *@
@helper Traverse(IPublishedContent node)
{
@@ -41,4 +40,4 @@
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Umbraco.Web/Macros/PartialViewMacroPage.cs b/src/Umbraco.Web/Macros/PartialViewMacroPage.cs
index 98b57272f7..7297fec6d3 100644
--- a/src/Umbraco.Web/Macros/PartialViewMacroPage.cs
+++ b/src/Umbraco.Web/Macros/PartialViewMacroPage.cs
@@ -1,6 +1,4 @@
-using System.Web.Mvc;
-using Umbraco.Core.Models;
-using Umbraco.Web.Models;
+using Umbraco.Web.Models;
using Umbraco.Web.Mvc;
namespace Umbraco.Web.Macros