<iw_perl> <![CDATA[use TeamSite::Config; my $iwhome = TeamSite::Config::iwgethome(); my $iwmount = TeamSite::Config::iwgetmount(); my $printerfriendlyFileName = iwpt_get_ofile_name('dirname').'/printerfriendly.html'; if (-e $printerfriendlyFileName) { $printerfriendlyFileName =~ s|^$iwmount||;my $theCommand="$iwhome/bin/iwextattr -s TeamSite/Templating/PrimaryPT=Printer_Friendly.tpl " . $printerfriendlyFileName;system($theCommand); $theCommand="$iwhome/bin/iwregen " . $printerfriendlyFileName;system($theCommand); } else {my $tplNameWithPath = iwpt_get_pt_name('dirname').'/Printer_Friendly.tpl';my $newDCRWithPath = iwpt_get_dcr_name(); if ((-e $tplNameWithPath) && (-e $newDCRWithPath)) { $tplNameWithPath =~ s|^$iwmount||; $newDCRWithPath =~ s|^$iwmount||;my $theCommand="$iwhome/bin/iwgen -t " . $tplNameWithPath.' -r '.$newDCRWithPath.' '.$printerfriendlyFileName;system($theCommand); }}]]></iw_perl>