<xmod:printpreview>

Related Topics

 

New to Version 3.0

 

By adding this tag to your detail view template, you can instruct XMod to automatically generate a link to a printer-friendly page. You define the contents and style of the page using this tag. You use the <xmod:printlink> tag to define the hyperlink the user clicks to display the printer-friendly page.

 

The <xmod:printpreview> is essentially a container for other XMod display tags. You define what will be displayed when the user clicks the print preview link in the same way that you create the contents of the detail view. Typically, you'll want to set the style and layout of the print preview to something easily printed by a printer, although XMod doesn't care. It will simply interpret the template defined within the <xmod:printpreview> tag and display the contents in a new window.

 

ATTRIBUTES:

title

This is the title that will be displayed by the browser as the page title. You can include the <xmod:field> tag in the title attribute to make the title more dynamic.

 

EXAMPLE:

This is an example of a detail view template that also defines a print preview.

 

<h2><xmod:field name="Title"/></h2>

<div class="Normal">

  <strong>Submitted By:</strong> <xmod:field name="Name"/> <br>

  <strong>Date:</strong> <xmod:datemodified format="MM-dd-yyyy hh:mm:ss"/><br>

  <strong>Description:</strong> <xmod:field name="Description"/><br>

</div>

<xmod:printlink text="Print This Record" class="NormalBold" style="color:red;"/>

<xmod:printpreview title="Printer-Friendly View: <xmod:field name='Title'/>">

<h2><xmod:field name="Title"/></h2>

<div class="NormalPrintView">

  <strong>Submitted By:</strong> <xmod:field name="Name"/> <br>

  <strong>Date:</strong> <xmod:datemodified format="MM-dd-yyyy hh:mm:ss"/><br>

  <strong>Description:</strong> <xmod:field name="Description"/><br><br>

</div>

</xmod:printpreview>