It would be incredibly useful to have an entity token available for the display_url. [node:field-link:url] strips the query string from the URL, which makes it difficult to use it as a replacement in Linked Field, Views and elsewhere.

I can't make a patch, but the following changes seem to do the trick:

Adding 'display_url' to the array at line 1088 in function link_field_item_create():

return array('title' => NULL, 'url' => NULL, 'display_url' => NULL);

Adding the $properties['display_url'] array at line 1105 in function link_field_item_property_info():

  $properties['display_url'] = array(
    'type' => 'uri',
    'label' => t('The full URL of the link.'),
    'setter callback' => 'entity_property_verbatim_set',
  );
CommentFileSizeAuthor
#1 1909788-display_url.patch814 bytesmthomas

Comments

mthomas’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new814 bytes

Patch attached.

csc4’s picture

This sounds brilliant - will it also be available in custom content panes context keywords?

kpolymorphic’s picture

Status: Needs review » Reviewed & tested by the community

Works well thanks! I tested this in a project with the same need, and it did exactly what I needed.

renatog’s picture

Assigned: Unassigned » renatog
Issue tags: +ciandt-contrib

Works good for me too.

+RTBC.

Regards.

  • RenatoG committed c6bbf42 on 7.x-1.x authored by mthomas
    Issue #1909788 by mthomas, jesss, csc4, Kpolymorphic, RenatoG: Add an...
renatog’s picture

Status: Reviewed & tested by the community » Fixed

Fixed.

Commited in dev branch.

Regards.

Status: Fixed » Closed (fixed)

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