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)
how can i execute iwgen command in tpl
dinesh123
Hi
Can anybody know ,how to execute iwgen command through tpl.I.e i have iwgen command to which i am passing dcr and tpl and generated page path ,now instead of executing this command on command prompt,i want to execute it in tpl file.
My iwgen command is
iwgen -t /default/main/PGG/PGG_website/PGG_Website_WA/templatedata/ccmsTest/dataTest/presentation/ccmsTest.tpl -r /default/main/PGG/PGG_website/PGG_Website_WA/templatedata/ccmsTest/dataTest/data/record_name testPage.html
If anybody know solution of this ,please let me know.
Regards,
Dinesh
Find more posts tagged with
Comments
Migrateduser
You can call an external program from inside a TPL from an iw_system tag or from an iw_perl tag, using backticks or the system() Perl function.
bw
Bob Walden [bob.walden@interwoven.com]
Interwoven Education Group
IM: Yahoo, MSN bob_walden
Johnny
You might be interested in looking into another approach if it suits your needs.
iw_ostream allows you to generate multiple pages with in the one template (meaning one perl execution).
inside your new ostream, you would then use the iw_include tag to select another template.
iw_load_dcr allows you to use alternative dcr's aswell!
John
Sydney, Australia
dinesh123
Hi
I was tried iw_system command but it is doing nothing i.e it ask me location to keep generated page,which i hardcoded as one of parameter in iwgen command.I am sending corresponding code ,please have a check on this and tell me what is wrong with this.
My tpl code is
<?xml version="1.0" encoding="UTF-8"?>
<iw_pt name="ccms">
<iw_perl><![CDATA[
iwpt_output('<cf_threecolumnpage sectionid=127 menuid="marine" title="Cummins" >');
]]></iw_perl>
<iw_system command = "iwgen -t /default/main/Career_Development/career_development_WA/templatedata/ccnitcd/homePage/presentation/homePage.tpl -r /default/main/Career_Development/career_development_WA/templatedata/ccnitcd/homePage/data/testccms /default/main/Career_Development/career_development_WA/templatedata/ccnitcd/homePage/presentation/testPage.html" />
</iw_pt>
Migrateduser
You might try adding the full path to the iwgen command in the iw_system command attribute.
bw
Bob Walden [bob.walden@interwoven.com]
Interwoven Education Group
IM: Yahoo, MSN bob_walden