I wonder if there is any way to extend razor view engine capabilities to handle some custom text/tag and parse/proceed before render. Assume that I use some special tag which is ${}
as below:
<span>${some word}</span>
Then, I want to parse the view before render and replace 'some world' with localized value. Ofcourse this can be done by other ways, but i wonder if there is any way to get this work.
You can extend the razor view engine by inhereting from RazorViewEngine
class, you can find an example of how to do that here
Also, check out Nancy.Viewengines.Razor which is a view engine built on top of Razor view engine, and has it's own syntax parser
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With