brail

How to use Brail as a stand-alone general purpose templating engine (like NVelocity)?

最后都变了- 提交于 2019-12-21 19:45:16
问题 I've been using NVelocity as a stand-alone templating engine in my text file generator. The problem with NVelocity is that the macros are quite shaky; pretty much all errors I get are from faulty macro implementation. It would be cool if I could just use some other templating engine, such as Brail. That way I would just write functions that output strings. What's the best way of embedding Brail engine? I would like to just pass it a string containing the template (not reading from disk), and

How to use multiple view engines in ASP.NET MVC application

天涯浪子 提交于 2019-12-18 06:59:14
问题 I'd like to use two view engines in my asp.net mvc web application. The first one is the Brail view engine from MVCContrib project, and another one is my custom view engine for generating javascript code. However, I can't configure the application to use both engines. I'd like to use view file extension to discern which engine should handle the request - .brail for Brail engine - .json - for my custom engine When I add two engines to the ViewEngines collection in global.asax.cs, the system is

How to use Brail as a stand-alone general purpose templating engine (like NVelocity)?

六月ゝ 毕业季﹏ 提交于 2019-12-04 14:58:34
I've been using NVelocity as a stand-alone templating engine in my text file generator. The problem with NVelocity is that the macros are quite shaky; pretty much all errors I get are from faulty macro implementation. It would be cool if I could just use some other templating engine, such as Brail. That way I would just write functions that output strings. What's the best way of embedding Brail engine? I would like to just pass it a string containing the template (not reading from disk), and I would like to minimize the number of external dependencies. EDIT: I found the answer myself. Take a

How to use multiple view engines in ASP.NET MVC application

别等时光非礼了梦想. 提交于 2019-11-29 11:38:18
I'd like to use two view engines in my asp.net mvc web application. The first one is the Brail view engine from MVCContrib project, and another one is my custom view engine for generating javascript code. However, I can't configure the application to use both engines. I'd like to use view file extension to discern which engine should handle the request - .brail for Brail engine - .json - for my custom engine When I add two engines to the ViewEngines collection in global.asax.cs, the system is always looking for *.brail views and throws exception if it doesn't find one. It never looks for my *