Skip to content

Commit

Permalink
updating sub page link displayer
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Vincent committed Oct 20, 2008
1 parent d37886e commit ec2acd1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/super_simple_cms/helpers/navigation_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,19 @@ def super_simple_main_links(css_class = nil)

html = ""
if groups && !groups.empty?
html << "<li class='#{css_class}'>#{link_to group_link.group.group_name, view_group_path(:page_group=>group_link.group.group_name, :perma_link=>group_link.perma_link) if @links.first.group != group_link.group}</li>"
groups.each do |group|
html << "<li class='#{css_class}'>#{link_to group.group_name, view_group_path(:page_group=>group.group_name, :perma_link=>group.links.first.perma_link)}</li>" if group.links.length > 0
end
end
return html
end

def super_simple_sub_links(group,css_class = nil)
html = ""
group.links.each do |link|
html << "<li class='#{css_class}'>#{link_to link.title, view_page_path(link.perma_link)}</li>"
html << "<li class='#{css_class}'>#{link_to link.title, view_group_path(:page_group=>group.group_name, :perma_link=>link.perma_link)}</li>"
end
return html
end

end

0 comments on commit ec2acd1

Please sign in to comment.