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)
Generating 2 files - Syntax problem
lizn
There are quite a few posts related to his problem, but I'm having trouble getting the syntax correct. I have a DCR in which I generate an xml file. In the basic(1st) tpl, I'd like to generate another xml file with a different tpl (second.tpl) after the first one is completed. I've added this code to my original tpl file:
my $DCR = iwpt_get_dcr_name();
$working_folder=iwpt_get_ofile_name();
$index = index($working_folder, ".");
$secondFile= substr($working_folder,0, $index) . "_RSS.xml";
$tpl = "Second.tpl";
*****I tried this line and had problems *****
iwpt_compile.ipl -pt $tpl -ofile $secondFile;
***So I also tried the iwgen command****
iwgen -t $tpl -r $DCR $secondFile;
Can someone help me with either one of the commands syntax?
I'm on TS 6.5 SP3
Find more posts tagged with
Comments
nipper
I have never done it that way, however what I do is use the PT to create the 1st file, then at the end of the PT, us iw_ostream to create the second:
[html]
first TPL stuff here
Stuff from Second.tpl here
[/html]
Phanie
my $iwhome = TeamSite::Config::iwgethome();
you can try this ... $iwhome/bin/iwgen -t $tpl -r $DCR $secondFile;
lizn
nipper - Thanks so much. This is exactly what I wanted. I just never thought about doing it this way