Could someone please advise me on what is causing error I'm experiencing? I'm using the iwpt_compile.ipl CLT and having the darnest time getting it to work. Here's the cmd and the error:
E:\Apps\Interwoven\iw-home\custom>e:/apps/INTERW~1/iw-home/bin/iwpt_compile.ipl
-pt /default/main/Intranet/TSDev/WORKAREA/TSDevWA/templatedata/department/linkLi
st/presentation/Redirect.tpl -iw_pt-dcr /default/main/Intranet/TSDev/WORKAREA/TS
DevWA/templatedata/department/linkList/data/newHome1 -ofile /default/main/Intran
et/TSDev/WORKAREA/TSDevWA/CorporateNewsLetter/CurrentNews.asp -iw_pt-arg article
Type CorporateNews
<ERROR>
Could not open presentation template: /default/main/Intranet/TSDev/WORKAREA/TSDe
vWA/templatedata/department/linkList/presentation/Redirect.tpl
</ERROR>
I'm attempting to pass an argument into the tpl but something isn't catching. If I hard code the value I'm passing to the tpl in the tpl, everything works fine. Your assistance is greatly appreciated!
<?xml version="1.0" encoding="UTF-8"?>
<iw_pt name="Link List">
<iw_perl><![CDATA[
##my $sortType = iwpt_dcr_value('dcr.how_to_sort');
##iwpt_output("<b>Sorted by: ".$sortType."<\/b>\n\n");
my $articleType = $iw_arg{"articleType"};
#my $articleType = "CorporateNews";
my $iterateNumber = 0;
my
@sorted_replicants = reverse sort byReplicant iwpt_dcr_list('dcr.Hyperlinks');
foreach my $rep (
@sorted_replicants){ my $linkText = iwpt_dcr_value('rep.LinkText');
my $linkCaption = iwpt_dcr_value('rep.LinkCaption');
my $linkDate = iwpt_dcr_value('rep.LinkDate');
my $linkUrl = iwpt_dcr_value('rep.LinkURL');
my $linkPage = iwpt_dcr_value('rep.LinkPage');
# do what you want with replicant info
iwpt_output("iterateNumber is $iterateNumber\n");
if($iterateNumber eq 0){
iwpt_output("TEST COMPLETE\n");
}
if($iterateNumber eq 0 && $articleType eq "CorporateNews" && $linkPage eq "CorporateNews"){
iwpt_output(qq~
<%
if ("$linkUrl")<>"" then
Response.Redirect("$linkUrl")
end if
%>
~);
$iterateNumber = $iterateNumber + 1;
#exit;
}
elsif($iterateNumber eq 0 && $articleType eq "Ceo" && $linkPage eq "Ceo"){
iwpt_output(qq~
<%
if ("$linkUrl")<>"" then
Response.Redirect("$linkUrl")
end if
%>
~);
$iterateNumber = $iterateNumber + 1;
#exit;
}
}
sub byReplicant{
#sort criteria here
#by LinkText
#return(iwpt_dcr_value('a.LinkText') cmp iwpt_dcr_value('b.LinkText'));
#by LinkText (ignore case)
#return(lc(iwpt_dcr_value('a.LinkText')) cmp lc(iwpt_dcr_value('b.LinkText')));
#by LinkCaption
#return(iwpt_dcr_value('a.LinkCaption') cmp iwpt_dcr_value('b.LinkCaption'));
#by LinkCaption (ignore case)
#return(lc(iwpt_dcr_value('a.LinkCaption')) cmp lc(iwpt_dcr_value('b.LinkCaption')));
#by LinkDate (without modules, can also use a date comparision module if you have access)
my ($aM,$aD,$aY) = split('/',(iwpt_dcr_value('a.LinkDate')));
my ($bM,$bD,$bY) = split('/',(iwpt_dcr_value('b.LinkDate')));
my $aDate = sprintf("%4.4d%2.2d%2.2d",$aY,$aM,$aD);
my $bDate = sprintf("%4.4d%2.2d%2.2d",$bY,$bM,$bD);
return($aDate <=> $bDate);
#by LinkPage
#return(iwpt_dcr_value('a.LinkPage') cmp iwpt_dcr_value('b.LinkPage'));
#by LinkPage (ignore case)
#return(lc(iwpt_dcr_value('a.LinkPage')) cmp lc(iwpt_dcr_value('b.LinkPage')));
}
]]></iw_perl>
</iw_pt>
Regards,