From 1340cc0b2e368f7b7de37cd301244cac5c5dfcd0 Mon Sep 17 00:00:00 2001 From: Stephan Date: Wed, 30 Jan 2013 14:45:11 -0100 Subject: [PATCH] Web.Routing - published content request Is404 visibility --- src/Umbraco.Web/Routing/PublishedContentRequest.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Routing/PublishedContentRequest.cs b/src/Umbraco.Web/Routing/PublishedContentRequest.cs index e2aa3a182b..9ac671af7a 100644 --- a/src/Umbraco.Web/Routing/PublishedContentRequest.cs +++ b/src/Umbraco.Web/Routing/PublishedContentRequest.cs @@ -309,7 +309,17 @@ namespace Umbraco.Web.Routing /// Gets or sets a value indicating whether the requested content could not be found. /// /// This is set in the PublishedContentRequestBuilder. - internal bool Is404 { get; set; } + public bool Is404 { get; internal set; } + + /// + /// Indicates that the requested content could not be found. + /// + /// This is for public access, in custom content finders or Prepared event handlers, + /// where we want to allow developers to indicate a request is 404 but not to cancel it. + public void SetIs404() + { + this.Is404 = true; + } /// /// Gets a value indicating whether the content request triggers a redirect.