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)
problems with iwpt_compile.ipl command
Gery
Hi,
I want that the user generates an html page (with params to my tpl template) from the dcr preview button choosen the generator.tpl template.
In the generator.tpl template I wrote:
$myCommand="$iwhome/bin/iwpt_compile.ipl -pt $mi_template -ofile $output_page -iw_include-location $wa_vpath -iw_pt-arg idioma=$idioma[$j]";
system($myCommand);
It seems works but the output_page doesn't generate. Where is the command output, what is the log file?
My code is rigth? Need I use any parameter else? All I want is to generate the output html file.
Otherwise, if I use iwgen it's works successfully and it generates the output file correctly (without params to my tpl template, but I need to use iwpt_compile.ipl to pass my params).
Any idea of how to generate an html file using iwpt_compile.ipl command with my personal parameters?
Regards
Thans for help.
Find more posts tagged with
Comments
Gregg Faus
My recommendation would be to log/print the call, then use the command you've captured and run it from the command line. If you get an error (which is likely), run it with the -ocode parameter and run the intermediate code with iwperl.
There is an error somewhere in your preview generation and this would be a good way to isolate it.
Let me know if you want me to elaborate more.
ela
Hi, could you post the iwgen command which is working? Then it would be easier to check if something is wrong in your iwpt_compile command.
I had to change from iwgen to iwpt_compile for some templates too, but not for the one called from the preview button. See this post for details:
Selecting a tpl w/o user intervention
Regards,
Eldbjoerg
Gery
Thanks for the help. I run the follow in the command line:
C:\iw-home\bin>iwpt_compile.ipl -pt $pt_dir\home.tpl -ofile $output\index.html -ocode -iw_pt-arg idioma=_c
...and the error output is:
<ERROR>
Could not open presentation template: \default\main\desarrollo\otras_iniciativas
\q66a_eraikal\WORKAREA\q66a_plantillas\templatedata\q66a\home\presentation\home.tpl
</ERROR>
The -iw_include-location flag is mandatory for location de tpl template?
Then I try to run:
C:\iw-home\bin>iwpt_compile.ipl -pt $pt_dir\home.tpl -ofile $output\index.html -ocode -iw_include-location $location -iw_pt-arg idioma=_c
Note: the perl variables have been replaced
Any idea?
Regards
Thanks for the help.
ela
I think you might have to add the dcr location in your command. Here's the command I use for generating a meta file (you can compare):
system("/app/teamsite/iw-home/bin/iwpt_compile.ipl -pt $workarea/$pt -iw_pt-dcr $workarea/$dcrloc/$dcrname -iw_include-location . -ofile $workarea/$tmp/$dcrname$c_htmlext$c_metaext");
Eldbjoerg
Gery
I tried it with the dcr location too but it doesn't work.
When you write: "-iw_include-location . " in the command, what does mean the character ".". Is the path as the follow E.g.: /default/main/desarrollo/otras_iniciativas/q66a_eraikal/WORKAREA/q66a_plantillas
Thanks.
ela
Here's the description from the TeamSite Templating Developer's Guide (in my version page 129-131):
-ofile filename: Save the output to filename instead of STDOUT.
-iw_include-location: Mandatory when the mode attribute of the iw_include tag is docroot. The file path is prepended to the file name provided in the file
attribute to form a complete file path (used to virtualize the inclusion).
"." concatenates/adds the filename to the path.
Eldbjoerg
(I had to edit this post, to correct my answer)
Gery
Thank you, it works fine.
The problem was the starts of the vpaths.
Regards