Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Josip 187 posts 652 karma points c-trib
    Feb 15, 2021 @ 15:19
    Josip
    0

    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.

    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);
            }
        }
    }
    
  • Nik 1413 posts 6212 karma points MVP 3x c-trib
    Feb 15, 2021 @ 16:52
    Nik
    0

    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

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies