Home : OpenEdit SDK : OE Toolbar : Editing the Layout : Printer Friendly
Printer Friendly
You can use CSS to turn off certain images and tables for printing.
If that is not enough then you can also make a simple viewer html page to view a chunck of content.
You could make a link such as this in your layout:
<a href="'/print.html?path=$content.path" target="newwindow">Print This Page</a>Then create a file such as /print.html:
<html>
<head>
<script type="text/javascript" language="Javascript">
window.print();
</script>
</head>
<body>
#set( $toprint = $pages.getPage($context.getRequestParameter("path") ) )
<p class="post-title">$toprint.title</p>
<div class="post-description">
$pages.stream($toprint)
</p>
</body>
</html>
Finally add /print.xconf:
<page>
<layout />
<inner-layout />
</page>
