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)
cancel generation from within PT
Hans
Is there a convenient way to cancel page generation from within a PT? Thanks - any help is appreciated.
Doing this in workflow for our situation would be messy.
TS 6.1 on Solaris 8
Find more posts tagged with
Comments
Adam Stoller
Can you provide more context to your question? Like provide a scenario in which you need to do this?
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Hans
Based on some DCR value or combination, such as an approved flag, I don't want to overwrite the current file.
Currently if I check the value and put all the html within an if($flag eq "true") block, a zero length file is still written, effectively clobbering the current file..
The reason I would like to do this in PT vs workflow is a user issue - they like to take shortcuts, dont always follow procedure etc. So the PT would become the last line of defence.
Thanks very much.
TS 6.1 on Solaris 8
Adam Stoller
The only thing I can think of off the top-of-my-head (other than filing a feature request) would be to use the logic within the PT to read-in the pre-existing file and write it out again - the file's timestamp might get changed but the contents would remain unchanged...
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Hans
That should work - simple is best.
thanks for your help.
TS 6.1 on Solaris 8
Johnny
I believe a file is not "modified" if the contents is the same after generation.
iwgen uses the -smartwrite option (of iwpt_compile.ipl) so if you use the suggestion and write out the file exactly as it is, it wont actually get written. Hence the file is left untouch.
John Cuiuli
civ3
It might be possible to set ostream to another temporary file at the beginning of the PT. Then change it back to nominated file only if the DCR passes the required test conditions.
civ3
gzevin
In a similar topic I believe I gave another suggestion - use iwpt_compile and redurect it to /dev/null
Greg Zevin, Ph.D. Comp. Sc.
Independent Interwoven Consultant/Architect
Sydney, AU