Forum: Ruby More help with eruby

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
peter (Guest)
on 2007-02-25 22:28
(Received via mailing list)
Hi list
I really hate to ask for help and it seems that the simplest things are
stumping me :(

I'm trying to create a dynamic menu where a var is passed to expose the
next section based on the link used like my example below. My question
is what do I use to capture the y variable?

<li><a href="?y=2006">2006</a></li>
<li><a href="?y=2007">2007</a></li>

year = ??????
if year == 2006
printf "<li><a href=\"/2006/?s=help\">Help</a></li><li><a href=
\"/2006/?s=upload\">Upload</a></li><li><a href=\"?/2006/s=download

elsif year == 2007
printf "<li><a href=\"/2007/?s=help\">Help</a></li><li><a href=
\"/2007/?s=upload\">Upload</a></li><li><a href=\"/2007/?s=download

Thanks in advance for any help you can provide.

This topic is locked and can not be replied to.