Skip to main content
edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
Source Link

Single site with multiple user interfaces based on path and role

I'm currently working on a Drupal project that requires 3 separate interfaces.

Administrative users login to the site and all of the pages associated with their specific role start with a particular base path. Lets say it is /path_A/*. I'd like these users to login to the site using www.example.com/path_A/login and all subsequent requests to any given page would be accessed via www.example.com/path_A/.

The end users would access the site in the same way except the login page and all subsequent requests would begin with www.example.com/path_B. Users of path B should not be able to access any of the administrative functions tied to path_A/ but administrators should be able to navigate to any path_B/ URL and access the site in the same way as the end users.

On top of all of this, there is a public facing set of pages that should be accessed using the domain itself, it is basically a blog and information directory living at the webserver root directory (www.example.com).

Additionally none of the pages belonging to any of these specific URL paths should be available through the others, so a page /path_A/page/3 should not be accessible via /path_B/page/3 or /page/3. Multi site setup for this is not really an option since the a large piece of the database is shared by all three subsections of the site.

My initial idea is that I could use .htaccess rewrites to direct all requests to each of the paths to the drupal index file, register 2 aliases for each of the login pages using the paths module and then use context to change the interface based on the path/role. I am a bit new to drupal and this is my first major project working with it so I'm not sure if this is the best approach to this problem. And yes I realize that this might seem like a waste of time but the client really stressed this functionality.