Skip to content

Commit

Permalink
only show sublinks if there is more than one in a group
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Vincent committed Dec 1, 2008
1 parent 09209b4 commit b5a10b7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/super_simple_cms/helpers/navigation_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b5a10b7

Please sign in to comment.