How to print a page


Use the /print.php page as a template to print a page without any of the normal template design elements.

print.php requires two parameters:

ParamterExamplePurpose
tt=invoicesPass the tpl directory so that other include files required can be added to the output
pp=1000Pass required paramters, in this example the invoice number

As printing often requires specific code modifications print.php is not intended to be a modularised solution. It is ok to add code, just make sure code you add does not impact functions already using it.

You will find the following code already exists. It is around this area you will probably need to make changes to add your printing requirements.

<?php
/**********************************************************************
 *  Add and modify your code below here
 **********************************************************************/


if($t == 'invoices') {
    $inc = 'tpl/en/invoices/invoice.php';
    $invoice_id = $_GET['p'];
}

include($inc);
?>






Programmer Notes | Return to What's up?