diff options
| author | hukl <contact@smyck.org> | 2009-08-08 15:04:11 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-08-08 15:04:11 +0200 |
| commit | 397bee72fa5bccf64d09eeb77b5ee0000aabfdb4 (patch) | |
| tree | df027dee605118c813ffdde893e01a550a732e43 /app/helpers | |
| parent | 7c9f0d0823bdce9a011d3bdd2823e15ffb7c1311 (diff) | |
added dynamic main menu
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/content_helper.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb index 536377b..012ee42 100644 --- a/app/helpers/content_helper.rb +++ b/app/helpers/content_helper.rb | |||
| @@ -1,8 +1,11 @@ | |||
| 1 | module ContentHelper | 1 | module ContentHelper |
| 2 | 2 | ||
| 3 | def main_menu | 3 | def main_menu |
| 4 | nodes = Node.find(:all, :conditions => {:parent_id => 1}) | 4 | menu_items = MenuItem.all |
| 5 | render :partial => 'content/main_navigation', :locals => {:nodes => nodes} | 5 | render( |
| 6 | :partial => 'content/main_navigation', | ||
| 7 | :locals => {:menu_items => menu_items} | ||
| 8 | ) | ||
| 6 | end | 9 | end |
| 7 | 10 | ||
| 8 | def calendar | 11 | def calendar |
