Skip to content

Commit

Permalink
Merge branch 'develop' into develop-v11
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeavon committed Oct 27, 2022
2 parents 0ea2681 + def3fef commit c9b3845
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Umbraco.Docs.Samples.Web/Controllers/DefaultController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ViewEngines;
using Microsoft.Extensions.Logging;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Web;
using Umbraco.Cms.Web.Common.Controllers;

namespace Umbraco.Docs.Samples.Web.Controllers
{
public class DefaultController : RenderController
{
public DefaultController(ILogger<RenderController> logger, ICompositeViewEngine compositeViewEngine, IUmbracoContextAccessor umbracoContextAccessor) : base(logger, compositeViewEngine, umbracoContextAccessor)
{
}

[ResponseCache(NoStore = true, Location = ResponseCacheLocation.None)]
public override IActionResult Index()
{
return CurrentTemplate(new ContentModel(CurrentPage));
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

namespace Umbraco.Docs.Samples.Web.Notifications
{
// https://our.umbraco.com/documentation/Reference/Notifications/SendingAllowedChildrenNotification/
internal class SendingAllowedChildrenNotificationHandler : INotificationHandler<SendingAllowedChildrenNotification>
{
public void Handle(SendingAllowedChildrenNotification notification)
Expand Down
7 changes: 7 additions & 0 deletions Umbraco.Docs.Samples.Web/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
using Umbraco.Docs.Samples.Web.RecurringHostedService;
using Umbraco.Docs.Samples.Web.Stylesheets_Javascript;
using Umbraco.Docs.Samples.Web.Tutorials;
using Umbraco.Cms.Web.Website.Controllers;
using Umbraco.Docs.Samples.Web.Controllers;

namespace Umbraco.Docs.Samples.Web
{
Expand Down Expand Up @@ -55,6 +57,11 @@ public void ConfigureServices(IServiceCollection services)
.AddTutorials()
.Build();
#pragma warning restore IDE0022 // Use expression body for methods

services.Configure<UmbracoRenderingDefaultsOptions>(c =>
{
c.DefaultControllerType = typeof(DefaultController);
});
}

/// <summary>
Expand Down

0 comments on commit c9b3845

Please sign in to comment.