Revert test view component

This commit is contained in:
Bjarke Berg
2021-03-03 07:09:49 +01:00
parent e7b96a5214
commit c3d6cc0dcd
2 changed files with 1 additions and 23 deletions

View File

@@ -1,23 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Web;
namespace Umbraco.Cms.Web.UI.NetCore
{
public class BergViewComponent : ViewComponent
{
private readonly IUmbracoContextAccessor _umbracoContextAccessor;
public BergViewComponent(IUmbracoContextAccessor umbracoContextAccessor)
{
_umbracoContextAccessor = umbracoContextAccessor;
}
public IViewComponentResult Invoke()
{
TempData["BERG"] = "coool";
var currentPage = _umbracoContextAccessor.UmbracoContext.PublishedRequest?.PublishedContent;
return View(currentPage);
}
}
}

View File

@@ -21,6 +21,7 @@
<ItemGroup>
<Folder Include="App_Plugins" />
<Folder Include="Views" />
<Folder Include="wwwroot\Media" />
</ItemGroup>