more work on dynamic sidebar layout