Adding Component to Groups Tab results in 404
-
I have created a custom component using the latest skeleton framework that needs to have its URLs as part of the current group. I have accomplished this is in my component’s setup_nav() function, but when I try to access the URL I get a 404 error. I have been trying to solve this issue for the last couple of day with no luck. Could someone kindly point me in the right direction?
Here is my component’s setup_nav method:
`function setup_nav()
{
$link = trailingslashit(bp_get_root_domain().’/’.bp_get_groups_root_slug().’/’.bp_get_current_group_slug().’/’.bp_get_announcements_slug());
$slug = bp_get_announcements_slug();$main_nav = array(‘name’ => __(‘Announcements’, ‘bp-announcements’),
‘slug’ => bp_get_current_group_slug(),
‘position’ => -1,
‘screen_function’ => ‘bp_announcements_screen_list’,
‘default_subnav_slug’ => ‘all’);
$sub_nav[] = array(‘name’ => __(‘All Announcements’, ‘bp-announcements’),
‘slug’ => ‘all’,
‘parent_url’ => $link,
‘parent_slug’ => bp_get_current_group_slug(),
‘screen_function’ => ‘bp_announcements_screen_list’,
‘position’ => 10);
}`
- The topic ‘Adding Component to Groups Tab results in 404’ is closed to new replies.