From: James Nykiel Date: 2008-05-02T11:11:07+09:00 Subject: Re: Need help converting PHP to Ruby / eRuby Justin Collins wrote: > James Nykiel wrote: >>>> >>> $0 is the name of the "started" file (the one that was started from >> Thanks for the hint, got it working! >> >> %> >> >> > > I think the more typical way to do this is more like > > <% > > fname = File.basename ENV['SCRIPT_FILENAME'] > > if fname == 'index.rhtml' %> > Home   ::   > <% else %> > Home  ::   > <% end %> > > > -Justin Justin, Thanks for the help with this, do you know if or how I can combine the following: ## menu.rhtml <% fname = File.basename ENV['SCRIPT_FILENAME'] if fname == 'index.rhtml' %> Home   ::   <% else %> Home   ::   <% end %> <% fname = File.basename ENV['SCRIPT_FILENAME'] if fname == 'contact.rhtml' %> Contact   ::   <% else %> Contact   ::   <% end %> -- Posted via http://www.ruby-forum.com/.