change location of "printable page" link
TfR75 - September 5, 2007 - 13:34
| Project: | Printable |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Currently, the printable page link is displayed almost immediately below the node heading, which does not sit nicely with most layouts and dominates the content. It might be better to have it included in the service links or have it sit on the bottom of the page. If it sits on the top then including it in the tabs might be a better way or have a logo displayed on the right hand top corner. Ideally, the user should be able to choose.
If there is a way of achieving this via CSS, please let me know how to do it.

#1
I had the same issue and figured out this hack:
The location of the "printable page" link is stored in the global $help variable.
Normally this comes before $content in your theme. Just move it after $content. However, this moves
everything in $help along with it, so you might have to do some further tweaking depending on what other modules you have installed. You could parse it out of $help, too...
<?php if ($help != ""): ?><div id="help"><?php print $help ?></div>
<?php endif; ?>
#2
I ran into this problem as well, execpt in my case I wanted the printable link in an entirely different place than the help messages. I had to do two things to get the result I wanted. First, prevent the module from putting the link in the help div by overriding the theme function (in template.php):
<?phpfunction phptemplate_printable_link($url)
{
return NULL;
}
?>
Next, I wanted to put the link in a block so it could be positioned the Drupal way. I had a custom module for my site, but you can use a custom php block just as well. Create a block (at admin/build/block) with the following code:
<?php$url = "printable/" . $_GET['q'];
print( l(t('Printable Page'), $url) );
?>
Luckily, the printable module uses a theme function for it's output so you don't have to hack the module to get this result, however, I think it would be more Drupal-like if the module exported it's own block.