[Soks] Dynamic menu (was Re: A few customer reactions)
Copied from Email on Fri, 4 Mar 2005 12:55:45 +0000 from Tom Counsell (tamc2@cam.ac.uk)
Ok, I've just had a few spare minutes to test, and putting this:
<% sidebarpage = @wiki.page( "Sidebar Page") %>
<%= redcloth( sidebarpage) %>
<% if page %>
<% dynamic_links = sidebarpage ? page.links_to -
sidebarpage.links_from - [ sidebarpage ] : page.links_to %>
<% unless dynamic_links.empty? %>
<br />
<% dynamic_links.each do |linkedpage| %>
<a href='<%= url linkedpage.name %>'><%= linkedpage.name %></a>
<% end %>
<% end %>
<% end %>
into the views/frame.rhtml seems to create a working dynamic menu for
me.
Tom
_______________________________________________
Soks-discuss mailing list
Soks-discuss@rubyforge.org
http://rubyforge.org/mailman/listinfo/soks-discuss
Edit this page or
watch for changes using RSS.