[Soks] Dynamic menu

[Soks] Dynamic menu

Copied from Email on Fri, 04 Mar 2005 08:04:46 -0500 from Bil Kleb (Bil.Kleb@nasa.gov)

Tom Counsell wrote:
> Hi Bil

Hello.

> On 4 Mar 2005, at 04:33, Bil Kleb wrote:
> 
> Oh. Strange. I would have thought that all the sidebar links would be 
> deleted if the page actually was Sidebar page.

Like I said, I might have been wrong - by that point I had tried
a bunch of things and it was a mess.  I usually code test-first,
but for I haven't figured out how to do that in this type of layered
environment (WEBrick+ERB+Soks).  I quickly lose my way in Ruby
without leaning on test-first programming.  Color me lame.

> Alternative way of constructing this may be to subtract the two arrays:
>     <% dynamic_links  = page.links_to - sidebarpage.links_from - sidebarpage %>

*Much* cleaner, thanks!  (The only change was [sidebarpage] to
make it an array - not bad for untested.)

> This is, again, untested, and I'm sorry that I haven't been able to help 

No apologies necessary, you have provided plenty of help.

Thanks once again,
--
Bil Kleb
http://fun3d.larc.nasa.gov

_______________________________________________
Soks-discuss mailing list
Soks-discuss@rubyforge.org
http://rubyforge.org/mailman/listinfo/soks-discuss

Edit this page or watch for changes using RSS.