I'd like to change the behaviour of the "print" plugin. Instead of opening the content for printing in the same window, is it possiible to open it in a new window, so that the user can print and then close, instead of "going back"? Further to this, when printing, it is printed also the "Go Back" button on top of the page, and this is not good. Removinf the button, the user can get confused on what to do, that's the reason why to open it in a new window.
I have seen the code in /lib/content.functions.php and I have just added a "text-align:justify;" to the printing code, but I don't know how to open it in a new window (maybe just few lines of javascript should be enough..)
New window for printing?
Re: New window for printing?
Modify the code in plugins/function.print.php as so:
Code: Select all
if (isset($params["showbutton"]))
{
return '<a href="index.php?page='.$gCms->variables['page_name'].'&print=true" target="_blank"><img border="0" src="images/cms/printbutton.gif" alt="'.$text.'"/></a>';
}
else
{
return '<a href="index.php?page='.$gCms->variables['page_name'].'&print=true" target="_blank">'.$text.'</a>';
}