The Contextual Links field only works with fields that have "Output this field as a link" set (views_handler_field_contextual_links.inc line 64). That sort of makes sense, since it needs to get at the link path to add the destination tokens, etc.

However, it's a little strange that the Edit Link fields won't work with it, since it seems like that would be the obvious way to add things to a contextual menu. There really isn't a way to just get the link path from those fields, and I've run into that as an issue before.

Would there be a way to have an additional token available for Edit Link fields that just gives the raw URL, or a way for the Contextual Links field to get that information to use, instead of the constructed string being the only thing that can come out of the Edit Link?

Comments

GuyPaddock’s picture

This is still a frustrating limitation. Just ran into this when trying to use the "Commerce Order: Edit link". It appears that the logic in handlers/views_handler_field_contextual_links.inc assumes too much about the field that's being used for the link. As a result, all you end up with in the contextual cog is a HTML code instead of a link.