I'm strongly leaning towards the side of implementing this as a helper
rather than as a language feature. This is for several reasons. First, I'm
generally wary of adding new language features unnecessarily; Haml is
already a reasonably large and complex language when you look at all of it,
and I'd like to keep it from getting larger or more complex if at all
possible. Second, I don't for sure about ASP.NET, but at least in Ruby I
don't think this would be either difficult or ugly to implement as a helper;
something like http://gist.github.com/227628. Third, Ruby Haml doesn't have
any built-in notion about relationships between multiple templates, such as
layouts and partials; it's strictly concerned with rendering one template at
a time. That means that this probably wouldn't be implementable anyway.

On Thu, Nov 5, 2009 at 6:18 PM, Simon Cropp <[email protected]> wrote:

>
> is there a feature like this in haml?
>
> ===================================
> Is there a way to have something like "ContentPlaceholders" in the master
> file as in aspx forms, so that I can replace for example the content in the
> TitleRegion specified in the master file with content coming from the the
> current view?
>
>
> Possible syntax for Application.haml, using '?' not at the top-level.
>
> %html
>  %head
>    %title
>      ?myTitleBlock
>        Default Title, In Case Concrete View Page Doesn't Override This
> Block
>  %body
>    ?myBodyBlock
>      %h1= Default Header, In Case Concrete View Page Doesn't Override
> This Block
>
> Possible syntax for ConcreteView.haml, using '?' at top level
> indicating to override
> a named block, and not overriding another named block leaving it as the
> default
> defined in Application.haml.
>
> ?myBodyBlock
>  %h1= Overridden Header.
>  %p= First paragraph of overriding text.
>  %p= Second paragraph of overriding text.
>  %ul
>    - foreach(var obj in Model.Objects)
>      %li= obj.Text
> =======================================
>
> from here http://code.google.com/p/nhaml/issues/detail?id=5
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" 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/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to