The purpose is to add a class to ancestor pages. Right now, a CSS class is added to the current page (current_page_item), and it's parent (current_page_parent). I created a plugin (Mark Parent Pages Plugin) that uses the DOM to travel farther upstream, and tag all ancestor pages with a class as well (current_page_ancestor). Upon submitting the plugin to the plugin repository, I was told to "Please make this a core patch on Trac." So here it is. I haven't actually made the patch yet, but I'll try to when I get time. If someone else has time, please feel free. It seems like it should work just like the plugin.
The only real question is whether the parent should get tagged as an ancestor as well (with both classes). The plugin does, because it's purpose was to give me collapsing menus, and doing so made my css simpler:
#nav ul li.current_page_item ul,
#nav ul li.current_page_ancestor ul {
display:block;
}
#nav ul li.current_page_item ul ul {
display:none;
}
instead of
#nav ul li.current_page_item ul,
#nav ul li.current_page_parent ul,
#nav ul li.current_page_ancestor ul {
display:block;
}
#nav ul li.current_page_item ul ul {
display:none;
}