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)
Call out scripts
LucretiaHolcomb
I need a script that will populate a list from different directory in the same workarea.
I have several users who update the same html page at different times. I have their access restricted so only they can ypdate the area they need to update...how ever since the datacapture.cfg that they all use creates the same html page, it leaves blanks where info should be. Interwoven (I don't understand why the 4 consultants we had in didn't show me this - but anywho) told me today I need a callout script to auto populate those regions.
Any one got a direction to point me in....thanks
Find more posts tagged with
Comments
iwovGraduate
What version of TS are you using ?
See the Templating Developer's Guide, there are a couple of example of callout scripts. That will get you started.
LucretiaHolcomb
I am running 5.5.2
iwovGraduate
See Appendix B: Using Callouts, page 105 of TeamSite Templating Developer's Guide. page 110 has the example of a CGI callout.
LucretiaHolcomb
Are there any other references you can direct me to that shows me something similar to what I am needing?
gzevin
you probably should attach your DCT to start with and explain what does it need to populate
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU
jimE
here's an example of using an inline to create a list of directories
#!E:\Interwoven/iw-home/iw-perl/bin/iwperl
my $incoming = $ARGV[0]; # gather incoming argument from command line
$archiveDir = "Y:\\default\\main\\Odyssey\\TravelServices\\WORKAREA\\development\\Htdocs\\services\\travel\\Category";
# print "archiveDir:$archiveDir\n";
chdir($archiveDir) or die "could not Chg to Dir: $archiveDir";
opendir(THISDIR,".") or die "could not open: $myDir"; # get directories
@allDirectories
= grep { !/\.+/ } map { "$path/$_" } readdir(THISDIR);
print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
print "<substitution>\n";
foreach (
@allDirectories)
{
$path = $_;
s#/##;
print "<option value=\"$_\" label=\"$_\"/>\n";
}
closedir(THISDIR);
print "</substitution>\n";
Here's the datacapture.cfg
<?xml version="1.0" standalone="no"?>
<!DOCTYPE datacapture SYSTEM "datacapture5.0.dtd">
<data-capture-requirements type="content" name="Prefered Travel">
<ruleset name="preferred">
<description>
Please complete appropriate information for the documents to upload.
</description>
<item name="Documents">
<label>Categories</label>
<replicant min="0" max="100" default="0">
<item name="Categories">
<select multiple="f" required="t" size="1">
<inline command="E:/Interwoven/iw-home/iw-perl/bin/iwperl.exe E:/Interwoven/iw-home/local/config/wft/beckmancoulter/scripts/InlineListDir.ipl" />
</select>
</item>
<item name="Options">
<label>Documents</label>
<replicant min="0" max="100" default="0">
<item name="Title">
<text required="t" maxlength="200" size="75"/>
</item>
<item name="Audience">
<select size="4" required="f" multiple="t">
<inline command="E:/Interwoven/iw-home/iw-perl/bin/iwperl E:/Interwoven/iw-home/local/bin/get_audience.ipl Audience" />
</select>
</item>
<item name="Upload">
<description>Upload a document to the page.</description>
<browser maxlength="255" size="50">
<cgi-callout url="/iw-bin/load_docs.ipl?Htdocs/services/travel/Category/" label="Upload" window-features="width=320,height=200,resizable=yes,toolbar=no,scrollbars=yes"/>
</browser>
</item>
</replicant>
</item>
</replicant>
</item>
</ruleset>
</data-capture-requirements>