Toolbar items under menu

Anybody succeeded in manipulating the toolbar beneath the menu? I would like to be able to hide them like the menu items, but the macros for hiding buttons do not apply for menu’s and the macro’s for manipulating the menu do not apply for the toolbar buttons of the menu application…

Try this one (onApplicationInit):
echo “<style type=‘text/css’>#btn_1 { visibility: hidden} </style>”;

jsb

I tried the above but cant get it to work.
I have tried in all the Events but to no prevail
What I have tested on is

echo “<style type=‘text/css’>#item_1 { visibility: hidden} </style>”;
as well as
echo “<style type=‘text/css’>#btn_1 { visibility: hidden} </style>”;

Albert,

I use sc_apl_status() (in security module) to turn on/off the Menu Toolbar Buttons, by specifying the application that the button specifies.
Works very well so that different classes of users can get different toolbar items.

Larry:

If you want to hide it dynamically, I think the CSS that you want would be:

echo "<style>#btn_2 { display: none !important; }</style>";

You need to make sure that you specify the proper ID of the button. See attachment.

Dave

Capture.PNG

Dave - Thank you. I did try this, however I notice you are using V8, this may be the issue.

I tried using both btn and item cant seem to get it to work.

echo “<style>#item_1 { display: none !important; }</style>”;

Menu_Issue.png

Larry,

Yes, it may be because of using V7. To determine the required code to hide the button, you need to look at the generated code with an inspector (i.e. F12 in Firefox).

Do you have a publicly accessible version of the generated page?

Dave

Dave - I go it to work real well, using
In the menu applicationInit, I put in sc_reset_menu_delete();

Then based upon the user’s table, which has various fields stating what the user can and cannot see, I removed the menu items necessary using

sc_menu_delete(‘item_nnnn’);

Since I have sc_reset_menu_delete(), I always start afresh and the condition in the menuLoad controls what is visible and what is not.

Larry,

ok, sounds good!

Dave