fix sidebar layout
move choose layout method to application controller