In my module I have a view with the path set to /admin/reports/maillog. I want this view to show up in the list of reports in the reports menu /admin/reports.

How can I do that?

Comments

leisurman’s picture

I am not very good at Drupal yet. I wanted to do this too. But instead I made View to display watchdog errors to list on the user home page. I set the View Basic settings to Access: certain roles.
also under permission I un-check access all views for everyone accept for the #1 user.

pluess’s picture

I'm not seeing the view in the reports menu as user #1. So this is not a permission problem.

I could of course add an entry to hook_menu and call the view programmatically. Is this the standard was of doing this?

jim.phelan’s picture

Just add it to the admin reports menu items here: admin/build/menu-customize/admin

pluess’s picture

I have to do this in code.

What's the standard way? Defining it in hook_menu() and call the view programatically in the call back? That looks ugly to me since the path is already defined in the view as well. Or should I create a menu_save() and menu_link_save()?

aaronelborg’s picture

1. Make your path similar to stuff in the 'reports' menu (/admin/reports/my-custom-path)
2. Choose 'Normal menu entry' in the "menu" portion of your view, give it a 'Title' and a 'Description'.
3. (Here's where the magic happens) Choose "Management" in the 'Menu' thing.
4. Choose a weight if you wanna.
5. Spread the word on this info. It's not like it was in good ol' D6.