Re: [Cppcms-users] razor like syntax for templates
Brought to you by:
artyom-beilis
|
From: Artyom B. <art...@ya...> - 2013-05-16 13:29:38
|
Actually it is interesting idea, so you can put @before variable that would be equivalent to <%= before %> Several things: 1. Escaping - should be done with @@ I think 2. Do you want to extend it beyond variables? Like the full Razor does? The best would be: 1. Add an option to cppcms_tmp_cc to handle such a syntax 2. Make sure that by default it is off such that existing code that has stuff like "@user" as text would not be broken. Other than that such a patch for cppcms_tmpl_cc would be welcome. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ >________________________________ > From: Marcel Hellwig <ke...@co...> >To: cpp...@li... >Sent: Tuesday, May 14, 2013 2:21 PM >Subject: [Cppcms-users] razor like syntax for templates > > >Hi *, > >the current template "language" is inspired by asp.net. >The syntax with <% ... %> is equal to the one asp.net uses. >My Idea is to use a different syntax, namely the successor razor where >you can replace all the <% with a simple @. For a simple review see [0] >Now my question is, are you willing to use this, or do you like to have >this feature. >i would try to implement this. For now it's a simple python script that >will convert the template to a cpp file, so it should not be that hard. > >Regards >Marcel Hellwig > > >[0] http://weblogs.asp.net/scottgu/archive/2010/07/02/introducing-razor.aspx > >------------------------------------------------------------------------------ >AlienVault Unified Security Management (USM) platform delivers complete >security visibility with the essential security capabilities. Easily and >efficiently configure, manage, and operate all of your security controls >from a single console and one unified framework. Download a free trial. >http://p.sf.net/sfu/alienvault_d2d >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |