Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Teamsite Delete Drop Down Menu Items by Branch
JimVanguard
Does anyone know how to delete drop down menu items for a particular branch?
I'm already planning on using (ui_remove_menu_items) deletedcr="editor, author"" but how do I narrow this to a single branch if I put this in the iw.cfg file?
Find more posts tagged with
Comments
tvaughan
You can't do that (as of TS 5.5.2). If you have a custom menu item, it becomes available to all branches. iw.cfg only lets you hide it on a role basis.
One solution is to make a copy of available_templates.cfg, .ipl and .dtd. With a minimum amount of re-work you can come up with a pretty sweet ACL that either enables or disables certain behaviours of your custom menu items.
For example, I have a custom "File-->OpenDeploy" cgi that needs to display different deployment options based on the (username, role, branch) tuple. When my custom cgi runs, it uses those $ENV variables to query a copy of available_templates.ipl (I renamed it to "access.ipl") and return a list of available deployments.
You could use this to allow your custom menu item to behave one way in the branch you want and to display something like "sorry, that isn't a valid option" from all other branches. This isn't the
ideal
solution from a usability perspective, but it scales pretty well when you want to add-on functionality to other branches.
Tom
Migrateduser
Seems to me you could do this a whole lot simpler by just adding a little code to the custom menu script itself up front that checks for what branch you're in and displays a message saying "Not available for this branch" if you're not in an acceptable branch. Why go through the trouble of modifying all those other files?
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
tvaughan
Well, in my case there's multiple deployment options from **** near every branch, so it isn't as much overkill.
For his case, you're right -- probably too much overhead in setting up the framework that way just to limit menu items.
Unfortunately, I think the ultimate answer to his question is "no, you can't hide menu item choices on a branch-by-branch basis"
Tom