Hide specific dashboard menu items

Permalink 1 user found helpful
Hello everyone!

At the moment I am learning how to build single pages properly.
I am trying to create a case where my client can add Contacts. I already succesfully added a "Contacts" page which is contains the pages "Clients" and "Suppliers". Now these two both have another single page beneath them called "Add". Obviously these are to add new clients and add new suppliers.

Now my problem is that the "Add" pages show up in my dashboard menu. (Screenshot added on how my filetree looks like)
These "Add" pages need to be hidden since there will be a link on the "Clients" and "Suppliers" page which will link to them. I have been searching around on how it has been done with the page to add new users, but I can't seem to find a solution.

Does anyone knows how to do this? Thanks in advance!

- Stef

1 Attachment

StefSmeers
 
MrKDilkington replied on at Permalink Reply
MrKDilkington
@StefSmeers

Why do you want to hide the "Add" pages?
StefSmeers replied on at Permalink Reply
StefSmeers
Because it literally just says "Add". I know I can change the names, but I know it is possible. Just like the single_page to add a new user (/dashboard/users/add). It doesn't show up on the dashboard menu either.
MrKDilkington replied on at Permalink Reply
MrKDilkington
I believe this would change the name of your page from "Add" to "Add Users".

In your package controller install() method, you can try this.
$sp = SinglePage::add('/dashboard/users/add', $pkg);
if (is_object($sp)) {
    $sp->update(array('cName'=>t('Add Users'), 'cDescription'=>''));
}
StefSmeers replied on at Permalink Reply
StefSmeers
Thank you very much. But I am not making a package. Just single pages in the application folder ;)
WebcentricLtd replied on at Permalink Reply
Enable advanced permissions and remove the permission that is named something like 'view in sitemap' from the relevant user/group. I may have misunderstood though - as far as I know the add page under members always shows in the sitemap by default.
WebcentricLtd replied on at Permalink Best Answer Reply
sorry Stef - I just realised I misunderstood what you were asking. Must be a little too early here for my brain.

The site menu on the right is an auto-nav I believe. So, if you add the attribute to your page to exclude from nav that should do the trick.
StefSmeers replied on at Permalink Reply
StefSmeers
AndyJ, thank you so much!
I can't believe I missed this during 2 hours of trying to figure out how this works.