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)
GenerateDone event?
Vibha
Hi
Is there a way to trap the "OK" button click on the Generate options dialog box that appears when a user clicks on the "Generate" button? I would like to set an extended attribute on the dcr, with a value that contains the path and name of the html that was generated. Is there a way to do this? I want this to be done as there is a requirement where, given a dcr we need the name and path of the html that was generated from the dcr.
Am using Teamsite 6.5 on Solaris
Thanks
Vibha
Find more posts tagged with
Comments
Adam Stoller
Do you generate the content as part of a workflow process?
If so - the best way to do this would be in the same script that invokes iwgen / iwpt_compile.ipl after the generation is done you can set an EA on the DCR that includes the [area-relative?] path to the output file because you have all that information.
If you need to be able to do this everytime the file is generated - inside or outside of workflow context - then I believe you can do this within your PT code. I'm not sure at what point the output file is created - but you could check for the existance of the output file first .. using perl code within an <iw_perl>...</iw_perl> section of the PT - e.g.:
<iw_perl>
use TeamSite::Config;
my $iwhome = TeamSite::Config::iwgethome();
my $ofile = iwpt_get_ofile_name();
my $dcr = iwpt_get_dcr_name();
# you might need to massage the output to strip of a leading //.... part if the above functions return vpaths
if (-e $ofile){
qx($iwhome/bin/iwextattr -s "TeamSite/Metadata/genpage=$ofile" $dcr);
}
</iw_perl>
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com