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)
Locked into specific template in preview & generat
infoForDj
Hi,
We have a DCT that has 3 TPLs associated with it.
When the user hits on "preview" and "generate", he is prompted to select the TPL. When he hits "preview" or "generate" again, the preview or generate happens with the TPL previously selected.
We wanted to customize this so that the user is prompted to always select the TPL.
Initially, we modified datacapture_buttonframeset.jsp but that led to problems in intiating a Workflow through tt_data event.
We then inserted following javascript code within DCT to accomplish the above
function doPreview(){
top._dcWin.datacapture.setPT(0);
top._dcWin.postPreviewForm("top._dcWin.datacapture_buttonframe.previewCallback",0);
return false;
}
function doGenerate(){
// top._dcWin.datacapture.updateSettings("", 0, "");
top._dcWin.datacapture.setPT(0);
top._dcWin.postGenerateForm("top._dcWin.datacapture_buttonframe.generateCallback");
return false;
}
IWEventRegistry.addFormHandler("OnPreview", doPreview);
IWEventRegistry.addFormHandler("OnGenerate", doGenerate);
This works.
However, during the "preview" mode, this fails as FormAPI is disabled during the "preview" mode.
Is there anything which we can do to accomplish the above mentioned problem during "preview" mode?
Thanks,
Dhruv
Find more posts tagged with
Comments
chuckles
I personally think the TPL selection window makes for a really bad user experience. You should just put a radio button on the DCT where the user can select the output format and then have a single TPL that conditionally generates different formats or just includes other TPLs that will do the job. I think that in most cases, one DCR will only be output in one format and this way the user only ever need select the format once and won't even be able to change it in preview mode. In edit mode, they will still be able to change the output format if needs be.
jbonifaci
Did
this post
not work for you? Sounds like you went with a different option than what I suggested there. I don't think yiou would have this problem if you do what I suggested in that post.
~Jeff
infoForDj
Hi,
We did go with your option but with this, when the user generates 3 different shtmls for the same DCR (DCR is opened in edit mode) and clicks on "Finish" button, instead of being taken to "Submit Now" screen, he gets an error and is not able to initiate the Workflow.
This is the reason we inserted javascript code within the DCT.
Can you please help us with the "preview" mode problem or suggest something else?
Thanks,
Dhruv
jbonifaci
I don't have time to play around with it right now. I would suggest contacting support.
~Jeff