One of the things I really like about Ruby on Rails is the content_for helper. It makes templating easier and keeps the presentation logic in the presentation layer.
For example: layout.hml.erb: <html> <head>...</head> <body id="<%= yield(:body_id) %>"> <div class="flash"><%= yield(:flash) %></div> <div class="content><%= yield %></div> </body> </html> Then in the module view.html.erb: <% content_for :body_id do %>about<% end %> <% content_for :flash do %>Success message goes here<% end %> -- regular view content here -- each of the content_for calls stuffs its content into the yield statement from the layout file. Would there be any interest in adding something similar to symfony? You can already kind of emulate it using the slot() / end_slot() helpers (see http://blog.mirthlab.com/2008/08/06/giving-your-body-tag-some-kick/) , but it would be nice to have dedicated functions for this in the core. I wouldn't mind coding up something for 1.3 if there is interest. -- Jacob Coby --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en -~----------~----~----~----~------~----~------~--~---
