Currently there is no way for modules to alter the current subsite. It would be nice if there was a hook into subsites_get_current() with which the current subsite can be defined.

CommentFileSizeAuthor
#2 subsite_detection_methods.patch2.55 KBCyberwolf
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Cyberwolf’s picture

My suggestion:

  • a hook_subsite_detection_methods(), which needs to return an array, keys are the method names, values are arrays with keys 'title" and optionally 'file'
  • Also a hook_subsite_detection_methods_alter(&$items)

The subsites module itself will implement this hook as well.

I will provide a patch soon.

Cyberwolf’s picture

Status: Active » Needs review
FileSize
2.55 KB

Attaching the patch.

davyvdb’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.