Printer-friendly pages - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Scripts & Components (http://get-simple.info/forums/forumdisplay.php?fid=11) +--- Thread: Printer-friendly pages (/showthread.php?tid=887) |
Printer-friendly pages - kweber - 2010-07-30 I just created a new web site using GS. It took my only two days although I did not have any experience in GS, CSS, and PHP, thanks to all the stuff and advice around GS. Now I would like to add a "printer-friendly"-button. The idea is that clicking on this button (or link) would generate a new web page without navigation and in black-and-white. I do understand the core idea and know that I probably need to create a printer-friendly .css and do some PHP programming but unfortunately I lack some knowledge. An example or some hints might suffice; I would appreciate any advice. Thanks in advance! Printer-friendly pages - Zegnåt - 2010-07-30 Your post seems to have been cut-off. Please edit it to contain your actual question so we can take a look at it. Printer-friendly pages - yojoe - 2010-07-30 Things you have to do, to print a page containing only content you want (only htnl&css, no php at all) 1. create a .css, who shows only things you'd like to print from your site (you will have to hide some content inside it, because they may inherit styles from base css; use display: none style) 2. add this css for printing purposes Code: <link rel="stylesheet" type="text/css" href="print.css" media="print" /> 3. add printing button (you may as well stylize it using css) Code: <a href="#" onclick="window.print(); return false;" title="Print page">Print</a> good luck Printer-friendly pages - kweber - 2010-07-31 yojoe Wrote:Things you have to do, to print a page containing only content you want (only htnl&css, no php at all)Thanks a lot. I found another way to do the job but it is not as simple as yours. Printer-friendly pages - JWH_Matthew - 2010-07-31 I am thinking this could be a good plugin. I am just not sure how to do it without having a common css style sheet that I could just replace if print was clicked. I think the only way it would be possible is if the created their own print style sheet and then the plugin just added the print button. Printer-friendly pages - yojoe - 2010-07-31 matthew: think how to print only get_page_content() section iframe isn't a good solution, but maybe using jquery, opening the page content in new layer and then printing it ? |