added directive to handle contents dropdown