-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to provide RazorViewEngineOptions
to the RazorTemplateEngine
before Render.
#67
Comments
I kind of got the not-so-pretty working version of it but looking for some thoughts/input on this feature request. |
Hey @rahulvermapropertyme, thanks for raising this issue. I've not used |
Hi @soundaranbu - In my use case, I am working with an application which has ViewPages (.cshtml) in several non-standard view locations. So being unable to pass the Passing the
As I said in my previous comment, here is the not-so-pretty commit containg those changes.. Please provide feedback, I am happy to refactor the code based on what you think. |
Ah I see.. have you tried the DI approach mentioned in the README? Basically you should be able to configure the option like this https://www.c-sharpcorner.com/blogs/custom-razor-view-location-in-asp-net-core-mvc But please let me know if there are any difficulties in it |
I see. So what we can do is configure these options on the In my case, I did not have the So I can do something like this and it works.
Thanks for your help! I am happy to close this "Feature Request". |
This project seems pretty good and does what it is supposed to do but I was wondering if we can have a way to supply
RazorViewEngineOptions
from outside before we call Render?Given
RazorTemplateEngine
class is static it makes it hard to initialise the class with theRazorViewEngineOptions
as an optional dependency.A potential not-so-pretty solution to this could be to utilise
Initialize
method on this static class to optionally set the options?The text was updated successfully, but these errors were encountered: