Hi,Im using Teamsite 6.5 SP2.I would like to set the preview path for the HTMLs.I have included the following in the java scriptfunction initAutoNameDCR() { IWEventRegistry.addFormHandler("OnPreview", handleNameDCR);}function handleNameDCR() {IWPageGeneration.setOutputFile("/temp/preview/preview.html");}I have also defined the preview path in templating.cfg.The problem is, when i click on 'preview' button in DCT, the preview path defined in templating.cfg is considered and the path defined using 'setOutputFile' is not working.Please help.
IWPageGeneration.setOutputFile ( filename create_directories)Sets the output file name to be used for previewing and generating. This modifies the corresponding form settings option.
Hi,I am using the following function to utilise the auto generation.But for some reason, it is not creating the file. And it does not give any errors either.Can anyone shed some light on it?IWEventRegistry.addFormHandler("OnGenerate", handleNameDCR);/*function that will handle autonaming of file on Generation.This will take value from the pageName DCR field, presentation template extensionand the siteSection drop down to generate the path for the file.*/function handleNameDCR() { //var DCRName = IWDatacapture.getItem("/template/pageName").getValue(); alert (dcrPageName); var presentationTemplate = IWPageGeneration.getPresentationTemplate(); alert(presentationTemplate); var item = IWDatacapture.getItem("/template/siteSection"); var label = item.getOptions()[item.getValue()].value; alert (label); var extn = presentationTemplate.getExtension(); alert (extn); var filePath = "/preview/" + label + "/" + dcrPageName + "." + extn; IWPageGeneration.setPresentationTemplate (presentationTemplate); IWPageGeneration.setOutputFile(filePath, true);return true;}TS 6.5 SP3Windows 2k3-Rajat