I need to be able to get the target attribute of a link field, so that I can apply it to another field I chose to "render as a link". To do that, I exposed a field to views : "link's attributes", where it is possible to choose wich attribute to fetch (title, rel, target).
Patch is attached.

Regards,
David

Comments

David Stosik’s picture

StatusFileSize
new5.86 KB

And here is the patch for those using drush_make (see #745224: Apply patches from git diff and git format-patch, git patches are not supported yet).

David Stosik’s picture

StatusFileSize
new6.98 KB

This new patch adds an necessay hook_update_N to update the existing link fields definition, to reflect the news views compatibility.

Regards,
David

David Stosik’s picture

Up ?

aleagi’s picture

I have applied #2 with success...

Anyone else can test and please commit it to the last dev. This is an awesome feature for the module!

Thanks for the code! @:)

jhodgdon’s picture

Status: Needs review » Needs work

Just as a note... I needed this feature, so I tried (luckily on a test site) to apply the patch in #2 to the current Link module. It didn't quite apply, but when I modified the patch so it would apply, it completely broke the existing link Views integration, and now no links (much less attributes) are working in Views.

So I wouldn't recommend using this patch.

David Stosik’s picture

Did you run database updates (through yoursite/update.php or drush updb)?

jhodgdon’s picture

Yes, I ran update.php. All links vanished from my site.

damienmckenna’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)

Thank you all for your efforts, but I'm sorry to say that the D6 version is no longer supported.

damienmckenna’s picture

Assigned: David Stosik » Unassigned