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
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | link_views_attributes_field2.patch | 6.98 KB | David Stosik |
| #1 | link_views_attributes_field.patch | 5.86 KB | David Stosik |
| link_views_attributes_field.patch | 5.89 KB | David Stosik |
Comments
Comment #1
David Stosik commentedAnd 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).
Comment #2
David Stosik commentedThis new patch adds an necessay hook_update_N to update the existing link fields definition, to reflect the news views compatibility.
Regards,
David
Comment #3
David Stosik commentedUp ?
Comment #4
aleagi commentedI 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! @:)
Comment #5
jhodgdonJust 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.
Comment #6
David Stosik commentedDid you run database updates (through yoursite/update.php or drush updb)?
Comment #7
jhodgdonYes, I ran update.php. All links vanished from my site.
Comment #8
damienmckennaThank you all for your efforts, but I'm sorry to say that the D6 version is no longer supported.
Comment #9
damienmckenna