I have a taxonomy vocabulary Area. The terms of this vocabulary are the main menu items. There are no other links in the main menu.

I have a term reference field on user profile.

For every user the main menu should only display those terms which are selected on their profile and have to access to those taxonomy terms only.

Is it possible with any contrib module? Or any idea how to achieve this functionality?

  • Maybe a workaround is to create your menu using Views...then set permissions at term level using this module Permissions by term, and set access per permission in your view
    – pierostz
    Commented Jan 17, 2017 at 8:22

1 Answer 1


I have achieved this functionality with the following method.

Created a taxonomy term type view which will list only the top level terms.

Added a relationship to view Taxonomy term: User using Area

Added another relationship Taxonomy term: Parent term

Added a contextual filter on uid for currently logged in user.

This will list only those terms which are selected on user profile. And then display this view as a main menu in the panels.

And then using rules, I return Access denied if a user try to access the taxonomy term page which is not selected on his/her profile.

Hope it will help someone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.