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)
iwgen and pt parameters
Tim__D
I am generating pages in multiple languages from a single dcr and and creating the non-english pages automatically when generating the main english page. I've got this working using iwpt_compile and iwgen but iw_pt_compile is the only one that I was able to pass the language parameter to e.g "en", "sp" etc...
Is this possible? I'd like to use iwgen because it relates the file to dcr and does not produce a file that is modified every time the page is generated.
- Tim
Find more posts tagged with
Comments
Adam Stoller
Well, you can use the -smartwrite flag with iwpt_compile.ipl to have it not create a modified file if [it believes] the file has not changed, and you can use post-operative code to set the EAs on the generated files ... I don't think there is any [supported] way to pass abitrary parameters through iwgen / iwregen.
If you can put the logic for generating all the language variants within the PT rather than passing it in as a parameter then you should be able to use either iwgen or iwpt_compile.ipl - however you would still have the issue of making sure that you set the EAs on the "other" files output by the process (but that can be taken care of within the PT itself) -- look at the documentation for iw_ostream for more information about this kind of approach (there have also been several threads talking about this in the forums which you could search through)
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Tim__D
Thanks. smartwrite is working like a champ. I can think of a few other applications for this as well within our system. Problem is a new file all the time means conflicts when merging to other branches. This should help us with that. Thanks for taking the time.