[haml] haml syntax and content_for?

2011-02-24 Thread slavix
Hello,
Can someone please tell what is wrong with this syntax. For some
reason it does not work..

- content_for?(:sidebar) do
  .sidebar= yield(:sidebar)

-- 
You received this message because you are subscribed to the Google Groups 
Haml group.
To post to this group, send email to haml@googlegroups.com.
To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.



Re: [haml] haml syntax and content_for?

2011-02-24 Thread Phil Crissman
On Thu, Feb 24, 2011 at 8:20 PM, slavix mikerin.sl...@gmail.com wrote:

 Hello,
 Can someone please tell what is wrong with this syntax. For some
 reason it does not work..

 - content_for?(:sidebar) do
  .sidebar= yield(:sidebar)


Where is the rest of the code?

If that .sidebar is inside your content_for block, then nothing is going to
happen... it's never actually being yielded in the view.


 --
 You received this message because you are subscribed to the Google Groups
 Haml group.
 To post to this group, send email to haml@googlegroups.com.
 To unsubscribe from this group, send email to
 haml+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/haml?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Haml group.
To post to this group, send email to haml@googlegroups.com.
To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.



Re: [haml] haml syntax and content_for?

2011-02-24 Thread Slava Mikerin
inside a view i have:
..
- content_for :sidebar do
  .signup
%h2= 'Placeholder'

On Thu, Feb 24, 2011 at 8:27 PM, Phil Crissman phil.criss...@gmail.com wrote:



 On Thu, Feb 24, 2011 at 8:20 PM, slavix mikerin.sl...@gmail.com wrote:

 Hello,
 Can someone please tell what is wrong with this syntax. For some
 reason it does not work..

 - content_for?(:sidebar) do
  .sidebar= yield(:sidebar)


 Where is the rest of the code?
 If that .sidebar is inside your content_for block, then nothing is going to
 happen... it's never actually being yielded in the view.


 --
 You received this message because you are subscribed to the Google Groups
 Haml group.
 To post to this group, send email to haml@googlegroups.com.
 To unsubscribe from this group, send email to
 haml+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/haml?hl=en.


 --
 You received this message because you are subscribed to the Google Groups
 Haml group.
 To post to this group, send email to haml@googlegroups.com.
 To unsubscribe from this group, send email to
 haml+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/haml?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Haml group.
To post to this group, send email to haml@googlegroups.com.
To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.



Re: [haml] haml syntax and content_for?

2011-02-24 Thread Phil Crissman
Phil


On Thu, Feb 24, 2011 at 11:14 PM, Slava Mikerin mikerin.sl...@gmail.comwrote:

 inside a view i have:
 ..
 - content_for :sidebar do
  .signup
%h2= 'Placeholder'


That looks fine. You don't really need the '=' after the h2 if you're only
putting plain text there, but it will still work.

What's not working?


 On Thu, Feb 24, 2011 at 8:27 PM, Phil Crissman phil.criss...@gmail.com
 wrote:
 
 
 
  On Thu, Feb 24, 2011 at 8:20 PM, slavix mikerin.sl...@gmail.com wrote:
 
  Hello,
  Can someone please tell what is wrong with this syntax. For some
  reason it does not work..
 
  - content_for?(:sidebar) do
   .sidebar= yield(:sidebar)
 
 
  Where is the rest of the code?
  If that .sidebar is inside your content_for block, then nothing is going
 to
  happen... it's never actually being yielded in the view.
 
 
  --
  You received this message because you are subscribed to the Google
 Groups
  Haml group.
  To post to this group, send email to haml@googlegroups.com.
  To unsubscribe from this group, send email to
  haml+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/haml?hl=en.
 
 
  --
  You received this message because you are subscribed to the Google Groups
  Haml group.
  To post to this group, send email to haml@googlegroups.com.
  To unsubscribe from this group, send email to
  haml+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/haml?hl=en.
 

 --
 You received this message because you are subscribed to the Google Groups
 Haml group.
 To post to this group, send email to haml@googlegroups.com.
 To unsubscribe from this group, send email to
 haml+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/haml?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Haml group.
To post to this group, send email to haml@googlegroups.com.
To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.