Caveatrob
Caveatrob

Reputation: 13287

Strategy for building menus with multiple, overlapping roles

I have a system for students, instructors, and administrators. Sometimes an instructor can also be an administrator.

I intend to store menus and submenus in XML. Should I store admin and instructor menus in separate nodes, and then combine them when I render, or should I have one master menu with roles attached that shows all the options when the roles are determined?

Upvotes: 0

Views: 129

Answers (1)

Chris Thornhill
Chris Thornhill

Reputation: 5431

Absolutely attach roles to the master menu options, then include them in the instance of the menu based on the role(s) of the user. Much more flexible and easier to maintain, IMO.

Upvotes: 1

Related Questions