Changes

Jump to: navigation, search

Custom Field Type: Special - Advanced Data Table

4 bytes added, 20:11, 8 December 2016
Styling XML for web and print (PDF)
Administrators with CSS knowledge can modify the look and feel of their XMLs (e.g. make columns wider or thinner). To modify the look and feel of your XML, create an external CSS style sheet, upload the style sheet to a SmartFolder, add classes to the elements in your XML, and add a link to the style sheet in your '''Special - XML Data''' or '''Read Only - System Variable''' custom fields.
 
==== Styling XML Data for Printing ====
 
You can print your XML if you are displaying it in a '''Read Only - System Variable'''. Size your your XML to fit within 700 pixels wide (portrait) or 900 pixels wide (landscape) to avoid content cutting off, when a PDF is generated. If you have more than one section and more than a few columns, some of your content may cut off when printed if it is not sized. You will also notice columns between sections do not align. To fix this, we will use CSS in a SmartFolder and amend our '''Read Only - System Variable''', which is displaying the XML information.
<pre><div class="xml700"><div class="xmlTitleBar">Title Bar Name</div><div class="xml3col">@xml.fieldname.sectionnodename.html@</div></div></pre>
 
Now create a CSS file. e.g.
Go to the desired SmartFolders and upload your CSS file. Use '''View URL''' to get the path to the CSS file. Then add the relative link back into your '''Read Only - System Variable'''. e.g.
 
<link href="/files/427076/f114840/filename.css" rel="stylesheet" type="text/css" />
 
Add the class '''RightAlign''' to the desired cells in the section builder.
 
If you want to make one cell larger than the others, add a custom class to that cell in the section builder e.g.
 
<pre>.xml3col .xmlCell.note {width:150px; min-width:150px; max-width:150px; font-size:12px}</pre>
Note: your cells must add up to 700 pixels if you are displaying your budget in a portrait PDF on letter size paper (8.5 x 11”).
 
==== Using different styles for Print and Web with XML Data ====
Smartstaff, administrator
4,478
edits

Navigation menu