Sunday, May 27, 2018

Theming Razor Pages in DNC2.1

I'm trying to create a mutitenant themeable site using the new Razor Pages in dotnet core 2.1. I have the middleware to identify tenant and set the tenant theme in the context based on host, so that on each request I can extract the information for the tenant.

I have all the default pages under /Pages but also another folder /Themes which is also top level.

I have created a view location expander which sets the view locations to /Themes/{theme name}/{1}/{0}.cshtml but it doesn't load the page.

It does work however for the shared layout page under /Themes/{theme_name}/shared/_Layout.cshtml

Anyone have any idea why it will load shared pages but not anything else?

Theming Razor Pages in DNC2.1 Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team