One view - two View Templates

Hello,

I use a ‘fancy’ view template to display images, links, additional static text, etc with my views.

This works fine except when it comes to printing where the images and extras get in the way - I need a simple display for printing.

I have tried modifying my $$ViewTemplateForDefault form to use a computed subform based upon a querystring value and this works initially. It fails if/when a category is expanded or collapsed. The QS variable is not present when the view is re-displayed collapsed/expanded and so the viewtemplate loads the ‘fancy’ subform.

Another attempt - I duplicated a view and one copy opens with the ViewTemplate for default and the other copy opens with the ViewTemplate for Printing. I could do this for all views which might need to be printed.

I hate the idea of having two copies of each view to update if an update becomes necessary.

Any other ideas?

Thanks in advance,

Marc Robson

Subject: View Templates for printing

How about this?

Make $$ViewTemplateDefault your “fancy” view template.

Create an additional view template for EACH view from which users can print and embed the appropriate view in the template.

Name the template consistently; for example use “PrintTemplate for ByName” with the embedded view “ByName”. (Do NOT use “$$ViewTemplate for ByName”.)

On $$ViewTemplateDefault, add a button called “Printer Friendly”. Calculate this button’s formula as:

@Command([OpenPage];"PrintTemplate for "+@ViewTitle)

Subject: RE: View Templates for printing

This is the approach I used. This continues to work when expanded/collapsed and I dont have to worry about updating two views.

The link formula is similar to what I had been doing with my prior attempts.

I didnt select to use the CSS solution because I wanted the user to see how it would print rather than showing the full images, etc but printing the concise version. That website DID include an article with a very cool idea that I am excited to try out Dynamic Text Replacement – A List Apart

Thanks for the suggestions,

Marc

Subject: One view - two View Templates

CSS. Use media-specific style sheets to hide stuff that shouldn’t be printed. I’ll refer you to:

They’ve explained the whole thing pretty well.