Hello,

I'm trying out Send, and I want to be able to show the send link on specific pages. I know that you can disable the feature for node types (blog, page, story, etc.), but I want to disable it on specific nodes. Whenever I leave the link text field blank -- as it says to leave it black to suppress the link -- it doesn't seem to work. Any way around this??

Comments

jerdavis’s picture

Version: 4.7.x-1.x-dev » master
Status: Active » Needs review
StatusFileSize
new1.32 KB

The link suppression is currently not working correctly, I believe this is attributed to the hierarchical method of storing settings for the module and any sub modules - but I've confirmed this to not work correctly under HEAD.

I've created a patch against head which changes the link suppression from blank to <none>. Using a blank line allowed for the default settings from further up the tree to take over. Entering <none> on a per-node basis, or per-type basis allows you to properly suppress the link and present it only on select nodes.

allie micka’s picture

I love this idea of using <none> to hide the link text - it's very clear and consistent with other parts of Drupal. I have updated the help text a little to explain what's going on.

This uncovers an additional issue/question of what to do with empty values. My inclination is to have _send_value() delete values that are empty strings so that items can pick up the value from the next level up ( e.g. clearing the value on the "Page" content type will cause pages to pick up the default values.

I'd like to test these changes together so that we can get them into an update hook.

Thanks!

allie micka’s picture

StatusFileSize
new681 bytes
jerdavis’s picture

Updating with another patch...

jerdavis’s picture

StatusFileSize
new1.51 KB

This patch adds some cleanup to send.install for existing instances of a null linktext, and also adds a delete to the _send_value() function that removes values which have been set to null.

allie micka’s picture

Status: Needs review » Fixed

Committed - THANKS!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.