Ran into another thing in Rails that I don't see a way to do in Merb. Would love some guidance on how to yield in partials, or some other mechanism to turn a partial into a layout.
I often use yield in partials so I can build that partial as a wrapper around some content that I specify in a block. For example: -# In Rails... - render :layout => "shared/collapse_box" do = "wrapped partial content here" Kind of clunky, which is one reason I built the "better partials" plugin http://github.com/jcnetdev/better_partials plugin in order to get around this. -# In Rails... - partial "shared/collapse_box" do = "wrapped partial content here" All this does is checks if a block is given. If so it converts to the :layout option. Anyways, I'd really like this functionality somehow in Merb. Now I was able to *almost* get it working using Yehuda's excellent render :layout trick, and just using the standard content catching and throwing for layouts. Now the problem here is that :layout will always force me into the layout/ folder for my templates. Is there any way to run render content, :layout => "xxx" without the assumption that we are going into the layout folder? Or is there another helper I should look at to render my partials with content blocks? Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" 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/merb?hl=en -~----------~----~----~----~------~----~------~--~---
