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)
Passing parameters to .tpl from command line
netsnaveen
I am trying to generate .html pages using iwgen command. But from the command line I want to pass a value which I can read in the tpl( consider it as passing a flag ). Is there a way to do it?
Thanks,
Naveen
Find more posts tagged with
Comments
Jens
I haven't tried, but maybe it works with iwpt_compile.ipl
http://TEAMSITE-SERVER/iw/help/tst/pt/iwpt_compile.html
Gregg Faus
This is easy to do. When you call the publish command add the following to the end of your statement:
-iw_pt-arg parameter value
Where parameter is the name of a parameter you wish to pass and value is... well the value.
Here is an example
[CMD]
iwperl c:\iw-home\bin\iwpt_compile.ipl -pt ptfile -ofile outputfile -iw_pt-arg xml_summary summary_list.xml
[ptfile]
$xml_summary = $iw_arg{"xml_summary"};
In the presentation template (called ptile, substitute a full path) I would just grab whatever is passed in from the presentation template arguments. In this case it is a xml_summary file which is then used in the PT to generate another output page.
IR_7086_WIN.txt
Gregg Faus
I was checking for responses and noticed you wanted to know if it was possible with iwgen, not the iwpt_compile.ipl. Then the anwser would be NO. There shouldn't be any reason why you couldn't use the compile command since iwgen calls it anyway.