custom directive to handle sidebar info