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)
dcr version information
conmgmt
Can we export dcr version information when the dcr is merged with tpl ?
The idea is to send the version information along with the dcr's so the end user can trace back to the version no. if required.
Find more posts tagged with
Comments
akshathp
You could use the CLT iwattrib to fetch the revisionnumber and many more attributes associated with the file. This oculd be in the tpl between <iw_perl> tags.
Hope this helps.
Akshat Pramod Sharma
Interwoven Inc.
conmgmt
How do you call iwattrib from tpl ?
akshathp
One way is to have a system call between iw_perl tag.
<iw_perl><![CDATA[
your perl code here
]]></iw_perl>
Hope this helps.
Akshat Pramod Sharma
Interwoven Inc.
conmgmt
Sorry, I should have been clear... I know how to execute code using iw_perl tag. What I don't know is how to make a system call from withing iw_perl tag.
akshathp
<iw_perl><![CDATA[
$cmd = `$iw-home/bin/iwattrib /default/main/branch/WORKAREA/workareaname/templatedata/category/data/dcrname revisionnumber`;
iwpt_output("$cmd");
]]></iw_perl>
Note, you can capture the DCR name by using iwpt utilities or pass it to tpl.
Hope this helps.
Akshat Pramod Sharma
Interwoven Inc.
ExternalTranslations.dcpackage.zip
output.pdf
conmgmt
When I tried to execute the tpl using the script you mentioned it just outputted the the value assigned to $cmd as string rather than executing it.
Did I miss something here ?
Adam Stoller
The first set of quotes:
$cmd = `....`;
were actually backticks *not* single-quotes - as such the variable $cmd should be filled with the output from having run the command (and not the actuall command itself - [bad variable naming])
The second set of quotes (for iw_output()) are double-quotes surrounging what, as described above, should be the output of the command.
If you used single-quotes or double-quotes for the first instance, you will just see the command to be executed itself and not the output
--fish
(Interwoven, Curriculum Development)
conmgmt
That worked... Thanks all for the help