Changes

SmartField View

617 bytes added, 17:26, 6 June 2016
SmartField sample template for creating PDFs
==SmartField sample template for creating PDFs ==
To When a user configures a Web Page view there will be a link labelled '''HTML TEmplate''' against the HTML Template setting.[[Image:SmartFieldSample.png]] If you click on this link then it will populate the HTML Template setting with HTML that will in turn generate a PDF of your SmartField view, with a header and footer. Use the sample template below in your [[Custom Field Type: Display Only – Web Page View|web page view]].
<pre style="white-space: pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<LINK RELmeta name="stylesheetviewport" TYPEcontent="text/css" mediawidth=device-width, initial-scale="screen" HREF1.0, maximum-scale="/css/styles_common1.jsp?root0, user-scalable=@rootcompanyid@no"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="/css/iface/styles_aui_@rootcompanyid@.css" />
<link rel="stylesheet" type="text/css" href="/css/iface/styles_obj_@rootcompanyid@.css" />
<!--These styles makes the background white when printing, declares the font,confines the content to fit in the printable size of 700px, breaks the content on the TR to avoid odd breaks of content. -->
<style type="text/css">
<!-html {background-color: #FFFFFF;}body {font-family: Helvetica, Arial, Times New RomanSans-Serif;background-color: #FFFFFF;}.overflow {width: 700px;word-wrap: break-word;}--><!-- this will prevent page breaks in the SmartFields rows in the PDF -->.overflow tr {PAGE-BREAK-inside: avoid;}
</style>
<title>SmartField ViewTitle</title>
</head>
<body bgcolor="#FFFFFF" topmargin="25" bottommargin="25" leftmargin="30" rightmargin="30"><!--Use Letter--><!--Use TTF--><!--filename='filename'--><!--START: Header and Footer when converted to PDF-->
<pd4ml:page.header>
<table width="700px" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><div class="overflow"><strongdiv id="header_container"><div id="header_container_in" class="centerlayout"><div class="header_container_left"> <img class="header_logo" id="header_logo_sm" src="@logourl@" border="0" alt="Logo" valign="top" align="left">Header Text<div id="navtitle">Title</strongdiv></div></div></div></div></td></tr><tr><td height="20px">&nbsp;</td>
</tr>
</table>
<table width="700px" align="center">
<tr>
<td style="text-align:right">page Page $[page] of $[total]</td>
</tr>
</table>
</html>
</pre>
 
 
==See Also==
Smartstaff, administrator
4,478
edits