how do i add little icon next to "print a friendly page"? or "email this"? tks

Comments

coreyp_1’s picture

You probably will have to hack the code. Shouldn't be too hard, though.

What we need to know to answer your question better:

1. What version of Drupal are you using?

2. What module(s) is creating the links in question?

radiofranky’s picture

4.63 and with node module

coreyp_1’s picture

unless I'm mistaken, these links do not come from the node module, even though they are shown when a node is shown.

I believe the "print" like comes from the print module, which can be modified around line 149.

I'm not sure which module is adding the "email" link.

On further review, however, I think a better option would be for you to use the translating capabilities of Drupal, rather than editing the code.

Another page on the issue is here: http://drupal.org/node/24593

coreyp_1’s picture

Another option is to use the locale.module to enable transations, then provide a "translated" string, which includes the necessary HTML. The first solution (hack the code) is quicker, but this solution is better in the long run, especially when you need to update the code.

http://drupal.org/node/11130

radiofranky’s picture

Only local images are allowed. printer friendly

i tried...it didn't link to the page..instead..it printed the entire command

czheng’s picture

why not use CSS? set the icon as the background image and indent the text a bit.

coreyp_1’s picture

I believe the links referred to are the links created at the end of a node. Unfortunately, they do not include any CSS class or id identifiers, so CSS is out.

czheng’s picture

oh... oh well

patrickharris’s picture

Isn't it <div class="links"> ?

coreyp_1’s picture

yes, the container div is class="links", but that would style every link in the container (ex. "printer friendly", "e-mail me", "add child page", "add new comment", etc.) in the exact same way. There is no way to select a link individually.

Come to think of it, it would be nice if an option were available to specify a CSS class or id in hook_link(), but that is not an option as of yet (as far as I know).

thomherfs’s picture

+1 for adding a CSS class or id in hook_link().

The ability to individually style links, add images according to themes, etc. would be a nice presentation option.

This should be a formal feature request and not just mentioned in a forum posting.

sepeck’s picture

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

radiofranky’s picture

how do i add to print.module to show a .gif file next to printer friendly version?

can someone show me how to change from plain txt to html? tks