rubyarrayshamlstaticmatic

haml syntax - nesting partial properties


what i want is a way of nesting partial properties, this seems a tad long winded:

= partial('frames/tabs_a', :locals => {:tabs_title => 'semi-dynamic-tabs',
  :tabs_id => 'p001',
  :panel_a => 'views/article-highlights_a',
  :a_id => 'p_002_0',
  :a_ft => '123 More in highlights',
  :a_tt => 'panel a', 
  :a_c => 'magazine', 
  :panel_b => 'views/thumbnail-list_a', 
  :b_id => 'b_id',
  :b_ft => 'testing tt', 
  :b_tt => 'panel b', 
  :b_c => 'opportunities', 
  :b_c => 'opportunities', 
  :panel_c => 'views/thumbnail-list_a', 
  :c_id => 'b_id', 
  :c_ft => 'testing tt',
  :c_tt => 'panel c',
  :c_c => 'community', 
  :panel_d => 'views/article-highlights_a',
  :d_id => 'p_002_0',
  :d_ft => '123 More in highlights',
  :d_tt => 'panel d', 
  :d_c => 'magazine'
})

I'm using staticmatic.


Solution

  • This is a great place to write a helper.