New IMacroRenderer and ITemplateRenderer and hides underlying logic for these in internal classes. Massively cleans up the macro rendering logic (almost makes sense now), removes unused macro code, injects UmbracoHelper wherever it's needed (not creating manually), fixes UmbracoHelper to have it's services injected, no more empty services, allows setting the AssignedContentItem on the UmbracoHelper and ensures it's lifespan is Transient, updates all corresponding ctors. Fixes macro rendering, ensures the correct culture variation is assigned, and that we can render macros for any given IPublishedContent, not just the one assigned in the request.

This commit is contained in:
Shannon
2019-01-31 15:09:31 +11:00
parent 7f9ca716e7
commit 7b55d2f1b2
55 changed files with 457 additions and 778 deletions

View File

@@ -19,8 +19,8 @@ namespace Umbraco.Web.Mvc
protected SurfaceController()
{ }
protected SurfaceController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger)
: base(umbracoContext, databaseFactory, services, appCaches, logger, profilingLogger)
protected SurfaceController(UmbracoContext umbracoContext, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, ILogger logger, IProfilingLogger profilingLogger, UmbracoHelper umbracoHelper)
: base(umbracoContext, databaseFactory, services, appCaches, logger, profilingLogger, umbracoHelper)
{ }
/// <summary>