Copied to clipboard

Flag this post as spam?

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


  • Taylor 4 posts 24 karma points
    Jun 16, 2021 @ 19:25
    Taylor
    0

    Umbraco still uses cshtml files... Is there anyway I can use razor components // razor pages instead?

    As the title suggests, I just installed Umbraco 9 fairly easily but already I'm noticing Umbraco is stuck in the past.

    I am incredibly grateful Umbraco is moving to .Net 5 for the security and speed alone. However to not be able to use one of .Net 5's most promising features that is razor components seems like a deal breaker for me.

    Is there a way I can use razor files and components with Umbraco 9?

    Can I use Umbraco as a CMS and backend ONLY and basically have a normal .Net 5 frontend?

  • Søren Gregersen 441 posts 1884 karma points MVP 2x c-trib
    Jun 16, 2021 @ 20:55
    Søren Gregersen
    5

    Umbraco is stuck in the past.

    The goal of v9 is to get to .Net 5. Nothing more, nothing less.

    It's using the latest versions of everything that was used in v8, so going to latest version of ASP.NET Core MVC. It's not really something I see as being "stuck in the past".

    --

    Razor pages is something completely different, but not at all the (only) future of ASP.NET. The way it works is very different from MVC, something that a lot of people know how to work with.

    What you think of as "a normal .Net 5 frontend" would not be the same for everyone.

    My suggestion for you, would be to have a look at how to make it work. I think the Umbraco website implementation is very tied in to how MVC works, but all the services should be accesible (caches, routing etc.)

    If you can get access to an UmbracoContextAccessor, you should be able to get the page data based on the url.

    AFAIK people are looking into using the CMS in a headless manor, instead of trying to "fight" the implementation.

Please Sign in or register to post replies

Write your reply to:

Draft