@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?
Comments
Comment #1
swentel commentedSince you are using a custom theme, can you try deleting all code in the template.php except the template override from user types. I know garland does some funky stuff, so it's possible another garland overrides removes those categories.
Comment #2
Anonymous (not verified) commentedYou are right indeed!
I have now made a new tempalte.php file with only your code with "<?php" on top of it and then it just works.
Thanks for you very fast reply.
So I have marked this thread as solved.
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.