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)
Automatic generation
maverick83
I am creating a automatic generation script ,the situation is that we have created two PT's apart from the main PT earlier
a.tpl
b.tpl
based on the these two different PT's we need to create c.aspx(based on a.tpl),d.aspx((based on b.tpl)
i have created a script in a raw format ,basically i am passing dcr name as argument from CLT and c.aspx is generating successfully(using iwgen inside script) ,there are two main
issues:-
(1)when i put similar code for generating d.aspx based on b.tpl inside the script ,d.aspx doesnt get generated from running the script (dcr is same for both the aspx only the tpl is different )but only the c.aspx gets
generated
(2) is there we can traverse the dcr's in data directory ,we have many dcr around 3000 in different langagues ,it may be bit difficult to run the script
typiing dcr as CLT argument ,may be i am missing something simple here ,any pointers regarding this?
looking forward for guidance from experts.
regards,
mav
Find more posts tagged with
Comments
nipper
A few points.
I would combine the both TPLs into one and use iwostream to generate the second file. It is not difficult.
2nd I use iwpt_compile rather than iwgen. THe downside is that the EAs do not get set so you need to do those. However iwpt_compile behaves closer the preview/generate functionality that iwgen with respect to variables.
3rd, are you looking at a regen all script ? They are fairly easy to write, but just need to be kept up. Do you have a generate content step in your workflow ? You should, & that would make a nice starting point. Just find all .xml in /templatedata, parse the category/type, fill out the source/destination and TPL variables and then at the end of a loop tun iwpt_compile and then set the EAs.
maverick83
thanks for your guidance
i am able to traverse the directory structure using File::find and able to get the name of all the dcr's
but iwgen doesnt work et all
then i used iwpt_compile gives the msg that " x dcr doesnt exist"
[php]
my $result = `"$IWHOME/bin/iwpt_compile.ipl" -pt "$tplPath" -iw_pt-dcr "$srcfile" -iw_include-location "$output" -ofile "downloads.aspx" 2>&1` ;
[/php]
$tpl path contains the static path to PT file from Y drive
$src file contains the full dcr name from Y drive
$output contains the path of the output directory for ex something like:-
Y:/default/main/IM/PUBLIC_SITE/US/WORKAREA/dev_iwov/products/x
inside x down.aspx should be generated ,so the final ouput should be
Y:/default/main/IM/PUBLIC_SITE/US/WORKAREA/dev_iwov/products/x/down.aspx
but it shows the message
"dcr doesnt exist"
any pointers regarding this issue?
regards.
mav
nipper
dump the complete command to your log file and run it from the DOS prompt.
maverick83
thanks for ur prompt reply
actually i am doing same only
if i use iwpt_complile , the dump output shows "coudlnt load dcr"
if i use iwgen dump shows " not a valid form entry"
very strange situation coz the iwgen command works in another script ,it gives the above msg only when i loop thr the directory using file::find
anyways thanks for ur guidance
regards,
mav
nipper
post your command, something is wrong.
maverick83
thanks for ur response i am using following command for
iwpt_complie:-
[php]
#my $result = `"$IWHOME/bin/iwpt_compile.ipl" -pt "$tplPath" -iw_pt-dcr "$srcfile" -iw_include-location "$output" -ofile "down.aspx" 2>&1` ;
[/php]
$tpl path contains the static path to PT file from Y drive
$src file contains the full dcr name from Y drive
$output contains the path of the output directory for ex something like:-
Y:/default/main/IM/PUBLIC_SITE/US/WORKAREA/dev_iwov/products/x
inside x down.aspx should be generated ,so the final ouput should be
Y:/default/main/IM/PUBLIC_SITE/US/WORKAREA/dev_iwov/products/x/down.aspx
but it shows the message
"dcr doesnt exist"
for iwgen:-
[php]
my $result_gen = `"$IWHOME/bin/iwgen" -t $tplPath -r $srcfile $output_file 2>&1` ;
[/php]
$tpl path contains the static path to PT file from Y drive
$src file contains the full dcr name from Y drive
$output_file contains the path of the output for ex something like:-
Y:/default/main/IM/PUBLIC_SITE/US/WORKAREA/dev_iwov/products/x/down.aspx
but it shows the message
" not a valid form entry"
ny pointers would be very helpful ,thanks in advance
regards,
mav
Adam Stoller
When nipper asked you to post the command - he meant the actual full command, not the variable-infused command which you had already posted.
In order to truly debug your issue you need to provide:
Then, if one of us is feeling so generous as to spend our time debugging your problem - you might get a solution.
maverick83
thanks for the guidance
issue got solved
closing the thread
regards,
mav