From b5a10b7faa2c4dc757428e11ba09879ac0758468 Mon Sep 17 00:00:00 2001
From: Matt Vincent <matt@averails.com>
Date: Sun, 30 Nov 2008 19:42:14 -0600
Subject: [PATCH] only show sublinks if there is more than one in a group

---
 lib/super_simple_cms/helpers/navigation_helper.rb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/super_simple_cms/helpers/navigation_helper.rb b/lib/super_simple_cms/helpers/navigation_helper.rb
index 1d8e483..c61e512 100644
--- a/lib/super_simple_cms/helpers/navigation_helper.rb
+++ b/lib/super_simple_cms/helpers/navigation_helper.rb
@@ -45,9 +45,7 @@ def super_simple_sub_links(group,*opts)
     options[:element] ? element = "#{options[:element]}" : element = "li"
     options[:class] ? css_class = "#{options[:class]}" : css_class = ""
     html = ""
-    group.links.each do |link|
-      html << "<#{element} class='#{css_class}'>#{link_to link.title, view_group_path(:page_group=>group.group_name, :perma_link=>link.perma_link)}</#{element}>"
-    end
+    group.links.each{|link| html << "<#{element} class='#{css_class}'>#{link_to link.title, view_group_path(:page_group=>group.group_name, :perma_link=>link.perma_link)}</#{element}>"} if group.links.length > 1
     return html
   end