Greetings,
I'm developing a Teamsite generated RSS feed for our site, and have what I hope is a very simple question!
I've created a DCRless template that I'm testing with iwpt_compile, which will eventually run via a cron job, and be published via opendeploy.
The first step is retrieving the items for the feed via SQL, which works perfectly. The second step is retrieving the DCRs (which are created/updated via another process) that correspond to the news item. This is where I'm getting hung up. Here's the code that fails:
<iw_sql_iterate var='events' result_set='eventList'>
<iw_perl><![CDATA[
$EVENT_DCR = "/default/main/www/WORKAREA/Content/templatedata/mycompanywww/Event/data/box_office/evt_$events->{eventid}" . ".xml";
IT FAILS HERE----> my $eventFileXml = get_file($EVENT_DCR);
sub get_file {
my($file) =
@_,1;
my $file_contents = "";
open(FILE, $file) or die("$! - Cannot open File $file");
local $/=undef;
$file_contents = <FILE>;
close FILE or die("$! - Cannot close File $file");
return($file_contents);
}
]]></iw_perl>
<item rdf:about="
http://www.mycompany.org/article/box_office/events/evt_{iw_value name='$events->{eventid}'/}.html?selecteddate={iw_value name='$selecteddate'/}">
<title>TITLE FROM DCR</title>
<link></link>
<description>TO BE FILLED IN FROM DCR</description>
</item>
</iw_sql_iterate>
For whatever reason, it won't open the DCR file. I know the path to the file is being constructed correctly, I outputted it to test.
I'm assuming I either have a path problem, a permission problem, or there's some intricacy to running tpl files via iwpt_compile that i don't know about. Here's the command that i'm using:
./iwperl ../../bin/iwpt_compile.ipl -pt /iwmnt/default/main/www/WORKAREA/Java/templatedata/mycompanywww/RSS/presentation/rss.tpl
I haven't set an -ofile for testing purposes.
Anyone have any ideas? Thanks in advance!
Matt