Drupal 7 Mini Module: Do not display user profile edit pages in Administration Theme!

Disable Admin theme on user profile pages is not possible by default yet.

Drupal 7 by default displays user profile edit pages in Administration Theme, if an Admin Theme is enabled. This can't be disabled in core.

This is not a nice behaviour if you'd like to develop a community platform with consistent user profile display behaviour (for administrators, moderators, ... as well).

Even the more detailed Administration Theme (http://drupal.org/project/admin_theme) Module doesn't allow for a switch without a further patch.

Solution:
To remove user edit pages from Administration Theme display, we (http://www.DROWL.de and http://www.webks.de) developed a further mini module for our DROWL Util Mini Module collection.

It simply removes the user/* pages from administration logic:

  1. /**
  2.  * @file Helper module to not display user edit pages in Admin Theme.
  3.  * Mini Module developed by DROWL.de
  4.  */
  5.  
  6. /**
  7.  * Set all user/* Pages to non-administrative. So use NO Admin-Theme for example!
  8.  *
  9.  * @param &$paths array
  10.  */
  11. function drowl_util_user_edit_theme_noadmin_admin_paths_alter(&$paths) {
  12.     $paths['user/*'] = FALSE;
  13. }

You may download the mini module below and leave a comment if we helped you.
Furthermore DROWL.de provides Drupal Module Development for your custom needs. Have a look! =)

AnhangGröße
drowl_util.zip907 Bytes

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.

Weitere Informationen über Formatierungsoptionen