[Extension] Razor View Renderer

Hello,

I want to present my RazorViewRenderer extension.

This is port of ASP.NET 4.0 "Razor" view engine.

Razor does not require you to explicitly close the code-block.

Compact, Expressive, and Fluid: Razor minimizes the number of characters and keystrokes required in a file, and enables a fast, fluid coding workflow. Unlike most template syntaxes, you do not need to interrupt your coding to explicitly denote server blocks within your HTML. The parser is smart enough to infer this from your code. This enables a really compact and expressive syntax which is clean, fast and fun to type.

Easy to Learn: Razor is easy to learn and enables you to quickly be productive with a minimum of concepts. You use all your existing language and HTML skills.

All source code could be found at code.google.com under MIT License.

Also see example syntax and configuration at wiki page Getting Started here

Hello world template:




<h1>Hello world sample with Razor</h1>


<p>

   Hello @$name, Today is: @date("Y-m-d")

</p>


<div>

    <a href="@Yii::app()->params['baseUrl']/login">Login</a>

</div>



Thank you.

Trying it now in while learning Yii …

Cheers!

I get an error: "Property "CWebApplication.viewRenderer" is read only."

How do I fix this?

Great :) I come from asp.net mvc 3, just want to use Yii. I don’t know it can extend the view renderer, Yii-Razor are possible. It should have built into the official core. Lets make it popular and someone may develop highlighter for Eclipse/Aptana/NetBean?. I am very tired with smarty like template.

Based on this wiki, I think maybe you miss the server side comment @* *@.

Hello, guys I’m new to the framework, is I’m trying to use this extension more without success, someone could teach me how to use, until the use of the facility?

It’s seems not working anymore.