Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I need help, how can I do this in Umbraco 8.
I am following this tutorial for Umbraco 7 made by Kevin Giszewski.
using Umbraco.Core; namespace MyNamespace { public class RegisterViewEngine : ApplicationEventHandler { protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) { System.Web.Mvc.ViewEngines.Engines.Add(new MyViewEngine()); base.ApplicationStarting(umbracoApplication, applicationContext); } } }
Hi Josip,
In order to access similar events in v8, I advise reading this section of the Umbraco documentation: https://our.umbraco.com/Documentation/Reference/Events/Application-Startup
ApplicationEventHandler no longer exists and has been replaced by a new Dependency Injection based mechanism. The docs are really thorough so have a read and I'm sure you'll be able to crack it :-)
Cheers
Nik
Did you ever figure this one out? Looking to solve the same problem in a V10 site.
Hey Danny,
You could try adding the view engine in Startup.cs -> ConfigureServices? I don't have a custom view engine to test if it works, though ;-)
services.AddMvc() .AddViewOptions(options => { options.ViewEngines.Add(new MyFancyViewEngine()); });
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Registering custom view engine
I need help, how can I do this in Umbraco 8.
I am following this tutorial for Umbraco 7 made by Kevin Giszewski.
Hi Josip,
In order to access similar events in v8, I advise reading this section of the Umbraco documentation: https://our.umbraco.com/Documentation/Reference/Events/Application-Startup
ApplicationEventHandler no longer exists and has been replaced by a new Dependency Injection based mechanism. The docs are really thorough so have a read and I'm sure you'll be able to crack it :-)
Cheers
Nik
Did you ever figure this one out? Looking to solve the same problem in a V10 site.
Hey Danny,
You could try adding the view engine in Startup.cs -> ConfigureServices? I don't have a custom view engine to test if it works, though ;-)
is working on a reply...