This should be easy to implement once the sidebar-related functions have been refactored. Depends on #50.