Tracking website sections

I'd like some advise on how you handle marking website menus as
'selected' so that you can show different states based on which
section of a site you're in.
An example is using tabs like the illustration below. When in the
first section, the tab has an outline and when moved to the next
section, the second tab has the outline

I don't think so because that seems to do a direct comparison (after
splitting off query params)
I would need something more generic

Andrew Timberlake
http://ramblingsonrails.com

http://MyMvelope.com - The SIMPLE way to manage your savings

It's probably not ideal, but I've used the simplest possible solution
for this in some live code - just set an instance variable in the
controller and refer to it in the view / layout where the menu is. You
can even set the variable in a before_filter if it is the same across
all the actions in your controller.

Again, probably not the most "meta" solution available, but able to
handle *any* weird site layout you might have.

--Matt Jones