Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Custom menu item
parsan99
Hi
I have a branch "Images" which needs special handling for deletion of files. I am planning to use a custom cgi to do this. I would like to know if it is possible to override the "Default" delete with a wrapper script, which will call my custom cgi if any of the selected files are from "Images" branch and go with the normal delete script for the other files.
If this is a feasible solution, could you please let me know the location and parameters for the script called by the "delete" menu item.
Thanks much
Find more posts tagged with
Comments
Migrateduser
I assume you know how to disable the File->Delete menu item - that is documented pretty well in the Admin Guide. As far as being able to use the internal functionality for Delete in your custom menu script, that's highly unlikely as there doesn't appear to be a "delete file" CLT. It is, however, pretty simple to delete a file using Perl. You can use the "unlink" function or a system "rm" command. The question arises as to whether a custom menu script will run as the person who is executing it. You would definitely want it to so the permission rules work. I think if you wrap a CGI script with iw_cgi_wrapper.cgi then it will run as the person executing it.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Adam Stoller
To ensure that the "impersonation" occurs, I believe the format is:
"iw_cgi_wrapper.cgi/your_cgi_script_here.cgi"
--fish
(Interwoven Senior Technical Consultant)
tvaughan
If you want to 'override' the default TeamSite menu items with custom menu items that change their behavior based on which branch the user executes the drop down from, I'd suggest the following:
1) Spend 5 minutes looking at available_templates.ipl and available_templates.dtd to figure out how the available_templates.cfg file is used.
2) Make copies of the IPL, DTD and CFG and call them something like "available_deletes.ipl, .dtd, .cfg"
3) Modify the files to replace the notion of available workflow configurations with available delete cgi's. Based on the (user/role/location) you can have available_deletes.ipl spit out the names of some different delete CGIs you write and load the configured CGI for the user to see.
The problem with overriding, as Dave pointed out, is that you'll have a hard time maintaining the out-of-the-box 'File-->Delete' functionality if you subsume it with this method. You'll also move the "Delete" menu item to the end of the "File" menu, which will look weird -- especially if you keep the "Delete Data Record" menu item where it is.
Tom