You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Dave Everson <dj...@hotmail.com> on 2001/11/14 16:29:37 UTC

Displaying a "printer friendly" version of page

I want to add a hyperlink in my web application that allows the user to view a "printer friendly" version of the information that is currently displayed on the page.  The printer friendly view would be displayed in a new browser window (could be a popup) and it would basically just contain the template currently displayed in the $screen_placeholder.  Basically, it would get rid of the top banner and navigation menu.  

Could someone please provide me with a code snippet or advise on how to implement this in a Turbine application. 

Thanks!
Dave

Re: Displaying a "printer friendly" version of page

Posted by Terry McBride <tt...@yahoo.com>.
Dave,

Don't know if there's an easier way, but I would
create a layout with just $screen_placeholder and pass
a var to your screen that tells your screen to be user
friendly.


$link.setPage("[same as
before]").addQueryData("printer_friendly",
"true").[addWhateverElse()]

.
.
.

boolean printerFriendly = 
    
data.getParameters().getBoolean("printer_friendly",
false);

if (printerFriendly)
     setLayout(data, [blank_layout_name]);


Terry

--- Dave Everson <dj...@hotmail.com> wrote:
> I want to add a hyperlink in my web application that
> allows the user to view a "printer friendly" version
> of the information that is currently displayed on
> the page.  The printer friendly view would be
> displayed in a new browser window (could be a popup)
> and it would basically just contain the template
> currently displayed in the $screen_placeholder. 
> Basically, it would get rid of the top banner and
> navigation menu.  
> 
> Could someone please provide me with a code snippet
> or advise on how to implement this in a Turbine
> application. 
> 
> Thanks!
> Dave
> 


__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>