Dynamic Menu's

gemblon (t.b.) said the following on 19/12/07 10:22 AM:

It is possible have dynamic menu's in my views?

for example, in the following menu code:

<div id="menu">
  <ul>
    <li><a href="#" title="Link 1"><span>A</span></a></li>
    <li><a href="#" title="Link 2"><span>B</span></a></li>

I would like to be able to have ruby populate the href and title from an
array.
Something like:

<li><a href="<%= @href[1]%>" title="<%= @title[1]%>"><span>A</span>...
<li><a href="<%= @href[2]%>" title="<%= @title[2]%>"><span>B</span>...

i can add the loop to generate the number of menu's.

has anybody done this?

See Tabnav
Presentation at
http://rails-widgets.googlegroups.com/web/rails-widgets-by-paolo-dona-at-railstoitaly-1193755397633919-4.pdf?gda=iUGBB3MAAADb_C9p6lwGsSLQNhI574fnNIwcRGMoSRrwpWzU9i2Ob2G1qiJ7UbTIup-M2XPURDQIpv1h7sibZLIapAuXd7Eg2CpAaV13DJbYJizNBsaZtd78gbToY9QXWVXc5zZBP3wAY6FChiKhqEwrEf-plYaiK4YoAX3ERE0DC1UD-MzSMQ

Install:
ruby script/plugin install svn://svn.seesaw.it/widgets/trunk