Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Extended attribute
soms
Hi,
I am trying to add an extended attribute. When I tried in the command prompt it works perfectly
(iwextattr -s NAME = Satyam /default/main/LNP/WORKAREA/LNPSite/templatedata/Internet/AboutUs/presentation/AboutUs.tpl).
I am not able to do the same in tpl files. I have added the following code in the tpl, but it is not working. Any help is highly appreciated.
<iw_perl>
<![CDATA[
use TeamSite::Config;
my $iwhome = TeamSite::Config::iwgethome();
iwpt_output("<META NAME=IWHOME CONTENT='$iwhome'>");
my $out = iwpt_get_ofile_name();
iwpt_output("<META NAME=OUTPATH CONTENT='$out'>");
my $cmd= $iwhome."/bin/iwextattr -s DESCRIPTION=$desc $out";
iwpt_output("<META NAME=CMD CONTENT='$cmd'>");
`$cmd`;
]]>
</iw_perl>
Somu.
Find more posts tagged with
Comments
Adam Stoller
What is $desc? Does it contain any white space?
Try:
my $cmd = qq($iwhome/bin/iwextattr -s DESCRIPTION="$desc" "$out");
--fish
(Interwoven Senior Technical Consultant)
soms
Thanks ghoti for your input.
I have one more query in that iwextattr command usage. I have to set more than one Extended Attribute using that iwextattr command. Pls. any one can guide me how can I use that command. I can able to set those things using multiple commands like this
my $cmd = $iwhome."/bin/iwextattr -s Author='".$author."' $out";
`$cmd`;
my $cmd= $iwhome."/bin/iwextattr -s Keywords='".$keywords."' $out";
`$cmd`;
my $cmd= $iwhome."/bin/iwextattr -s Description='".$desc."' $out";
`$cmd`;
my $cmd= $iwhome."/bin/iwextattr -s 'Publish Date'='".$publish."' $out";
`$cmd`;
my $cmd= $iwhome."/bin/iwextattr -s 'Expiration Date'='".$expiry."' $out";
`$cmd`;
Is there any possibility for setting these things in a single line command?
Adam Stoller
In the current release of the products, you have to issue the CLT once per attribute setting.
I believe a future release (I'm not sure if it is 6.0) will provide a different mechanism for setting extended attributes that will allow you to set all of them (at least on a per-file basis) in one fell swoop.
--fish
(Interwoven Senior Technical Consultant)