0

I have three tabs and third have wildcard in path. I added access callback for this menu item that checks if no argument then close access. The tab not shows afte that but ther is error "Notice: Undefined offset: 1 in _menu_translate()". So how correctly hhide this tab?

Access callback that I wrote:

/**
 * System log view access callback.
 */
function ebanq_custom_system_log_view_access($log_id) {
    return is_numeric($log_id) && user_access('access content');
}
0

I solve this by argument load function, but I don't think it is correct to do like this.

// Menu item change
//....
'system-log/%ebanq_custom_log_id/view' => array(
//....

/**
 * Implements hook_load().
 */
function ebanq_custom_log_id_load($arg) {
    if (!is_numeric($arg)) {
        return FALSE;
    }
    return $arg;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.