diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index c17723647d..0a78e82de8 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -269,6 +269,13 @@ Properties\SolutionInfo.cs + + noNodes.aspx + ASPXCodeBehind + + + noNodes.aspx + ASPXCodeBehind diff --git a/src/Umbraco.Web.UI/config/splashes/NoNodes.aspx.cs b/src/Umbraco.Web.UI/config/splashes/NoNodes.aspx.cs new file mode 100644 index 0000000000..503c53a9f3 --- /dev/null +++ b/src/Umbraco.Web.UI/config/splashes/NoNodes.aspx.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.WebPages; + +namespace Umbraco.Web.UI.Config.Splashes +{ + public partial class NoNodes : System.Web.UI.Page + { + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + + var store = UmbracoContext.Current.RoutingContext.PublishedContentStore; + if (store.HasContent(UmbracoContext.Current)) + { + //if there is actually content, go to the root + Response.Redirect("~/"); + } + } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/config/splashes/NoNodes.aspx.designer.cs b/src/Umbraco.Web.UI/config/splashes/NoNodes.aspx.designer.cs new file mode 100644 index 0000000000..0063e40629 --- /dev/null +++ b/src/Umbraco.Web.UI/config/splashes/NoNodes.aspx.designer.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Umbraco.Web.UI.Config.Splashes { + + + public partial class NoNodes { + + /// + /// Form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm Form1; + } +} diff --git a/src/Umbraco.Web.UI/config/splashes/noNodes.aspx b/src/Umbraco.Web.UI/config/splashes/noNodes.aspx index 03ec792a8a..73bda67d68 100644 --- a/src/Umbraco.Web.UI/config/splashes/noNodes.aspx +++ b/src/Umbraco.Web.UI/config/splashes/noNodes.aspx @@ -1,182 +1,148 @@ -<%@ Page Language="C#" AutoEventWireup="true" Inherits="System.Web.UI.Page" %> +<%@ Page Language="C#" AutoEventWireup="True" Inherits="Umbraco.Web.UI.Config.Splashes.NoNodes" CodeBehind="NoNodes.aspx.cs" %> + +<%@ Import Namespace="Umbraco.Core.IO" %> - - - Umbraco - <%=umbraco.GlobalSettings.CurrentVersion%> - - no pages found - + + Umbraco - no pages found - + - + - + - - - + + + - - - - - - + +
- + -
+
-
+
- + - + - + - +
+
+

Looks like there's still work to do

+

+ You're seeing the wonderful page because your website doesn't contain any published content yet. +

+

+ So get rid of this page by starting umbraco and publishing some content. You can do this by clicking the "set up your new website" button below. +

+ +
+
+
+   +
+
+
- -
- - - - -
-
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
- - -
-
- -
- + + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/umbraco.businesslogic/BasePages/BasePage.cs b/src/umbraco.businesslogic/BasePages/BasePage.cs index 6889ca929b..ad849847dd 100644 --- a/src/umbraco.businesslogic/BasePages/BasePage.cs +++ b/src/umbraco.businesslogic/BasePages/BasePage.cs @@ -3,10 +3,10 @@ using System.Data; using System.Web; using System.Linq; using System.Web.Security; +using Umbraco.Core.IO; using Umbraco.Core.Logging; using umbraco.BusinessLogic; using umbraco.DataLayer; -using umbraco.IO; using System.Web.UI; namespace umbraco.BasePages