Module hides all the profile categories

Created on 20 October 2008, almost 16 years ago
Updated 20 April 2024, 5 months ago

@Swendel

First I want to thank you for this module it is great, but I have one problem with it.

The Template_Override.txt tells this:

/**
* Menu local task theme override, provided by user_types module.
* Hides the profile category when user type has no fields associated with it.
* Copy/paste this in your template.php file of your theme.
*/
function phptemplate_menu_local_task($mid, $active, $primary) {
if (module_exists('user_types')) {
$profile_categories = user_types_enabled_categories();
}
else {
$profile_categories = array();
}
$menu = menu_get_item($mid);
if (!in_array($menu['path'], $profile_categories)) {
if ($active) {
return '

  • '. menu_item_link($mid) ."
  • \n";
    }
    else {
    return '

  • '. menu_item_link($mid) ."
  • \n";
    }
    }
    }

    I have coppied the Garland template.php into my custom Drupal theme folder because I didn't had a template.php file. And then I pasted the code from above at the bottom of the file.

    The problem now is that it doesn't only hide the unused profile categories, but all the categories.

    So I guess that must be a bug.

    Is there a solution for this?

    🐛 Bug report
    Status

    Fixed

    Version

    1.0

    Component

    Code

    Created by

    Live updates comments and jobs are added and updated live.
    Sign in to follow issues

    Comments & Activities

    Not all content is available!

    It's likely this issue predates Contrib.social: some issue and comment data are missing.

    No activities found.

    Production build 0.71.5 2024