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)
Changing Preview Button Function
dlukezic
I have never tried to do this before and would appreciate assistance from anyone who has. For the preview button on a DCR, I would like to be able to have that preview call a web page from another server. Currently, it looks for a presentation template. I do not have presentation templates in my solution. Rather, I use DataDeploy to publish my data to the "preview" server and XSL/XML are used to generate the web page. When a user hits the preview button in TeamSite, I would like for them to see this generated web page. Is there any way to reconfigure the Preview button?
Thanks!
Doreen
Find more posts tagged with
Comments
nipper
Not as clean as you would like, but you can write a PT that runs a perl script to do the deploy. THen redirect to the server. It is not rocket science, we do it here.
Andy
iwovGraduate
What version of TS are you using ?
An alternative is to create a Presentation Template that will redirect to an appropriate page on your "preview" server. I assume you already have a solution to publish the changes to the "preview" server on saving a DCR.
dlukezic
We are using TeamSite 6.0. Is there a difference in this functionality between versions?
iwovGraduate
In 6.0 provides more support to customize the UI in general. Not sure about the Preview button in particular.
You might want to take a look at the UI Customization guide and the UI Toolkit documentation.
dlukezic
I'm sorry... I've looked at the list of available documentation and I can't see the documents that you are talking about. Are they named something else?
Thanks,
Doreen
Gregg Faus
In the current release of TS 6.0 you cannot change the behavior of the preview button. I would doubt Interwoven would allow customization either. I would put whatever logic you need in your presentation template as suggested earlier.
iwovGraduate
You can find the User Interface Customization Guide on the support site: Documentation --> TeamSite and Workflow.
https://support.interwoven.com/library/manuals/teamsite/pdf/600/UICG.pdf
As suggested by gfaus and nipper the UICG might not help you for what you are looking for.
Is there any reason for not using the PT which will redirect to your "preview" server ?
dlukezic
Thanks for the link!
There is no reason that I can't use the redirect... I was just trying to accumulate all of the info that I could.
Thanks everyone!
Doreen
dlukezic
I have a follow-on question... to re-direct, I would like to pass an ID (parameter) to the URL I am re-directing to in order to ensure that I am getting the correct page. Do .tpl files take parameters and/or pass them on?
Thanks,
Doreen
nipper
The only way I know of to pass a parameter would be with a DCR value. Once the TPL/Perl script has a parameter, it can be easily built into the URL of the page you are redirecting to.
This seems too simplistic of an answer, does it help ?
me
dlukezic
It does help! Yesterday was the first day that I had ever looked at a presentation template, so the simplistic answers are great too! Thanks!
Next question though: The web site that I am redirecting to has a lot of caching on it and before viewing a new page, I need to clear the site's cache. I have a URL that I can call that calls a JSP that clears the cache. Is there anyway that I can use the presentation template to call this before it redirects to the page I want to preview?
Thanks again!
Doreen
Adam Stoller
A presentation template is an arbitrary script that processes arbitrary input (the DCR or some other XML) and produces arbitrary output (often HTML, but can be pretty much anything).
My guess is that the presentation template is NOT doing the redirect - the presentation template is generating a file which is being sent to a browser for display and it is this generated file being processed by the browser that is doing the redirection.
As such - you could probably have the presentation template *or* the generate page invoke the JSP that clears the cache too.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
dlukezic
Thanks for the advice! I ended up putting some JavaScript in the .tpl file to open a separate window, call the other JSP in there, and then close the window again.
Thanks for all your help!
Doreen