News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Felix Geisendörfer's Blog:
Make printing easy, using a PrintController
September 25, 2006 @ 07:41:14

On the ThinkingPHP blog today, Felix Geisendörfer shows, based on some of his own personal work, how to make printing simpler inside of a CakePHP application.

The web site I currently work on is going to be for the hotel where my step father is the manager of. One of the things that is going to be an important 'feature' for the site, is to make it printer friendly.

Since the new site has a very clean markup, I thought about simply creating an additonal style sheet for the media type "print". However, after thinking about it a little bit more today, I came to to the conclusion that I'm dealing with WYSIWYG visitors. So I decided to get a little fancier, and to create a PrintController, which would output printable versions of any site requested by /print/*

He gives the code for the controller and for the easy to use link to go over to the "printable version" of each page, hiding the none-printable information from the browser.

0 comments voice your opinion now!
cakephp framework print controller version hide cakephp framework print controller version hide


blog comments powered by Disqus

Similar Posts

Reddit.com: About to start learning my 1st MVC framework... What are your recommendations?

Andi Gutmans' Blog: Zend Framework invading Zend?

Jim Plush\'s Blog: My-Bic Ajax Framework Video Tutorials Online

Andi Gutmans\' Blog: New Zend Framework Website look launched (almost)

Developer.com: Build your own MVC Framework: Getting your Framework Up And Running


Community Events

Don't see your event here?
Let us know!


xdebug example voicesoftheelephpant opinion release series performance api php7 conference interview extension framework version community introduction laravel symfony2 library podcast

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework