Detecting self referencing links

I’ve done some searching, and came up with nothing, but what I’m trying to do seems pretty simple and common, so hopefully someone knows how to do this, or knows where a thread is that describes how to do it:

I am using a slot on the nav root to generate “tabs” at the top of several pages. I want to style the tab that represents the page currently being viewed, differently from all the other tabs, it is pretty common stuff really. So I have a snippet template that generates an individual tab, and all I need it to do is detect when the parent assembly item’s URL is the same as the URL that would be generated by $rx.location.generate(). When that happens, it would then append a CSS class and the magic would happen. But for some reason, I can’t find any way once I’m in the snippet template to compare the page being assembled, to the URL being generated by the snippet… I would even settle for the content ID since these pages only publish once, it would be the same thing.

One idea occurred to me that in the page template I could set a binding for the content ID, then the snippet template could use that binding to compare the parent item’s content ID to the $sys.item content ID… does that sound like it would work?

Any help would be appreciated,

-Jason

Perhaps this will help:

http://forum.percussion.com/showthread.php?t=9758&highlight=parent+assembly+item