Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
TeamSite
TeamSite, LiveSite and OpenDeploy
Running iwextattr -g command from tpl
System
I am trying to get an extended attribute for the date a file was first published so that I can present it in the generated page. However, while I don't get any errors on preview or generate, the $pubdate value is always null. Here's the code I'm using to get $pubdate. I have tried every modification I can think of, but I have to admit that I am no iw-perl expert...
<iw_perl><![CDATA[
use TeamSite::Config;
my $iwhome = TeamSite::Config::iwgethome();
my $file = iwpt_get_ofile_name();
my $pubdate = `$iwhome\bin\iwextattr -g Published-Date $file`;
chomp $pubdate;
]]></iw_perl>
Lower in the tpl, I attempt to output $file and $pubdate:
pubdate: <iw_value name="$pubdate"/>
file: <iw_value name="$file"/>
The output is (note that pubdate is null):
pubdate:
file: Y:\default\main\newstool\apc\WORKAREA\slphelan\apc\apc2079.html
I run the pubdate command from the command line using the exact file path output below and I get the correct value back, but for some reason, when I generate the template, it doesn't return any value at all. Any ideas would be greatly appreciated.
Find more posts tagged with
Comments
There are no comments yet