, , user/%/edit, :
<?php
function noc_profile_privacy_menu() {
return array(
'user/%user_category/edit/privacy' => array(
'title' => 'Portfolio privacy',
'page callback' => 'drupal_get_form',
'page arguments' => array('noc_profile_privacy_form', 1),
'access callback' => 'content_profile_page_access',
'access arguments' => array('profile', 1),
'type' => MENU_LOCAL_TASK,
'load arguments' => array('%map', '%index'),
),
);
}
function noc_profile_privacy_user($op, &$edit, &$account, $category = NULL) {
if ($op === 'categories') {
return array(array(
'name' => 'privacy',
'title' => t('Profile privacy'),
'weight' => 0,
));
}
}
, 'name' , hook_user(), , user/%user/category/edit hook_menu(). , . , 'load arguments' .
So, I believe that the user category is 'privacy'in my case a bit after editin the path of determining the menu item.
Is this an extra complication? Yes, it seems so.
Edit: I see that my heffice colleague beat me to answer this question. I would not be able to understand all this without the help of Fox, so the crazy props for Fox.
source
share