Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
How to Set Extened Attribute in TPL.
System
Hi
I want to set the extended attributes for the DCR's inside the TPL.
Can i have the idea onto that .
Thanks
RG
Find more posts tagged with
Comments
iwovGraduate
Thats easy. Just call iwextattr <parameters>.
Is that what you are asking ?
Migrateduser
The file itself is already created when your TPL code is being interpreted. So, this is trivial -- just use a CLT.
Dave
Current Environment(s):
(1) TS 6.1 SP2 on W2K3
(2) TS 6.1 SP2 on W2K
Migrateduser
Hi.
i know , using CLT iwextattr -s, we can set the attributes but how to get the DCR and category and template-type value in Presentation template on the fly.
Thanks
RG
iwovGraduate
Search the forums.
Search the KBs/TechNotes.
See the
TST FAQ
Its well documented and has been discussed many times.
Edited by iwovGraduate on 03/02/05 08:50 AM (server time).
Migrateduser
Yeah, sorry but this is a big fat
RTFM
, as this is well-documented.
Dave
Current Environment(s):
(1) TS 6.1 SP2 on W2K3
(2) TS 6.1 SP2 on W2K
dkuntze
Outside of the the forums here, there really doesn't seem to be much useful documentation on EA's. The TS TPL documentation does not even mention them. Many of the KB articles are so brief that they really don't explain much.
Darin Kuntze
Senior Programming Analyst
First National Bank Nebraska, Inc.
Migrateduser
I think the more pertinent information in this case is the set of parameters that is passed in to a presentation template, which is well-documented. Not to mention, there are more than a few posts about that on DevNet.
Dave
Current Environment(s):
(1) TS 6.1 SP2 on W2K3
(2) TS 6.1 SP2 on W2K
dkuntze
This depends on where you want to set the EA's. I'm saving my EA's to the generated files since I do alot of shard dcr's which wouldn't benefit from a specific EA that is specific to a single instance.
Here's how I did it:
<iw_perl><![CDATA[
my $outputName = iwpt_get_ofile_name(); #this will get the generated page
my $dcrName = iwpt_get_dcr_name(); #this is the dcr
my $cmd;
#set extended attribute
$cmd = qq(iwextattr -s MY_EA=thisismyea $outputName);
qx($cmd);
#get extended attribute for the PT
$cmd = qq(iwextattr -g FNNI_NAVIGATION $outputName);
#$cmd = qq(iwextattr -g TeamSite/Templating/PrimaryPT $outputName);
$my_ea = qx($cmd);
]]></iw_perl>
Darin Kuntze
Senior Programming Analyst
First National Bank Nebraska, Inc.
Migrateduser
Thanks Darin for the Help.
I will try and get back with the update.
RG
Interwoven Consultant
Atlanta GA
Migrateduser
Hi Darin
plz elobrate the FNNI_NAVIGATION, Templating/PrimaryPT and MY_EA=thisismyea.
My Data category name is Automobile and type name is Lufth. and my presentation template file name is Lufth.tpl so shd i replace above with these values .
Thanks
RG
dkuntze
The iwextattr -g TeamSite/Templating/PrimaryPT will get the tpl that is being used...
You can substitute it with any named EA that you have set.
For example:
iwextattr -g MyEA
Will get the value of the "MyEA" attribute (if its set)
and
iwextattr -s MyEA=foo
Will set an attribute
So, in this example if I reversed the order (set before get) my "MyEA" attribute would return "foo"
I haven't included the full perl code here, but I could create it pretty quickly if you wanted me to.
To see some of the EA's that teamsite has placed on your generated files or DCR's just click the "properties" link next to the asset in the TS interface (professional). Once you know what EA's you have, its quite easy to get them using the syntax listed above.
Darin Kuntze
Senior Programming Analyst
First National Bank Nebraska, Inc.
Migrateduser
Thanks a lot Darin for the quick idea.
Can you send me the full code based on my last reply. else we can have chat for quick resolve.
Thanks
RG
rishi_gupta77@yahoo.com
dkuntze
I'll post it here so that others can hopefully benefit:
<iw_perl><![CDATA[
my $outputName = iwpt_get_ofile_name();
my $cmd;
#set extended attribute
$cmd = qq(iwextattr -s TEST_EA="it worked!" $outputName);
qx($cmd);
#get extended attribute
$cmd = qq(iwextattr -g TEST_EA $outputName);
$my_ea = qx($cmd);
]]></iw_perl>
<iw_value name='$my_ea'/>
if everthing goes ok, this code should output this: "it worked!"
Darin Kuntze
Senior Programming Analyst
First National Bank Nebraska, Inc.