Hi
I have tried to search for a solution for this, but found nothing,
I want to theme the forward link with an image (on every page) that open the forward window
What is the simplest way to do this ?
I am using print module , and i am using this code , will something like this work here ?
<?php
// this function is called from the page.tpl.php
function THEMENAME_print_icon(){
if (module_exists('print')){
return print_insert_link();
}
return '';
}
function THEMENAME_print_format_link() {
return array('text' =>"<img src='" . base_path() .path_to_theme()."/images/ico_print.gif' />",
'html' => TRUE,
'attributes' => array());
}
?>
this way i can put the icons in a fixed place
I have found that this module works on *every URL* so basically i can add to the url "forward" in the begining of every url , so if the url is : http://SITEURL/PATH/TO/PAGE i just link to http://SITEURL/forward/PATH/TO/PAGE
I guess there is a better way to do this
Any help will be appreciated
Avior
Comments
Comment #1
Peter Bex commentedTry visiting admin/build/block, and put the 'forward' block in one of the available regions. This will add a link which you can easily style with CSS using a background image. No need for all this PHP hackery :)
To get rid of the regular forward links on node pages, just disable "show forward link" on every page type. The block will not listen to this setting; it's always visible.
Comment #2
seanrYes, the best way to do this is with the block. There's no theme function for it since it's just a simple link.
Comment #3
seanr