tires Posted December 2, 2021 Share Posted December 2, 2021 Hi! I need an alternative rendering for my pages for printing. In this case i can't do it with css but i need a special template or something for the print view. How can i achieve this? THANKS! Link to comment Share on other sites More sharing options...
Robin S Posted December 2, 2021 Share Posted December 2, 2021 In your template file: if($input->get('print')) { // Your special print-friendly markup here } else { // Your normal markup here } In your normal markup include a link to the print-friendly view: <a href="<?= $page->url ?>?print=1">Print-friendly view</a> If you want to automatically open the browser's print dialog you can include this in your print-friendly markup: <script> window.print(); </script> 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now