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)
how to get list of selected files?
cheeku
I have created a custom menu item.On the click of it, a (wrapper)cgi script is called. How can I get the list of files, selected by the user before the click, in the correspoding ipl?
Find more posts tagged with
Comments
Adam Stoller
You probably need to provide more detail and perhaps provide the script (as an attachment) - but...
If you are using TeamSite 5.x or earlier - the files that were selected in the main TeamSite browser window can be found by looking at the CGI form variables (or params) named something like 'path_0', 'path_1', etc.
If you are using TeamSite 6.x - you can run your CGI through a wrapper (wdpro_menu.ipl) to achieve the same form variable naming - or you can parse the contents of the form variable 'vpath' which may be either a single entry or a reference to a list of entries (there have been other posts regarding this - and as I'm still catching up from a week's vacation I'll leave the tracking down of that information to you).
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
cheeku
Thanks. I apologize for having cross-posted the query.
It works using 'path_0', 'path_1'..Can I get the file paths stored in an array? Or will have to go on checking 'path_i' until it returns null or blank.
Adam Stoller
If you're using 5.x or 6.x with wdpro_menu.ipl - you just need to use a counter variable ('path_$counter') until you don't get a value back.
If you're using 6.x without wdpro_menu.ipl you get the reference to an array and cycle through it.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com