[Cheetahtemplate-discuss] Some good ideas in Mighty Template, too.
Brought to you by:
rtyler,
tavis_rudd
From: Olivier Favre-S. <oli...@cl...> - 2005-08-26 01:17:27
|
Cheetah is great tool, and I'm very satisfied with my current use and knowledge of it. Anyway I was looking at Mighty Template for fun, and even if the <% syntax is giving me eczema there are good ideas too in this framework: example: http://www.myghty.org/source/htdocs/examples/template_step2/layout.myt --------------------------------------------------- <%doc> layout.myt, regular layout </%doc> <%args> title header leftnav body footer </%args> <html> <head> <title><% title %></title> <link rel="stylesheet" href="style.css"></link> </head> <body> <div class="header"> <% header %> </div> <div class="left-column"> <% leftnav %> </div> <div class="content-body"> <% body %> </div> <div class="footer"> <% footer %> </div> </body> </html> --------------------------------------------------- The <%args> to summarize template args is very useful. find & grep are wonderful CLI utils but may be Cheetah could have an equivalent #args construct. The <%doc> to have information/introspection/alike data is good too. Cheetah could have a #doc construct, far better than ## comments at the start of the file, because the compiler would know that its' made for inclusion into say introspection data. 0.9.x is probably not the time for introducing new constructs, because 1.0 release may be a priority, and these 2 constructs are sugar not fixes, but why not in a 1.1 or so ? |