Hi Jacob,
I'm not sure I understand what you're suggesting. Can the same thing
be accomplished using the second argument of the slot() helper?
(available since 1.1)
<?php slot('body_id', 'about') ?>
<?php slot('flash', 'Success message goes here') ?>
Kris
On Jan 30, 12:54 pm, Jacob Coby <[email protected]> wrote:
> 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
> (seehttp://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
-~----------~----~----~----~------~----~------~--~---