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)
Auto generating html file from dcr.
DebSaunders
Is there a way to automatically generating file from dcr, instead of saving dcr and then click generate to get the output file.
Too many clicks to create on html file..
thanks
Find more posts tagged with
Comments
nipper
Nothing trivial, but you can certainly implement it via either a workflow (that is the most common approach) or by FormAPI and callserver.
Can you describe exactly the steps you would like to see ? In my implementation, users save DCRs, TS asks if they want to submit, the WF takes the DCR, runs a generate step which attaches the HTML page, images referenced in the DCR and rebuilds the HTML.
DebSaunders
What i want to do is...when user saving the dcr, i want to automatically create a output file using tpl.
Rite now when user clicks on generate he has to go thorugh following steps:
1. It has to navigate through directory structure to save the dcr and then...
2. It has to navigate through directory structure to save and name the output file.
i just want the first step...second step should happen automatically...this will make there life easy...
nipper
You can do it, but it is not pretty. You need to execute a callserver script to run the generate and then have it open a new window with the final output.
However, if you train your users to edit the generated HTML rather than the DCR, then they are asked if they want to regenerate the page and it will display the output automatically. Since they have already selected the output file when they edited the page, TST does not ask what the output should be.
HTH
Andy
labbrown
You can ask the user to name the dcr and save it and automatically generate the file using the name the dcr was given.
Use FormAPI to do this.
dazzlad
Rewind a little, which version of TeamSite are we talking about.
You can probably do something with auto naming and generating the DCR using formAPI but the approach will vary depending on version.
DebSaunders
We are using TeamSite 6.5.0 Service Pack 3.
So how i can auto generate the page. I saw FormApi's developer's guide and there are some information about page generation... but, not enough.
so where i can get more information. I think user has to save the dcr and then it should generate the page automatically..
dazzlad
Have a look at:
IWDCRInfo.setDCRName
IWPageGeneration.setOutputFile
boolean IWPageGeneration.setPresentationTemplate
in the form API doc.
if you set all of these values then the user shouldn't be prompted for any input when they click generate.
You should also be able to remove the save button using UI customsiation.
Hope this helps.
DebSaunders
Thanks...I am looking into this.
DebSaunders
i did according to the formapi's developer guide instructions....still its not working. any idea's...
OnSaveDone event handler..i did following commands...
var presentationTemplate = IWPageGeneration.getPresentationTemplate();
var filePath = "/test." + "xml";
IWPageGeneration.setPresentationTemplate(presentationTemplate);
IWPageGeneration.setOutputFile(filePath,true);
return true;