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)
PT and Output File Information in FormAPI
pacer11
HI,
Does anyone know how to access the information saved in the form settings within FormAPI (Presentation Template and Output File). I am trying to slightly change the behavior of the Generate button so that it generates the page, submits to staging(which already deploys to another staging server) and then insted of displaying the generated file within Teamsite it shows the page as it appears on the staging server.
I would prefer not to alter the presentation templates as they are ( I know that you could get this information from the presentation template), but then I wouldn't be able to re-direct the page that comes up as a result of generation.
Any Ideas?
Find more posts tagged with
Comments
Dwayne
I don't believe the information that you're requesting is exposed via FormAPI.
My guess is that your only choice is going to be to put a callout in place to perform the function that you need.
--
Current project: TS 5.5.2/6.1 W2K
Migrateduser
I think it's available, but not in a supported way. It knows the DCR, and the output file is in a variable somewhere (to support the regenerate prompt), you just have to figure out the variable, then run a CGI to get the extended attributes to get the PT. I would love to hear the excuse for releaseing the API without this obvious functionality. But if they edited the DCR directly (not the output file), you have to have custom logic that sets an extended attribute when content is generated from the DCR and use that, or have logic for determining the output file(s) for any DCR.
Edited by john on 08/06/04 02:04 PM (server time).
pacer11
Thanks for your response,
Let's say I wanted to do a callout, will the environment variables that I have access to have the output file and presentation template info?
Migrateduser
No.
Adam Stoller
Do you need the users to select a PT for the DCR - or is that something that can be programmatically determined (e.g. one per DCR-type)?
Do you need the user to select the name and location of the output file - or is that something that can be programmatically determined (based on the name and location of the DCR)?
If you can do the programmatically determined part for both of the above - you use FormAPI to disable the Generate button (TS5) or modify the templating.cfg to not display the Generate button (TS6) and add a callout to your DCT form which (a) verifies the DCR has been saved, and then (b) performs the generation using either iwgen or iwpt_compile.ipl [latter requires you set the EAs on the output file], (c) performs the deployment to the staging server, and then (d) redirects itself to the URL of the newly deployed page on the staging server.
If you need to prompt for any of the information, you'll have to write your own code for doing that in the CGI callout (I don't think the code that TS uses for that is "re-usable" for such customizations) - and then the rest is as indicated above.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
pacer11
Hi,
I already have a process in place where the user fills out information in the form settings prior to them saving the dcr. If they try to save the dcr without having this information, it provides an alert box reminding them accordingly.
As far as the callout is concerned, the problem (I think maybe I may be missing something) with this is that I need to have the presentation template value as well as the output file value within the cgi environment for me to do a callout ( iwgen needs this as well as iwpt_compile)
Once I can generate the file, then the rest of the process is easy ( I have a trigger in place already that automatically deploys any files submitted to staging to the appropriate location on the staging server)
Thanks for the suggestion.