On 10-12-07 10:19 AM, Ashar Voultoiz wrote: > On 06/12/10 16:57, Trevor Parscal wrote: > >> I personally think XSL is awesome, and would defend it with >> vigor. >> > I love XSL too. Probably the easiest way to render an XML data file. > > Another approach could be inspired by ruby on rails way. You define a > general application layout using HTML with special directives such as: > > <html> > <body> > <%= yield %> > </body></html> > > "yield" is where the current view should be inserted. This mean a > graphist / skinner, just have to know about HTML/CSS :-b > > > To create your view, you use rhtml (ruby html) which is plain HTML in > which you can insert ruby code using<% %> or<%= %> : > > <html><table> > <% @articles.each do |article| %> > <tr> > <td><%= article.title %></td> > <td><%= link_to 'Show', article</td> > <td><%= link_to 'Edit', edit_path( article )</td> > </tr> > </table></html> > > It does make thing easier, since the whole backend is hidden. Its role > is just to provide the correct variables (in the above case 'article' > which is an array of articles objects). > > > I think Symfony, now a day a popular PHP framework, use this system as well. > > > [1] http://www.symfony-project.org/ > > > erb/rhtml/erubis/etc... is basically nearly the same thing as the <?php ?> blocks we already use. Also, one of my goals is to provide templates which are php-less so that even environments like wiki farms can provide the ability for skins to be customized without worrying about php injection.
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name] _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
