Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Would be great to be able to use a !title token for the message subject in print_email.
Comments
Comment #1
jcnventura CreditAttribution: jcnventura commentedYes, it would be nice. Let's see if someone else does it or maybe when I have enough time available for that.
João
Comment #2
ron_s CreditAttribution: ron_s commentedA token would be nice, but what about something simple like just displaying the node title on the "Send page by e-mail" page? At least let the user have confirmation of what page he or she is sending.
This is a quick way I added this functionality to the
print_mail.inc
file (FYI, thel
function used here is for Drupal 5, not Drupal 6) --1) Around line 39 in the
print_mail_form
function, add the following line of code:2) Around line 81 in the
print_mail_form
function, add the following lines of code:I'm sure this can probably be streamlined, but a quick fix.
Comment #3
ron_s CreditAttribution: ron_s commentedI think it's worthwhile to review the code I posted and see if it should be added ...
Comment #4
jcnventura CreditAttribution: jcnventura commented@ron_s: I don't see why your patch would be useful.. The user will click in a link in the original page, so he already knows which page he is sending.
And you're not even answering the original request..
João
Comment #5
ron_s CreditAttribution: ron_s commented@jcnventura: The patch is useful because users like confirmation. It sets their mind at ease that the system has recorded their selection. This is somewhat like saying "Why do we need to show items in a shopping cart? The user added the product." Showing them what they have selected makes the functionality more user-friendly. Also I'm not sure if you're aware, but the Forward module already has this capability.
As for the token, yes you are correct it does not fully answer the original request. My point though is what I have added could easily be extended and pre-loaded in to the subject field (which is the way the Forward module does it).
Comment #6
jcnventura CreditAttribution: jcnventura commented@ron_s: I see your point. Your patch is a bit overkill (all the complexity of a node_load), which I am pretty sure might be avoided if all we want is the title. Next time that I have some free time, I will try to work something out.
Comment #7
jcnventura CreditAttribution: jcnventura commentedJust committed some code that adds the !title token to the subject field and also the page title (and link) to the form.
João