Issue Summary
I had a need to add a rel="nofollow" to some links from the DS username field. I was able to add a template_preprocess_field__ds() but could not modify the attributes passed to the link.
Proposed Resolution
Modify the inline template link() function to pass a link_attributes 3rd parameter. These attributes are empty by default but can be modified by preprocess functions.
| Comment | File | Size | Author |
|---|---|---|---|
| ds-link_attributes.patch | 721 bytes | malcolm_p |
Comments
Comment #2
vistree commentedHi Malcolm,
this is exactly what I need - and your patch works great for me. Maybe helpful for others:
in your custom.theme add a preprocess-field function to add a new attribute + add the new link_attribute to field template
Comment #3
vistree commentedunrelated comment - removed it!
Comment #6
swentel commentedWorks well, committed and pushed thanks!