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.
Hi you all.
I've realized that the last version only places a print (both on corner or in links area) on full node display but never on teasers. When I create a list of teaser on views I can see other links on the links area (as send email or read more) but the print link never appears. I can't see anything special to set, but I can't figure what's going wrong. Any idea please?
Comment | File | Size | Author |
---|---|---|---|
#9 | print_teaser.patch | 10.44 KB | AndyF |
Comments
Comment #1
jcnventura CreditAttribution: jcnventura commentedHi,
This is actually the intended result. If you have book nodes, you will see that the 'Printer-friendly version' link created by core Drupal only shows on the actual nodes and not in lists of teasers..
You're the first to even ask for it, so I am pretty sure most people are quite happy that the link is not shown in the teaser view. The 'Read more' must be shown as it is one of the ways to open the full node. As to the 'send email', whatever module is creating that link, it should actually be a bug that it is doing that.
João
Comment #2
JordiTR CreditAttribution: JordiTR commentedThanks João for your fast answer.
Despite it could be considered a bug to render the link on the "links area" of teasers listing, and even considering that the links area is used by many modules to display some links (like comment and so on), and what is more, considering that the print module has always placed a link on the links area on the teasers lists, that simply means that if I upgrade the module on many sites, customers are going to consider that the links is "left".
Even more, why not considering also that the links area on the teasers list is completely useless even because for the "read more" link?, when in fact we can jump to the corresponding node by clicking on the node title ;-)
I'm surprised that some feature that has being going on for so many releases could be deprecated without more consideration.
In any case, could you give some clue to how use template.php as an alternative to place that link again in the links area of the teaser view :-D
Comment #3
jcnventura CreditAttribution: jcnventura commentedWhat do you mean by 'he print module has always placed a link on the links area on the teasers lists'??
What was the last version you used before 3.7? As far as I can remember, it never placed a link on teasers...
As to how to change it.. You can call the print_insert_link() function somewhere to create the link. Or you can edit the print_link_allowed() function to remove the check for the teaser.
João
Comment #4
JordiTR CreditAttribution: JordiTR commentedWops, never?
Well, anyway, thanks for the hint :-)
Comment #5
shs27 CreditAttribution: shs27 commentedI think allowing the option to include print links in teasers would be great.
Comment #6
shs27 CreditAttribution: shs27 commentedI think allowing the option to include print links in teasers would be great.
Comment #7
jcnventura CreditAttribution: jcnventura commentedSubmitting the same comment twice only counts as one vote..
As I said in #1, that's not what teasers are for.. If you really want it in your site, follow my suggestion in #3 and edit the print_link_allowed() function to remove the check for the teaser.
João
Comment #8
vood002 CreditAttribution: vood002 commentedThanks for the tip...although I hate hacking modules directly, getting email links to show up in teasers was very simple. Just edit the first line print_mail_link_allowed() to look like so:
Comment #9
AndyF CreditAttribution: AndyF commentedHi, I needed this so I edited the module to support it. Please find a patch for 6.x-1.10 attached. It's my first time doing this, so pls look through carefully if interested!
Comment #10
jcnventura CreditAttribution: jcnventura commentedComment #11
AndyF CreditAttribution: AndyF commentedComment #12
enkara CreditAttribution: enkara commentedI would like to have the opportunity to decide if I want the print link in the teaser too! I know you are developing this module for free and I really thank you, but I think it's always good to let the people choose what they consider the best. Sometimes there are some cases we can't think of, where some functionalities make sense.
Comment #13
enkara CreditAttribution: enkara commentedI just wanted to comment that I've tried AndyF patch and it works perfectly, it would be great to have it in the next release. Thank you AndyF!
Comment #14
jcnventura CreditAttribution: jcnventura commentedThanks for the patch! I've just committed it to CVS.
Comment #15
AndyF CreditAttribution: AndyF commentedThanks!