NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use
trunk.foswiki.org to view this page for some minimal testing.
Use
Item9693 for docu changes for 1.2 and 2.0.
Item6039: Preview does not respect VIEW_TEMPLATE
| Priority: |
CurrentState: |
AppliesTo: |
Component: |
WaitingFor: |
| Urgent |
Closed |
Engine |
|
|
Don't show the "uggly truth" in
preview mode. Instead, wrap the data into the same VIEW_TEMPLATE that the user normally sees.
The bug in itself is not sever, only uggly. But as it is a fundamental flaw, I make it urgent to get it fixed soon.
But how do we mix in the normal preview gear into the VIEW_TEMPLATE? Do we need a PREVIEW_TEMPLATE variable?
Dynamically rendering a
preview similar to
view (e.g. using
SEARCH,
FORMFIELD, etc) is a problem in itself because it does its calculations
on the base of the data already committed to the store. However, the preview holds the
new data in a hidden form which is not committed
yet and thus is not accessible to the TWikiApplication inside a preview. Here it is your pandora's box.
This is not fully solvable other than ripping out the preview button, afaics.
--
MichaelDaum - 01 Oct 2008
I'd rather that Preview used VIEW_TEMPLATE - otherwise there's a good chance of things getting out of sync, and the users not seeing it fo what they mean.
--
SvenDowideit - 05 Oct 2008
i just faced this question with the
PublishPlugin. i decided in the end to honour VIEW_TEMPLATE rather than try and support PUBLISH_TEMPLATE, because users will reasonably expect it to do what it says on the tin. i think the same applies here.
Done