for (my $i=0; $i<@ARGV; $i++){ if ($ARGV[$i] =~ /iw_pt-preview/) { $mode = "preview"; }}
I can't remove the generation tpl from the available_templates.cfg because it needs to be there so it can generate in workflow
First, it's templating.cfg and not available_templates.cfg (probably just a slip/typo).Second, if you use iwgen or iwpt_compile to do your WF generation, you may specify any pt you wish, registered or otherwise
I solve this issue a little differently.I use the same TPL for both (then it never asks for the TPL). iwpt_compile can point to any TPL, so you can have another not referenced in templating.cfg, that can be used in WF.Finally, if you want to do something different in preview as opposed to generate, a bit of perl like this will work: for (my $i=0; $i<@ARGV; $i++){ if ($ARGV[$i] =~ /iw_pt-preview/) { $mode = "preview"; }}
Either I'm mis-remembering, something has changed, or you're only partially right. I seem to recall that iwgen looks up information in the templating.cfg file to find registered PTs and extensions - whereas iwpt_compile.ipl does not.
you're right I did mean to say templating.cfgI've gotta run a test here. Last time I tried to generate a file with iwpt_compile without having an entry in templating.cfg I got an error. Let me check though. It could be one of the options I'm using.Thanks,Brian
Comments?
PT "preview-recognition" approach seems both safer and more logical.For example, FormAPI is ignored completely if you open up your DCR in View mode