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

ItemTemplate edit

Summary Preview does not respect VIEW_TEMPLATE
ReportedBy MichaelDaum
Codebase trunk
SVN Range TWiki-5.0.0, Tue, 23 Sep 2008, build 17539
AppliesTo Engine
Component
Priority Urgent
CurrentState Closed
WaitingFor
Checkins Foswikirev:414 Foswikirev:415
TargetRelease patch
ReleasedIn 1.0.0
Topic revision: r10 - 09 Nov 2010, MichaelDaum
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License