Hi,I am using Teamsite 6.7.1 SP1.I am generating an output file using command line (iwpt_compile.ipl).The output file gets generated successfully but the genarted page is not templatised (DCR is templatised).I want to make this generated page templatised so that editor can edit this further.Can anyone please help.Thanks in advance.RegardsManpreet
#!c:/iw-home/iw-perl/bin/iwperl#======================================================================# Usage: See iwpt_compile.ipl for command line flags# This script should perform the exact same functionality *plus*# it should also set the requisite TeamSite EAs on the resultant# file so that it will be treated as generated.#======================================================================use strict;use warnings;use TeamSite::Config;use Getopt::Long;use Cwd;(my $iwhome = TeamSite::Config::iwgethome()) =~ tr|\\|/|;my @saveargs = @ARGV;my ($verbose, $help, $pt, $ofile, $dcr, $ocode) = ('', '', '', '', '', '');my $result = GetOptions("v|verbose" => \$verbose, "h|help" => \$help, "pt=s" => \$pt, "ofile=s" => \$ofile, "iw_pt-dcr=s" => \$dcr, "ocode=s" => \$ocode, );if (!$ocode && !$verbose && !$help && $pt ne "" && $ofile ne "" && $dcr ne "") { # check to see if we have full or relative paths my $cwd = getcwd(); my ($mypt, $mydcr, $myofile, $tmp) = ('','','',''); ($tmp, $mypt) = getpaths($cwd, $pt); ($tmp, $mydcr) = getpaths($cwd, $dcr); ($myofile, $tmp) = getpaths($cwd, $ofile); # run the actual script and set the EAs print qx($iwhome/bin/iwpt_compile.ipl @saveargs 2>&1); my $exit = $?; my $eas = qq[<?xml version="1.0" encoding="UTF-8"?><ealist> <ea><key>TeamSite/Templating/PrimaryDCR</key><value>$mydcr->[1]</value></ea> <ea><key>TeamSite/Templating/PrimaryDocumentType</key><value>$mydcr->[0]</value></ea> <ea><key>TeamSite/Templating/PrimaryPT</key><value>$mypt</value></ea></ealist>]; open(PIPE, "|$iwhome/bin/iwextattr -s -x $myofile") || die "[pipe] $iwhome/bin/iwextattr -s -x $myofile ($!)"; print PIPE $eas; close(PIPE); exit $exit;}else { # run the actual script and let it do it's thing print qx($iwhome/bin/iwpt_compile.ipl @saveargs 2>&1); exit $?;}sub getpaths { my ($cwd, $path) = @_; $cwd =~ tr|\\|/|; $path =~ tr|\\|/|; my ($relpath, $fullpath) = ('',''); if ($path !~ m|^/| && ($^O eq "MSWin32" && $path !~ m|^[a-z]:/|i)) { $path =~ s|^\./||; $fullpath = "$cwd/$path"; } ($relpath = $fullpath) =~ s{^.*/((WORKAREA|EDITION)/.*?|STAGING)/}{}; if ($relpath =~ m|^templatedata|i){ if ($relpath =~ m|/presentation/|i) { $relpath =~ s|^.*/presentation/||i; } else { $relpath =~ s|^templatedata/(.*?/.*?)/data/(.*)$|$1::$2|i; my @tmp = split('::', $relpath); $relpath = \@tmp; } } return($fullpath, $relpath);}