Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Support for multiple "ContentPlaceHolders"
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Simon Cropp  
View profile  
 More options Nov 5, 8:18 pm
From: Simon Cropp <simon.cr...@gmail.com>
Date: Fri, 6 Nov 2009 12:18:24 +1100
Local: Thurs, Nov 5 2009 8:18 pm
Subject: Support for multiple "ContentPlaceHolders"
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


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nathan Weizenbaum  
View profile  
 More options Nov 5, 9:36 pm
From: Nathan Weizenbaum <nex...@gmail.com>
Date: Thu, 5 Nov 2009 19:36:05 -0700
Local: Thurs, Nov 5 2009 9:36 pm
Subject: Re: [haml] Support for multiple "ContentPlaceHolders"

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.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google